Filter to change pixel type of an image. More...
#include <spatmod/imagefilterpixeltype.h>

Public Member Functions | |
| FILTER_PIXELTYPE (STAGE *pSourceImage, bool TakeOwnership, PIXEL::TYPE TargetPixelType, double ColorMaxValue, DATATYPE TargetDatatype=DATATYPE_Invalid) | |
| virtual | ~FILTER_PIXELTYPE () |
Static Public Member Functions | |
| static bool | IsConversionValid (PIXEL::TYPE SourcePixelType, PIXEL::TYPE TargetPixelType) |
Filter to change pixel type of an image.
The following transformations are supported: Grayscale to RGB, ComplexRI, ComplexMP RGB to/from CMY, CMYK, IHS, BHS, HSV CMY to/from CMYK ComplexRI to/from ComplexMP If source image contains an alpha band it will be passed through unchanged if the target pixel type includes alpha. Output sample types are determined from output pixel type and sample range required. Sample types with predefined ranges exceeding 8-bit unsigned (eg Hue) will have a sample datatype sufficiently large to hold the possible range of sample values.
| SPATMOD::IMAGE::FILTER_PIXELTYPE::FILTER_PIXELTYPE | ( | STAGE * | pSourceImage, | |
| bool | TakeOwnership, | |||
| PIXEL::TYPE | TargetPixelType, | |||
| double | ColorMaxValue, | |||
| DATATYPE | TargetDatatype = DATATYPE_Invalid | |||
| ) |
Construct with specified target pixel type.
| pSourceImage | Source image stage | |
| TakeOwnership | Filter takes ownership of source stage and will delete when needed | |
| TargetPixelType | Target pixel type | |
| ColorMaxValue | Maximum value for color level (R, G, B, C, M, Y, K) | |
| TargetDatatype | Target data type, default derive from source and ColorMaxValue |
| virtual SPATMOD::IMAGE::FILTER_PIXELTYPE::~FILTER_PIXELTYPE | ( | ) | [virtual] |
Destructor.
| static bool SPATMOD::IMAGE::FILTER_PIXELTYPE::IsConversionValid | ( | PIXEL::TYPE | SourcePixelType, | |
| PIXEL::TYPE | TargetPixelType | |||
| ) | [static] |
Determine if this filter will support the conversion between types.
Can be used to set UI components without initializing the filter.
| SourcePixelType | Source pixel type | |
| TargetPixelType | Target pixel type |
1.6.1