Collaboration diagram for Image Container:
|
Files | |
| file | psPixels.h |
| Contains psPixel related functions. | |
| file | psImage.h |
| Contains basic image definitions and operations. | |
| file | psImageGeomManip.h |
| Contains basic image geometry manipulation operations, as specified in the PSLIB SDRS sections "Image Geometry Manipulations". | |
| file | psImagePixelExtract.h |
| Contains basic image extraction operations, as specified in the PSLIB SDRS sections "Image Pixel Extractions". | |
| file | psImagePixelManip.h |
| Contains basic image pixel manipulation operations, as specified in the PSLIB SDRS sections "Image Pixel Manipulations". | |
| file | psImageStructManip.h |
| Contains basic image structure manipulation operations, as specified in the PSLIB SDRS sections "Image Structure Manipulation". | |
Modules | |
| Image Statistical Functions | |
Data Structures | |
| struct | psPixelCoord |
| struct | psPixels |
| list of pixel coordinates More... | |
| struct | psImage |
| Basic image data structure. More... | |
| struct | psRegion |
| Basic image region structure. More... | |
Defines | |
| #define | PIXEL_INTERPOLATE_FCN_PROTOTYPE(SUFFIX, RETURNTYPE) |
| #define | PIXEL_INTERPOLATE_FCNS(MODE) |
Typedefs | |
| typedef psImage | psImage |
| Basic image data structure. | |
Enumerations | |
| enum | psImageInterpolateMode { PS_INTERPOLATE_FLAT, PS_INTERPOLATE_BILINEAR, PS_INTERPOLATE_LANCZOS2, PS_INTERPOLATE_LANCZOS3, PS_INTERPOLATE_LANCZOS4, PS_INTERPOLATE_BILINEAR_VARIANCE, PS_INTERPOLATE_LANCZOS2_VARIANCE, PS_INTERPOLATE_LANCZOS3_VARIANCE, PS_INTERPOLATE_LANCZOS4_VARIANCE, PS_INTERPOLATE_NUM_MODES } |
| enumeration of options in interpolation More... | |
| enum | psImageCutDirection { PS_CUT_X_POS, PS_CUT_X_NEG, PS_CUT_Y_POS, PS_CUT_Y_NEG } |
Functions | |
| psPixels * | psPixelsAlloc (int size) |
| Allocates a new psPixels structure. | |
| psPixels * | psPixelsRealloc (psPixels *pixels, int size) |
| resizes a psPixels structure | |
| psPixels * | p_psPixelsAppend (psPixels *pixels, int growth, psS32 x, psS32 y) |
| Add a pixel location to a psPixels. | |
| psPixels * | psPixelsCopy (psPixels *out, const psPixels *in) |
| Copies a psPixels object. | |
| psImage * | psPixelsToMask (psImage *out, const psPixels *pixels, const psRegion region, unsigned int maskVal) |
| Generate a psImage from a psPixels. | |
| psPixels * | psPixelsFromMask (psPixels *out, const psImage *mask, unsigned int maskVal) |
| Generate a psPixels from a mask psImage. | |
| psPixels * | psPixelsConcatenate (psPixels *out, const psPixels *pixels) |
| Concatenates two psPixels. | |
| bool | p_psPixelsPrint (FILE *fd, psPixels *pixels, const char *name) |
| Prints a psPixels to specified destination. | |
| psImage * | psImageAlloc (psU32 numCols, psU32 numRows, const psElemType type) |
| Create an image of the specified size and type. | |
| psRegion | psRegionSet (psF32 x0, psF32 x1, psF32 y0, psF32 y1) |
| Create a psRegion with the specified attributes. | |
| psRegion | psRegionFromString (char *region) |
| Create a psRegion with the attribute values given as a string. | |
| char * | psRegionToString (psRegion region) |
| Create a string of the standard IRAF form '[x0:x1,y0:y1]' from a psRegion. | |
| psImage * | psImageRecycle (psImage *old, psU32 numCols, psU32 numRows, const psElemType type) |
| Resize a given image to the given size/type. | |
| bool | p_psImageCopyToRawBuffer (void *buffer, const psImage *input, psElemType type) |
| Copy an image to a new buffer. | |
| psS32 | psImageFreeChildren (psImage *image) |
| Frees all children of a psImage. | |
| psF64 | p_psImageGetElementF64 (psImage *image, int col, int row) |
| get an element of an image as a psF64. | |
| bool | p_psImagePrint (FILE *f, psImage *a, char *name) |
| print image pixel values. | |
| psC64 | psImagePixelInterpolate (const psImage *input, float x, float y, const psImage *mask, psU32 maskVal, psC64 unexposedValue, psImageInterpolateMode mode) |
| Interpolate image pixel value given floating point coordinates. | |
| psImage * | psImageRebin (psImage *out, const psImage *in, const psImage *mask, psMaskType maskVal, psU32 scale, const psStats *stats) |
| Rebin image to new scale. | |
| psImage * | psImageResample (psImage *out, const psImage *in, psS32 scale, psImageInterpolateMode mode) |
| Resample image to new scale. | |
| psImage * | psImageRotate (psImage *out, const psImage *in, float angle, psC64 unexposedValue, psImageInterpolateMode mode) |
| Rotate the input image by given angle, specified in degrees. | |
| psImage * | psImageShift (psImage *out, const psImage *in, float dx, float dy, psC64 unexposedValue, psImageInterpolateMode mode) |
| Shift image by an arbitrary number of pixels (dx,dy) in either direction. | |
| psImage * | psImageRoll (psImage *out, const psImage *in, psS32 dx, psS32 dy) |
| Roll image by an integer number of pixels in either direction. | |
| psImage * | psImageTransform (psImage *output, psPixels *blankPixels, const psImage *input, const psImage *inputMask, int inputMaskVal, const psPlaneTransform *outToIn, const psRegion region, const psPixels *pixels, psImageInterpolateMode mode, int exposedValue) |
| Transform the input image according the supplied transformation. | |
| psVector * | psImageSlice (psVector *out, psVector *slicePositions, const psImage *input, const psImage *mask, psU32 maskVal, psRegion region, psImageCutDirection direction, const psStats *stats) |
| Extract pixels from rectlinear region to a vector (array of floats). | |
| psVector * | psImageCut (psVector *out, psVector *cutCols, psVector *cutRows, const psImage *input, const psImage *mask, psU32 maskVal, psRegion region, psU32 nSamples, psImageInterpolateMode mode) |
| Extract pixels from an image along a line to a vector (array of floats). | |
| psVector * | psImageRadialCut (psVector *out, const psImage *input, const psImage *mask, psU32 maskVal, float centerCol, float centerRow, const psVector *radii, const psStats *stats) |
| Extract radial region data to a vector. | |
| psS32 | psImageClip (psImage *input, psF64 min, psF64 vmin, psF64 max, psF64 vmax) |
| Clip image values outside of range to given values. | |
| psS32 | psImageClipComplexRegion (psImage *input, psC64 min, psC64 vmin, psC64 max, psC64 vmax) |
| Clip image values outside of a specified complex region. | |
| psS32 | psImageClipNaN (psImage *input, psF64 value) |
| Clip NaN image pixels to given value. | |
| psS32 | psImageOverlaySection (psImage *image, const psImage *overlay, psS32 col0, psS32 row0, const char *op) |
| Overlay subregion of image with another image. | |
| psImage * | psImageSubset (psImage *image, psRegion region) |
| Create a subimage of the specified area. | |
| psImage * | psImageCopy (psImage *output, const psImage *input, psElemType type) |
| Makes a copy of a psImage. | |
| psImage * | psImageTrim (psImage *image, psRegion region) |
| Trim an image. | |
|
|
Value: inline RETURNTYPE p_psImagePixelInterpolate##SUFFIX( \ const psImage* input, /**< input image for interpolation */ \ float x, /**< column location to derive value of */ \ float y, /**< row location ot derive value of */ \ const psImage* mask, /**< if not NULL, the mask of the input image */ \ psU32 maskVal, /**< the mask value */ \ RETURNTYPE unexposedValue /**< return value if x,y location is not in image. */ \ ); |
|
|
Value: PIXEL_INTERPOLATE_FCN_PROTOTYPE(MODE##_U8,psF64) \ PIXEL_INTERPOLATE_FCN_PROTOTYPE(MODE##_U16,psF64) \ PIXEL_INTERPOLATE_FCN_PROTOTYPE(MODE##_U32,psF64) \ PIXEL_INTERPOLATE_FCN_PROTOTYPE(MODE##_U64,psF64) \ PIXEL_INTERPOLATE_FCN_PROTOTYPE(MODE##_S8,psF64) \ PIXEL_INTERPOLATE_FCN_PROTOTYPE(MODE##_S16,psF64) \ PIXEL_INTERPOLATE_FCN_PROTOTYPE(MODE##_S32,psF64) \ PIXEL_INTERPOLATE_FCN_PROTOTYPE(MODE##_S64,psF64) \ PIXEL_INTERPOLATE_FCN_PROTOTYPE(MODE##_F32,psF64) \ PIXEL_INTERPOLATE_FCN_PROTOTYPE(MODE##_F64,psF64) \ PIXEL_INTERPOLATE_FCN_PROTOTYPE(MODE##_C32,psC64) \ PIXEL_INTERPOLATE_FCN_PROTOTYPE(MODE##_C64,psC64) |
|
|
Basic image data structure. Struct for maintaining image data of varying types. It also contains information about image size, parent images and children images. |
|
|
Definition at line 28 of file psImagePixelExtract.h. |
|
|
||||||||||||||||
|
Copy an image to a new buffer.
|
|
||||||||||||||||
|
get an element of an image as a psF64.
|
|
||||||||||||||||
|
print image pixel values.
|
|
||||||||||||||||||||
|
Add a pixel location to a psPixels.
|
|
||||||||||||||||
|
Prints a psPixels to specified destination.
|
|
||||||||||||||||
|
Create an image of the specified size and type. Uses psLib memory allocation functions to create an image struct of the specified size and type.
|
|
||||||||||||||||||||||||
|
Clip image values outside of range to given values. All pixels with values less than min are set to the value vmin. all pixels with values greater than max are set to the value vmax. This function is defined for psU8, psU16, psS8, psS16, psF32, psF64, psC32, and psC64.
|
|
||||||||||||||||||||||||
|
Clip image values outside of a specified complex region. All pixels outside of the rectangular region in complex space formed by the min and max input parameters are set to the value vmax (if either the real or imaginary portion exceeds the respective max values), or vmin. This function is defined for psC32, and psC64 imagery only.
|
|
||||||||||||
|
Clip NaN image pixels to given value. Pixels with NaN, +Inf, or -Inf values are set to the specified value. This function is defined for psF32, psF64, psC32, and psC64.
|
|
||||||||||||||||
|
Makes a copy of a psImage.
|
|
||||||||||||||||||||||||||||||||||||||||
|
Extract pixels from an image along a line to a vector (array of floats). The vector (xs,ys) - (xe,ye) forms the basis of the output vector. Pixels are considered in a rectangular region of width dw about this vector. The input region is collapsed in the perpendicular direction, and each element of the output vector represents pixel-sized boxes, where the value is derived from the statistics of the pixels interpolated along the perpendicular direction. The specific algorithm which must be used is described in the PSLib ADD (PSDC-430-006). The statistic used to derive the output vector value is specified by stats. Only one of the statistics choices may be specified, otherwise the function must return an error. This function must be defined for the following types: psS8, psU16, psF32, psF64.
|
|
|
Frees all children of a psImage.
|
|
||||||||||||||||||||||||
|
Overlay subregion of image with another image. Replace the pixels in the image which correspond to the pixels in OVERLAY with values derived from the IMAGE and OVERLAY based on the given operator OP. Valid operators are "=" (set image value to OVERLAY value), "+" (add OVERLAY value to image value), "-" (subtract OVERLAY from image), "*" (multiply OVERLAY times image), "/" (divide image by OVERLAY). This function is defined for psU8, psS8, psS16, psF32, psF64, psC32, and psC64.
|
|
||||||||||||||||||||||||||||||||
|
Interpolate image pixel value given floating point coordinates.
|
|
||||||||||||||||||||||||||||||||||||
|
Extract radial region data to a vector. A vector is constructed where each vector elements is derived from the statistics of the pixels which land within one of a sequence of radii. The radii are centered on the image pixel coordinate x,y, and are defined by the sequence of values in the vector radii. The specific algorithm which must be used is described in the PSLib ADD (PSDC-430-006). The statistic used to derive the output vector value is specified by stats. Only one of the statistics choices may be specified, otherwise the function must return an error. This function must be defined for the following types: psS8, psU16, psF32, psF64.
|
|
||||||||||||||||||||||||||||
|
Rebin image to new scale. A new image is constructed in which the dimensions are reduced by a factor of 1/scale. The scale, always a positive number, is equal in each dimension and specified the number of pixels used to define a new pixel in the output image. The output image is generated from all input image pixels. This function is defined for psU8, psS8, psS16, psF32, psF64, psC32, and psC64.
|
|
||||||||||||||||||||
|
Resize a given image to the given size/type.
|
|
||||||||||||||||||||
|
Resample image to new scale. A new image is constructed in which the dimensions are increased by a factor of scale. The scale, always a positive number, is equal in each dimension. The output image is generated from all input image pixels. Each pixel in the output image is derived by interpolating between neighboring pixels using the specified interpolation method (mode).
|
|
||||||||||||||||||||
|
Roll image by an integer number of pixels in either direction. The output image is the same dimensions as the input image. Edge pixels wrap to the other side (no values are lost). This function is defined for psU8, psS8, psS16, psF32, psF64, psC32, and psC64.
|
|
||||||||||||||||||||||||
|
Rotate the input image by given angle, specified in degrees. The output image must contain all of the pixels from the input image in their new frame. Pixels in the output image which do not map to input pixels should be set to exposed. The center of rotation is always the center pixel of the image. The rotation is specified in the sense that a positive angle is an anti-clockwise rotation. This function must be defined for the following types: psU8, psU16, psS8, psS16, psF32, psF64, psC32, psC64.
|
|
||||||||||||||||||||||||||||
|
Shift image by an arbitrary number of pixels (dx,dy) in either direction. If the shift values are fractional, the output pixel values should interpolate between the input pixel values. The output image has the same dimensions as the input image. Pixels which fall off the edge of the output image are lost. Newly exposed pixels are set to the value given by exposed. This function must be defined for the following types: psU8, psU16, psS8, psS16, psF32, psF64, psC32, psC64.
|
|
||||||||||||||||||||||||||||||||||||
|
Extract pixels from rectlinear region to a vector (array of floats). The output vector contains either col1-col0 or row1-row0 elements, based on the value of the direction: e.g., if direction is PS_CUT_X_POS, there are col1-col0 elements. The region to be sliced is defined by the lower-left corner, (col0,row0), and the upper-right corner, (col1,row1). Note that the row and column of the upper right-hand corner are NOT included in the region. In the event that col1 or row1 are negative, they shall be interpreted as being relative to the size of the parent image in that dimension. The input region is collapsed in the direction perpendicular to that specified by direction, and each element of the output vectors is derived from the statistics of the pixels at that direction coordinate. The statistic used to derive the output vector value is specified by stats. If mask is non-NULL, pixels for which the corresponding mask pixel matches maskVal are excluded from operations. If coords is not NULL, the calculated coordinates along the slice are returned in this vector. Only one of the statistics choices may be specified, otherwise the function must return an error. This function is defined for the following types: psS8, psU16, psF32, psF64.
|
|
||||||||||||
|
Create a subimage of the specified area. Define a subimage of the specified area of the given image. This function must raise an error if the requested subset area lies outside of the parent image and return NULL. The argument image is the parent image, region.x0, region.y0 specify the starting pixel of the subraster, and region.x1,region.y1 specify the extent of the desired subraster. Note that the row and column of this “upper right-hand corner” are NOT included in the region. In the event that x1 or y1 are negative, they shall be interpreted as being relative to the size of the parent image in that dimension. The entire subraster must be contained within the raster of the parent image. Note that the refCounter for the parent should be incremented. This function must be defined for the following types: psU8, psU16, psS8, psS16, psF32, psF64, psC32, psC64.
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Transform the input image according the supplied transformation. Transform the input image according the supplied transformation. The size of the transformed image is defined by the supplied output image, if non-NULL, or the region otherwise (size region.x1 - region.x0 by region.y1 region.y0, with out->x0 = region.x0 and out->y0 = region.y0). If the inputMask is non-NULL, those pixels in the inputMask matching inputMaskVal are to be ignored in the transformation. The inputMask must be of type psU8, and of the same size as the input, otherwise the function shall generate an error and return NULL. The transformation outToIn specifies the coordinates in the input image of a pixel in the output image — note that this is the reverse of what might be naively expected, but it is what is required in order to use psImagePixelInterpolate. If the pixels array is non-NULL, it shall consist of psPixelCoords, and only those pixels in the output image shall be transformed; otherwise, the entire image is generated. The interpolation is performed using the specified interpolation mode. Where a pixel in the output image does not correspond to a pixel in the input image (or all appropriate pixels in the input image are masked), the value shall be set to exposed, and the pixel added to the appropriate list of pixels (psPixels) in the array of blankPixels for return to the user. This function must be capable of handling the following types for the input (with corresponding types for the output): psF32, psF64.
|
|
||||||||||||
|
Trim an image. Trim the specified image in-place, which involves shuffling the pixels around in memory. The pixels in the region [col0:col1,row0:row1] shall consist the output image. The column col1 and row row1 are NOT included in the range. In the event that x1 or y1 are non-positive, they shall be interpreted as being relative to the size of the parent image in that dimension. If the entire specified subimage is not contained within the parent image, an error results and the return value will be NULL. N.B. If the input psImage is a child of another psImage, no pixel data will be trimmed, rather it equivalent to calling psImageSubset. If the input psImage is, however, a parent psImage, any children will be obliterated, i.e., freed from memory.
|
|
|
Allocates a new psPixels structure.
|
|
||||||||||||
|
Concatenates two psPixels. psPixelsConcatenate shall concatenate pixels onto out. In the event that out is NULL, a new psPixels shall be allocated, and the contents of pixels simply copied in. If pixels is NULL, the function shall generate an error and return NULL. The function shall take care to ensure that there are no duplicate pixels in out.
|
|
||||||||||||
|
Copies a psPixels object. Makes a deep copy of the data in a psPixels object. Any data in the OUT parameter will be destroyed and OUT will be resized, if necessary.
|
|
||||||||||||||||
|
Generate a psPixels from a mask psImage. psMaskToPixels shall return a psPixels consisting of the coordinates in the mask that match the maskVal. The out pixel list shall be modified if supplied, or allocated and returned if NULL. In hte event that mask is NULL, the function shall generate an error and return NULL.
|
|
||||||||||||
|
resizes a psPixels structure
|
|
||||||||||||||||||||
|
Generate a psImage from a psPixels. psPixelsToMask shall return an image of type U8 with the pixels lying within the specified region set to the maskVal. The out image shall be modified if supplied, or allocated and returned if NULL. The size of the output image shall be region->x1 - region->x0 by region->y1 - region->y0, with out->x0 = region->x0 and out->y0 = region->y0. In the event that either of pixels or region are NULL, the function shall generate an error and return NULL.
|
|
|
Create a psRegion with the attribute values given as a string. Create a psRegion with the attribute values given as a string. The format shall be of the standard IRAF form '[x0:x1,y0:y1]'
|
|
||||||||||||||||||||
|
Create a psRegion with the specified attributes.
|
|
|
Create a string of the standard IRAF form '[x0:x1,y0:y1]' from a psRegion.
|
1.4.1