lsst.afw gf46e8334de+a9ddbbd1e6
|
Functions | |
def | clipImage (im, minClip, maxClip) |
def | getProjectionIndices (imageBBox, targetBBox) |
def | projectImage (image, bbox, fill=0) |
def lsst.afw.image.utils.clipImage | ( | im, | |
minClip, | |||
maxClip | |||
) |
def lsst.afw.image.utils.getProjectionIndices | ( | imageBBox, | |
targetBBox | |||
) |
Get the indices to project an image Given an image and target bounding box, calculate the indices needed to appropriately slice the input image and target image to project the image to the target. Parameters ---------- imageBBox: Box2I Bounding box of the input image targetBBox: Box2I Bounding box of the target image Returns ------- targetSlices: tuple Slices of the target image in the form (by, bx), (iy, ix). imageIndices: tuple Slices of the input image in the form (by, bx), (iy, ix).
def lsst.afw.image.utils.projectImage | ( | image, | |
bbox, | |||
fill = 0 |
|||
) |
Project an image into a bounding box Return a new image whose pixels are equal to those of `image` within `bbox`, and equal to `fill` outside. Parameters ---------- image: `afw.Image` or `afw.MaskedImage` The image to project bbox: `Box2I` The bounding box to project onto. fill: number The value to fill the region of the new image outside the bounding box of the original. Returns ------- newImage: `afw.Image` or `afw.MaskedImage` The new image with the input image projected into its bounding box.