eLynx SDK v3.3.0
C++ image processing API reference
Protected Attributes

eLynx::Image::ImageVariant Class Reference

Class defining an image variant. More...

#include <ImageVariant.h>

List of all members.

Public Member Functions

Constructors, destructor and assignment
 ImageVariant ()
 Default construtor make is an invalid image.
 ImageVariant (EPixelFormat iPixelFormat, uint32 iWidth, uint32 iHeight)
 Construction of image with dimension and pixel format, image map pixels is uninitialized for performance reason.
 ImageVariant (const ImageVariant &iImage)
 Copy construction of an image.
 ImageVariant (const ImageVariant &iImage, EResolution iResolution, bool ibScaled=true)
 Copy construction of an image and change resolution.
 ImageVariant (const ImageVariant &iImage, uint32 iChannel, bool ibScaled=true)
 Construction of an image with a plane of another Image ISO resolution.
 ImageVariant (const AbstractImage &iImage)
 Copy construction of AbstractImage image.
 ImageVariant (const ImageVariant &iImage1, const ImageVariant &iImage2, bool ibComplex=false)
 Construction merging two images.
 ImageVariant (const ImageVariant &iImage1, const ImageVariant &iImage2, const ImageVariant &iImage3, EColorSpace iColorSpace=CS_RGB)
 Construction merging three images.
 ImageVariant (const ImageVariant &iImage1, const ImageVariant &iImage2, const ImageVariant &iImage3, const ImageVariant &iImage4)
 Construction of an RGBA image merging four images.
 ImageVariant (const char *iprFilename, ImageFileInfo *oprInfo=NULL, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Construction from a filename.
const ImageVariantoperator= (const ImageVariant &iImage)
 Assignment from ImageVariant.
const ImageVariantoperator= (const AbstractImage &iImage)
 Assignment from AbstractImage, aggregation copy of image implementation.
bool operator== (const ImageVariant &iOther) const
 Image comparison operator ==.
bool operator!= (const ImageVariant &iOther) const
 Image comparison operator !=.
virtual ~ImageVariant ()
 virtual destructor to handle inheritance.
void Release ()
 Self destruction.
Pixel informations
EPixelMode GetPixelMode () const
 Retrieve the pixel mode.
EPixelType GetPixelType () const
 Retrieve the pixel type.
EColorSpace GetColorSpace () const
 Retrieve the pixel color space.
EPixelFormat GetPixelFormat () const
 Retrieve pixel format.
EResolution GetResolution () const
 Retrieve the image component resolution.
uint32 GetChannelCount () const
 Retrieve the number of channel.
uint32 GetBitsPerPixel () const
 Retrieve the number of bits per pixel.
uint32 sizeofPixel () const
 Retrieve the number of bytes per pixel.
bool IsMasking (uint32 iChannelMask) const
 Retrieve if selected channel mask contains a channel of image.
bool IsColor () const
 Retrieve if image is a color type.
bool IsGrey () const
 Retrieve if image is a grey type.
bool IsComplex () const
 Retrieve if image is a complex type.
bool HasAlpha () const
 Retrieve if image has an alpha channel.
bool IsL () const
 Retrieve if image has a luminance channel only.
bool IsLA () const
 Retrieve if image has a luminance and an alpha channels.
bool IsRGB () const
 Retrieve if image is of RGB format.
bool IsRGBA () const
 Retrieve if image is of RGBA format.
bool IsHLS () const
 Retrieve if image is of HLS format.
bool IsXYZ () const
 Retrieve if image is of CIE XYZ format.
bool IsLuv () const
 Retrieve if image is of CIE Luv format.
bool IsLab () const
 Retrieve if image is of CIE Lab format.
bool IsLch () const
 Retrieve if image is of CIE Lch format.
bool IsHLab () const
 Retrieve if image is of Hunter Lab format.
bool IsUInt8 () const
 Retrieve if image has RT_UINT8 resolution (8 bits unsigned).
bool IsUInt16 () const
 Retrieve if image has RT_UINT16 resolution (16 bits unsigned).
bool IsInt32 () const
 Retrieve if image has RT_INT32 resolution (32 bits signed).
bool IsFloat () const
 Retrieve if image has RT_Float resolution (32 bits floating point).
bool IsDouble () const
 Retrieve if image has RT_Double resolution (64 bits floating point).
bool IsLub () const
 Retrieve if image has PF_Lub pixel format.
bool IsLus () const
 Retrieve if image has PF_Lus pixel format.
bool IsLi () const
 Retrieve if image has PF_Li pixel format.
bool IsLf () const
 Retrieve if image has PF_Lf pixel format.
bool IsLd () const
 Retrieve if image has PF_Ld pixel format.
bool IsLAub () const
 Retrieve if image has PF_LAub pixel format.
bool IsLAus () const
 Retrieve if image has PF_LAus pixel format.
bool IsLAi () const
 Retrieve if image has PF_LAi pixel format.
bool IsLAf () const
 Retrieve if image has PF_LAf pixel format.
bool IsLAd () const
 Retrieve if image has PF_LAd pixel format.
bool IsComplexi () const
 Retrieve if image has PF_CPLXi pixel format.
bool IsComplexf () const
 Retrieve if image has PF_CPLXf pixel format.
bool IsComplexd () const
 Retrieve if image has PF_CPLXd pixel format.
bool IsRGBub () const
 Retrieve if image has PF_RGBub pixel format.
bool IsRGBus () const
 Retrieve if image has PF_RGBus pixel format.
bool IsRGBi () const
 Retrieve if image has PF_RGBi pixel format.
bool IsRGBf () const
 Retrieve if image has PF_RGBf pixel format.
bool IsRGBd () const
 Retrieve if image has PF_RGBd pixel format.
bool IsRGBAub () const
 Retrieve if image has PF_RGBAub pixel format.
bool IsRGBAus () const
 Retrieve if image has PF_RGBAus pixel format.
bool IsRGBAi () const
 Retrieve if image has PF_RGBAi pixel format.
bool IsRGBAf () const
 Retrieve if image has PF_RGBAi pixel format.
bool IsRGBAd () const
 Retrieve if image has PF_RGBAd pixel format.
bool IsHLSf () const
 Retrieve if image has PF_HLSf pixel format.
bool IsHLSd () const
 Retrieve if image has PF_HLSd pixel format.
bool IsXYZf () const
 Retrieve if image has PF_XYZf pixel format.
bool IsXYZd () const
 Retrieve if image has PF_XYZd pixel format.
bool IsLuvf () const
 Retrieve if image has PF_Luvf pixel format.
bool IsLuvd () const
 Retrieve if image has PF_Luvd pixel format.
bool IsLabf () const
 Retrieve if image has PF_Labf pixel format.
bool IsLabd () const
 Retrieve if image has PF_Labd pixel format.
bool IsLchf () const
 Retrieve if image has PF_Lchf pixel format.
bool IsLchd () const
 Retrieve if image has PF_Lchd pixel format.
bool IsHLabf () const
 Retrieve if image has PF_HLabf pixel format.
bool IsHLabd () const
 Retrieve if image has PF_HLabd pixel format.
Image information
bool IsValid () const
 Check image validity.
uint32 GetWidth () const
 Retrieve the image width in pixels.
uint32 GetHeight () const
 Retrieve the image height in pixels.
uint32 sizeofWidth () const
 Retrieve the number of bytes per line.
uint32 GetPixelCount () const
 Compute the number of pixel for whole image.
uint32 GetSampleCount () const
 Retrieve the number of samples for whole map.
uint32 sizeofMap () const
 Retrieve the number of bytes for whole map.
Implementation access
boost::shared_ptr< AbstractImageGetImpl ()
 Retrieve pointeur to implemented abstract image.
boost::shared_ptr< const
AbstractImage
GetImpl () const
 Retrieve const pointeur to implemented abstract image.
void Invalidate (bool ibRelease=true)
 Invalidate image.
void Assign (boost::shared_ptr< AbstractImage > &ipsAbstractImpl)
 Aggregation transfert of implemented abstract image.
File methods
bool CanLoad (const char *iprFilename, ImageFileInfo *oprInfo=NULL, bool ibPreview=false) const
 Check is the file is supported by the manager for loading and get file informations.
bool Load (const char *iprFilename, ImageFileInfo *oprInfo=NULL, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Load an ImageVariant from a filename.
bool CanSave (const char *iprFilename) const
 Check is the image can be saved using file format given by extension in filename.
bool Save (const char *iprFilename, ProgressNotifier &iNotifier=ProgressNotifier_NULL, const ImageFileOptions *iprOptions=NULL) const
 Save image to file.
Conversion methods
bool ChangeResolution (EResolution iResolution, bool ibScaled=true)
 Change the image resolution when possible.
bool ChangeColorSpace (EColorSpace iColorSpace, bool ibBlendAlpha=false)
bool ChangePixelFormat (EPixelFormat iPixelFormat, bool ibScaled=true, bool ibBlendAlpha=false)
bool ChangeToGrey (EColorToGreyConversion iMethod=CGC_Default, bool ibRemoveAlpha=false, bool ibBlendAlpha=false)
bool ChangeToBayer (EBayerMatrix iBayer=BM_GRBG, bool ibBlendAlpha=false, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool ChangeToColor (EGreyToColorConversion iMethod=GCC_Default, bool ibRemoveAlpha=false, bool ibBlendAlpha=false)
bool ChangeToColor (EBayerToColorConversion iMethod, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool ChangeToUByteFullDynamic ()
bool GetChannelAsRGBGrey (const ImageVariant &iImage, uint32 iChannel)
bool Split (ImageVariant &, ImageVariant &)
bool Split (ImageVariant &, ImageVariant &, ImageVariant &)
bool Split (ImageVariant &, ImageVariant &, ImageVariant &, ImageVariant &)
bool GetPlane (const ImageVariant &iImage, uint32 iPlane, bool ibScaled=true)
 Build an image from a plane of another image.
bool GetPlane (uint32 iPlane, ImageVariant &oPlane, bool ibScaled=true) const
 Build a grey image from a plane of this.
bool SetPlane (uint32 iPlane, const ImageVariant &iImage, bool ibResized=true, bool ibScaled=false)
 Build a grey image from a plane of this.
bool SwapPlanes (uint32 iPlane1, uint32 iPlane2)
 Swap two planes into an image.
bool RemoveAlpha (bool ibBlendAlpha=false)
bool AddAlpha (const ImageVariant &iAlpha)
Geometry methods
bool Flip (EFlipPlane iFlipPlane, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Perform symmetry of an image.
bool FlipVertical (ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Perform vertical symmetry of an image.
bool FlipHorizontal (ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Perform horizontal symmetry of an image.
bool Rotate (ERightRotation iRotation, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Fast rotate image with basic 90° angles.
bool Rotate180 (ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Fast rotate image of 180°.
bool Rotate90Left (ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Fast rotate image of 90° left.
bool Rotate90Right (ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Fast rotate image of 90° right.
bool Rotate (double iDegrees, int32 iFlags=RF_Default, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Rotate an image with finest degree angles.
bool Crop (uint32 iX, uint32 iY, uint32 iWidth, uint32 iHeight, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Crop image.
bool AddBorder (uint32 iLeft=0, uint32 iRight=0, uint32 iTop=0, uint32 iBottom=0, bool ibBlack=true, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Add border to an image.
bool Resize (uint32 iWidth, uint32 iHeight, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Resize image.
bool Resample (uint32 iWidth, uint32 iHeight, Math::EResampleFilter iFilter=Math::RF_Mitchell, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Resample image using filter.
bool AutoCrop ()
 Automatic crop of the image.
bool Zoom (uint32 iZoom, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Zoom image.
bool Bin2x2 (EBinningMethod iMethod=BM_Mean, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Apply binning 2x2 to an image.
bool Bin3x3 (EBinningMethod iMethod=BM_Mean, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Apply binning 3x3 to an image.
bool Shift (int32 iHorizontal, int32 iVertical, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Shift an image with complete pixel size.
bool Shift (double iHorizontal, double iVertical, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool GetSubImage (const ImageVariant &iImage, uint32 iX, uint32 iY, uint32 iWidth, uint32 iHeight, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 GetSubImage get an sub-area from an external image.
bool Insert (const ImageVariant &iImage, int32 iX, int32 iY, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Insert an sub-image at selected position.
boost::shared_ptr< ImageVariantCreateThumbnailImage (uint32 iWidth, uint32 iHeight, bool ibConverveAspectRatio=true, ProgressNotifier &iNotifier=ProgressNotifier_NULL) const
bool GetThumbnail (const ImageVariant &iImage, uint32 iWidth, uint32 iHeight, bool ibConverveAspectRatio=true, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
Operators with constant
bool Operator (EImageOperator iOperator, double iValue, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Neg (uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Abs (uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Add (double iScale, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Sub (double iScale, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Mul (double iScale, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Div (double iScale, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Dif (double iScale, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Min (double iScale, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Max (double iScale, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Mean (double iScale, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool AddClamp (double iScale, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool SubClamp (double iScale, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool MulClamp (double iScale, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
Operators with another image
bool Operator (EImageOperator iOperator, const ImageVariant &iImage, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Add (const ImageVariant &iImage, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Sub (const ImageVariant &iImage, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Mul (const ImageVariant &iImage, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Div (const ImageVariant &iImage, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Min (const ImageVariant &iImage, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Max (const ImageVariant &iImage, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Mean (const ImageVariant &iImage, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool AddClamp (const ImageVariant &iImage, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool SubClamp (const ImageVariant &iImage, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool MulClamp (const ImageVariant &iImage, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
Operators with another image using an image mask
bool Operator (EImageOperator iOperator, const ImageVariant &iImage, const ImageLub &iImageMask, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Add (const ImageVariant &iImage, const ImageLub &iImageMask, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Sub (const ImageVariant &iImage, const ImageLub &iImageMask, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Mul (const ImageVariant &iImage, const ImageLub &iImageMask, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Div (const ImageVariant &iImage, const ImageLub &iImageMask, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Min (const ImageVariant &iImage, const ImageLub &iImageMask, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Max (const ImageVariant &iImage, const ImageLub &iImageMask, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool Mean (const ImageVariant &iImage, const ImageLub &iImageMask, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool AddClamp (const ImageVariant &iImage, const ImageLub &iImageMask, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool SubClamp (const ImageVariant &iImage, const ImageLub &iImageMask, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool MulClamp (const ImageVariant &iImage, const ImageLub &iImageMask, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
Operators with image list
bool Build (EImageListOperator iOperator, const std::vector< const ImageVariant * > &iImageList, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool BuildClipped (EImageListOperator iOperator, const std::vector< const ImageVariant * > &iImageList, uint32 iIteration, double iKappa, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool BuildWeightedEntropy (const std::vector< const ImageVariant * > &iImageList, uint32 iW, uint32 iH, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
Point to point processing methods
bool AdjustBrightness (double iBrightness, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Change brightness on selected channels, based on the RGB color model.
bool AdjustContrast (double iContrast, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Change contrast on selected channels, based on the RGB color model.
bool AdjustGamma (double iGamma, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Gamma correction on selected channels, based on the RGB color model.
bool AdjustBCG (double iBrightness, double iContrast, double iGamma, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Change brightness + contrast + gamma correction, based on the RGB color model.
bool Balance (double iRed, double iGreen, double iBlue, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 The Color Balance allows you to adjust the overall mixture of the colors, based on the RGB color model.
bool Colorize (double iHue, double iSaturation, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Colorize an image setting a hue and a saturation.
bool AdjustHueSaturation (double iHue, double iSaturation, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Adjust an image hue and a saturation.
bool Desaturate (double iFactor, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Adjust the Saturation by a multiplier factor, based on the HLS color model.
bool AdjustShadowHighlight (double iShadow=0.0, double iHighlight=1.0, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Shadow and highlight adjustment on selected channels.
bool AdjustMidtone (double iMidtone, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Midtone curve on selected channels.
bool AdjustSigmoid (double iAlpha, double iBeta, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Adjust Sigmoid curvon selected channels.
bool Posterize (uint32 iLevels, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 The Posterize effect lets you adjust the number of brightness levels of the image.
bool Solarize (double iValue, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 The Solarize effect blends an image by inverting all color data when intensity value is greater than a threshold.
bool Blend (const ImageVariant &iImage, double iScalar, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Blend with another image by a scalar in range [0..1].
bool Binarize (double iThreshold, bool ibNegative=false, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
Convolution based filters
bool Convolve (const Math::ConvolutionKerneld &iKernel, bool ibAbsolute=false, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Convolve with a kernel.
bool Convolve (const Math::ConvolutionKerneld &iKernel, double iThresholdMin, double iThresholdMax, bool ibAbsolute=false, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Convolve with a kernel.
bool Convolve (const Math::ConvolutionKerneld &iKernel, double iThresholdMin, double iThresholdMax, double iBlend=1.0, bool ibAbsolute=false, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Convolve with a kernel.
bool Convolve (const Math::ConvolutionKerneld &iKernel1, const Math::ConvolutionKerneld &iKernel2, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Convolve with two separable kernels [Wx1] x [1xH].
bool ApplyBoxBlur (uint32 iWidth=5, uint32 iHeight=5, double iBlend=1.0, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Box blur filter, this is the blur filter with best performance with int64 kernel.
bool ApplySelectiveBlur (double iBlend=1.0, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool ApplyFastGaussianBlur (double iRadius=3.0, EBorderFill iBorder=BF_Nearest, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool ApplyGaussian (uint32 iWidth, uint32 iHeight, double iVariance, double iBlend=1.0, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Gaussian filter smooths the current image by convolving a Gaussian kernel(iWidth,iHeight) with selected iVariance.
bool ApplyGaussian (double iRadius, double iVariance, double iBlend=1.0, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Gaussian blur filter smooths the current image by convolving squared Gaussian kernel with selected iVariance.
bool ApplyGaussian (double iRadius, double iBlend=1.0, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Gaussian blur filter smooths the current image by convolving squared Gaussian kernel with selected radius, Variance is computes as .
bool ApplyLoG (double iRadius=3.0, double iVariance=0.5, EBorderFill iBorder=BF_Nearest, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool ApplyBilateral (double iRadius=1.5, double iVarianceSpatial=2.0, double iVarianceRange=20.0, double iBlend=1.0, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Apply bilateral filter to an image by means of a nonlinear combination of nearby image values.
bool ApplySmooth (double iThresholdMin=0.0, double iThresholdMax=1.0, double iBlend=1.0, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Apply smooth blurring filter to the current image.
bool ApplyMean (double iRadius, bool ibCircular=true, double iThresholdMin=0.0, double iThresholdMax=1.0, double iBlend=1.0, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Mean filter smooths the current image by replacing each pixel with the neighborhood mean.
bool ApplyCone (double iThresholdMin=0.0, double iThresholdMax=1.0, double iBlend=1.0, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Apply smooth blurring filter to the current image.
bool ApplyPyramidal (double iThresholdMin=0.0, double iThresholdMax=1.0, double iBlend=1.0, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Apply smooth blurring filter to the current image.
bool ApplyLowpass (double iAlpha, double iThresholdMin=0.0, double iThresholdMax=1.0, double iBlend=1.0, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool ApplyLaplacian3x3 (double iAlpha=0.0, double iThresholdMin=0.0, double iThresholdMax=1.0, double iBlend=1.0, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool ApplyLaplacian (double iRadius=0.0, double iThresholdMin=0.0, double iThresholdMax=1.0, double iBlend=1.0, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool ApplyEmboss (double iDegree=0.0, double iThresholdMin=0.0, double iThresholdMax=1.0, double iBlend=1.0, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool ApplySharpen (double iRadius=3.0, double iThresholdMin=0.0, double iThresholdMax=1.0, double iBlend=1.0, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool ApplySharpen3x3 (double iAmount=5.0, double iThresholdMin=0.0, double iThresholdMax=1.0, double iBlend=1.0, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool ApplySharpenMore (double iAlpha=1.0, double iThresholdMin=0.0, double iThresholdMax=1.0, double iBlend=1.0, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool ApplySharpenSmooth (double iAlpha=0.0, double iThresholdMin=0.0, double iThresholdMax=1.0, double iBlend=1.0, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool ApplySharpenSoft (double iThresholdMin=0.0, double iThresholdMax=1.0, double iBlend=1.0, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool ApplyUnsharpMask (double iRadius=2.0, double iAmount1=0.5, double iAmount2=0.5, EBorderFill iBorder=BF_Nearest, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
Edge Detector filters
virtual bool ApplyGradient (EEdgeDetector iDetector, EEdgeGradient iGradient=EG_Fast, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Edge detection using gradient of filter.
bool ApplyMarrHildreth (EBorderFill iBorder=BF_Nearest, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Marr-Hildreth filter detects edges.
bool ApplyRoberts (bool ibFast=true, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Roberts Cross 2x2 edge detection.
bool ApplyCanny (EEdgeDetector iDetector, EEdgeGradient iGradient, double iRadius=1.5, double iThresholdLo=0.0, double iThresholdHi=1.0, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Canny edge detection.
bool ApplyZeroCrossing (double iRadius, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Zero Crossing edge detection.
bool ApplySegmentation (double iStep, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Image Segmentation by morphological watersheds.
Misceallenous filters
bool ApplyRotationalGradient (double iXc, double iYc, double iRadialShift, double iRotationalShift, bool ibInterpolation=true, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 LARSON-SEKANINA filter filter.
bool RemoveGradient (ImageVariant &oBackground, const Math::Point2iList &iPoints, EGradientMethod iMethod=GM_Linear, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Remove background gradient using Delaunay triangulation method with different precisions (linear, quadratic, etc.)
bool Debloom (uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Debloom an image.
bool ApplyDigitalDevelopment (double iBackground, double iCrossOver, double iScale, double iVariance=1.5, EColorEmphasis iEmphasis=CE_Default, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
Morphological filters
bool ApplyMorphological (EMorphologicalFilterType iType, uint32 iWidth=3, bool ibCircular=true, bool ibLuminance=true, uint32 iIteration=1, double iBlend=1.0, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Morphological filter with squared or circular kernel.
bool Despeckle (uint32 iWidth=3, bool ibCircular=true, bool ibLuminance=true, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Despeckle filter is a median filter.
bool Erode (uint32 iWidth=3, bool ibCircular=true, bool ibLuminance=true, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Erode filter removes pixels from the edges of black objects.
bool Dilate (uint32 iWidth=3, bool ibCircular=true, bool ibLuminance=true, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Dilate filter adds pixels to the edges of black objects.
bool Open (uint32 iWidth=3, bool ibCircular=true, bool ibLuminance=true, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Open filter performs an Erode followed by Dilate filters.
bool Close (uint32 iWidth=3, bool ibCircular=true, bool ibLuminance=true, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Open filter performs an Erode followed by Dilate filters.
bool TopHat (uint32 iWidth=3, bool ibCircular=true, bool ibLuminance=true, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool ApplyMedian (uint32 iWidth=3, uint32 iIteration=1, bool ibCircular=true, bool ibLuminance=true, double iBlend=1.0, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Median filter reduces salt and pepper noise replacing each pixel with the median of the neighboring pixel.
bool ApplyAdaptiveMedian (uint32 iWMax=7, uint32 iIteration=1, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Adaptive Median filter on square window.
Global to point processing methods
bool Normalize (uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Normalize an image.
bool AutoBalance (ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool AutoBrightness (ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool DeconvolveRL (const IImagePSF &iPSF, uint32 iIteration=1, EBorderFill iBorder=BF_Nearest, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool DeconvolveRL (double iRadius, double iSigma=2.0, uint32 iIteration=1, EBorderFill iBorder=BF_Nearest, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool ApplyFFT (const ImageVariant &iFilter, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
bool ApplyFFTLowPass (double iCutoff=0.5, uint32 iRank=2, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
Bayer matrix methods
EBayerMatrix GetBayerMatrix () const
 Get the image Bayer matrix.
bool SetBayerMatrix (EBayerMatrix iBayer)
 Set a Bayer matrix to the image.
bool IsBayer () const
 Get if image is encoded using color field array (CFA), ie with a Bayer matrix.
bool Affine (double iScaleR, double iOffsetR, double iScaleG, double iOffsetG, double iScaleB, double iOffsetB)
Image restoration methods
bool FastInpaint (const ImageVariant &iBinaryMask, bool iUseRegion, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Implementation of Fast Digital Image Inpainting article.
bool FastMarchingInpaint (const ImageVariant &iBinaryMask, uint32 iSize, bool iUseRegion, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Implementation of An Image Inpainting Technique Based on the Fast Marching Method article.
bool ExemplarBasedInpaint (const ImageVariant &iBinaryMask, const Math::AOBBox2i &iSearchArea, uint32 iPatchSize, bool iUseRegion, uint32 iChannelMask=CM_All, ProgressNotifier &iNotifier=ProgressNotifier_NULL)
 Implementation of Region Filling and Object Removal by Exemplar-Based Image Inpainting article.
Image analyse
bool ComputeMin (double &oMin, bool ibNormalized) const
 Compute min value of image samples.
bool ComputeMin (double(&oMin)[PC_MAX], bool ibNormalized) const
 Compute min values per channels of image samples.
bool ComputeMax (double &oMax, bool ibNormalized) const
 Compute max value of image samples.
bool ComputeMax (double(&oMax)[PC_MAX], bool ibNormalized) const
 Compute max value per channels of image samples.
bool ComputeMinMax (double &oMin, double &oMax, bool ibNormalized=true) const
 Compute min and max values of image samples in one pass.
bool ComputeMinMax (double(&oMin)[PC_MAX], double(&oMax)[PC_MAX], bool ibNormalized) const
 Compute min and max values per channels of image samples in one pass.
bool ComputeMean (double &oMean, bool ibNormalized=true) const
 Compute the mean value of image samples.
bool ComputeMean (double(&oMean)[PC_MAX], bool ibNormalized=true) const
 Compute the mean value per channels of image samples.
bool ComputeMedian (double &oMedian, bool ibNormalized=true) const
bool ComputeMedian (double(&oMedian)[PC_MAX], bool ibNormalized=true) const
bool ComputeStandardDeviation (double &oDeviation, bool ibNormalized=false) const
bool ComputeStandardDeviation (double &oDeviation, double &oMean, bool ibNormalized=false) const
bool ComputeStandardDeviation (double(&oDeviation)[PC_MAX], bool ibNormalized=false) const
bool ComputeStandardDeviation (double(&oDeviation)[PC_MAX], double(&oMean)[PC_MAX], bool ibNormalized=false) const
bool ComputeVariance (double &oVariance) const
bool ComputeVariance (double(&oVariance)[PC_MAX]) const
bool ComputeEnergy (double &oEnergy) const
bool ComputeEnergy (double(&oEnergy)[PC_MAX]) const
bool ComputeEntropy (double &oEntropy) const
bool ComputeEntropy (double(&oEntropy)[PC_MAX]) const
bool ComputeHistogram (ImageHistogram &oHistogram) const
bool ComputeMean (double &oMeanR, double &oMeanG, double &oMeanB, bool ibNormalized=false) const
bool ComputeStandardDeviation (double &oStdDevR, double &oStdDevG, double &oStdDevB, bool ibNormalized=false) const
bool ComputeStandardDeviation (double &oMeanR, double &oMeanG, double &oMeanB, double &oStdDevR, double &oStdDevG, double &oStdDevB, bool ibNormalized=false) const
Pixel iterators
boost::shared_ptr< IPixelIteratorBegin ()
 Returns an iterator pointing to the beginning of the Pixel map.
boost::shared_ptr< IPixelIteratorBegin () const
 Returns an const iterator pointing to the beginning of the Pixel map.
boost::shared_ptr< IPixelIteratorEnd ()
 Returns an iterator pointing to the end of the Pixel map.
boost::shared_ptr< IPixelIteratorEnd () const
 Returns an const iterator pointing to the end of the Pixel map.
Image rasterization
bool Clear (uint32 iChannelMask=CM_All)
bool Plot (int32 iX, int32 iY, uint32 iChannelMask=CM_All)
bool DrawHLine (int32 iY, int32 iX1, int32 iX2, uint32 iChannelMask=CM_All)
bool DrawLine (int32 iX1, int32 iY1, int32 iX2, int32 iY2, bool ibAntialiasing=false, uint32 iChannelMask=CM_All)
bool DrawRectangle (int32 iX1, int32 iY1, int32 iX2, int32 iY2, bool ibSolid=false, uint32 iChannelMask=CM_All)
bool DrawEllipse (int32 iX, int32 iY, uint32 iRadiusX, uint32 iRadiusY, bool ibSolid=false, uint32 iChannelMask=CM_All)
bool DrawCircle (int32 iX, int32 iY, uint32 iRadius, bool ibSolid=false, uint32 iChannelMask=CM_All)
bool DrawTriangle (int32 iX0, int32 iY0, int32 iX1, int32 iY1, int32 iX2, int32 iY2, bool ibSolid=false, uint32 iChannelMask=CM_All)
bool Fill (int32 iX, int32 iY, uint32 iChannelMask=CM_All)
bool GetFilledBBox (int32 iX, int32 iY, Math::AOBBox2i &oBBox) const

Protected Attributes

boost::shared_ptr< AbstractImage_spAbstractImpl
 An aggregation of an abstract image implementation.
EBayerMatrix _Bayer
 The Bayer matrix to deal with raw image file from CCD.

Detailed Description

Class defining an image variant.

It uses the bridge pattern to hide the implementation of the AbstractImage class from clients. Pixel format is known at run-time. It can change during image life cycle. It's also an wrapper for all AbstractImage services.


Constructor & Destructor Documentation

eLynx::Image::ImageVariant::ImageVariant (  )

Default construtor make is an invalid image.

This means that pixel format is PF_Undefined, width=0, height=0, _Bayer=BM_None, and GetImpl() is NULL.

eLynx::Image::ImageVariant::ImageVariant ( EPixelFormat  iPixelFormat,
uint32  iWidth,
uint32  iHeight 
)

Construction of image with dimension and pixel format, image map pixels is uninitialized for performance reason.

Note:

  • If iWidth or iHeight are 0, it builds an invalid image.
  • With this code, don't expect that bSame is true as pixels map are uninitialized:

    ImageVariant image1(pf, w,h), image2(pf, w,h);
    bool bSame = (image1 == image2);
Parameters:
iPixelFormatpixel format of new image.
iWidthwidth of new image.
iHeightheight of new image.
eLynx::Image::ImageVariant::ImageVariant ( const ImageVariant iImage )

Copy construction of an image.

Parameters:
iImageimage to copy.
eLynx::Image::ImageVariant::ImageVariant ( const ImageVariant iImage,
EResolution  iResolution,
bool  ibScaled = true 
)

Copy construction of an image and change resolution.

Note: When elxGetPixelFormat(iImage.GetPixelFormat(), iResolution) returns PF_Undefined, it builds an invalid image.

Parameters:
iImageimage to copy.
iResolutionThe requested resolution, could be the same as source image (cloning).
ibScaledtrue for scale to full range, false for simple cast.
eLynx::Image::ImageVariant::ImageVariant ( const ImageVariant iImage,
uint32  iChannel,
bool  ibScaled = true 
)

Construction of an image with a plane of another Image ISO resolution.

Parameters:
iImagesource image.
iChannelThe channel to retrieve from 0 to 3 (for RGBA).
ibScaledtrue for scale to full range, false for simple cast.
eLynx::Image::ImageVariant::ImageVariant ( const AbstractImage iImage )

Copy construction of AbstractImage image.

Parameters:
iImageimage to copy.
eLynx::Image::ImageVariant::ImageVariant ( const ImageVariant iImage1,
const ImageVariant iImage2,
bool  ibComplex = false 
)

Construction merging two images.

Supported formats:

  • L<T> + A<T> to LA<T>, ibComplex = false
  • Re<T> + Im<T> to CPLX<T>, ibComplex = false and resolution is i,f or d;
  • RGB<T> + A<T> or A<T> + RGB<T> to RGBA<T>

Note: Images must have the same resolution and the same size otherwise it builds an invalid image.

Parameters:
iImage1image1.
iImage2image2.
ibComplextrue if result is a complex image, false otherwise.
eLynx::Image::ImageVariant::ImageVariant ( const ImageVariant iImage1,
const ImageVariant iImage2,
const ImageVariant iImage3,
EColorSpace  iColorSpace = CS_RGB 
)

Construction merging three images.

New image has the type of the iColorSpace combine with the resolution of the images. Supported formats:

  • R<T> + G<T> + B<T> to RGB<T> with iColorSpace = CS_RGB
  • H<T> + L<T> + S<T> to HLS<T> with iColorSpace = CS_HLS
  • X<T> + Y<T> + Z<T> to XYZ<T> with iColorSpace = CS_CIE_XYZ
  • L<T> + U<T> + B<T> to Luv<T> with iColorSpace = CS_CIE_Luv
  • L<T> + A<T> + B<T> to Lab<T> with iColorSpace = CS_CIE_Lab
  • L<T> + C<T> + H<T> to Lch<T> with iColorSpace = CS_CIE_Lch
  • L<T> + A<T> + B<T> to HLab<T> with iColorSpace = CS_Hunter_Lab

Notes:

  • Images must be grey and have the same resolution and the same size otherwise it builds an invalid image.
  • If iColorSpace = CS_Undefined it builds an invalid image.
Parameters:
iImage1image1 grey image for plane1.
iImage2image2 grey image for plane2.
iImage3image3 grey image for plane3.
iColorSpacethe color space.
eLynx::Image::ImageVariant::ImageVariant ( const ImageVariant iImage1,
const ImageVariant iImage2,
const ImageVariant iImage3,
const ImageVariant iImage4 
)

Construction of an RGBA image merging four images.

Supported format:

  • R<T> + G<T> + B<T> + A<T> to RGBA<T>

Note: Images must have the same resolution and the same size otherwise it builds an invalid image.

Parameters:
iImage1image1 grey image for plane1.
iImage2image2 grey image for plane2.
iImage3image3 grey image for plane3.
iImage4image4 grey image for plane4.
eLynx::Image::ImageVariant::ImageVariant ( const char *  iprFilename,
ImageFileInfo oprInfo = NULL,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Construction from a filename.

Parameters:
iprFilenamefilename to construct image from.
oprInfoInformations that could be retrieved from file.
iNotifiera notifier for progression, log and cancel.

Note: See Supported Image File Format plugins before using it.


Member Function Documentation

bool eLynx::Image::ImageVariant::AddBorder ( uint32  iLeft = 0,
uint32  iRight = 0,
uint32  iTop = 0,
uint32  iBottom = 0,
bool  ibBlack = true,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Add border to an image.

color.AddBorderBlack.png

AddBorder(10,20,30,40,true)
color.original.png

Original
color.AddBorderWhite.png

AddBorder(40,30,20,10,false)
Parameters:
iLeftsize on border to add on left in pixels.
iRightsize on border to add on right in pixels.
iTopsize on border to add on top in pixels.
iBottomsize on border to add on bottom in pixels.
ibBlacktrue to have black border, false for white.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::AdjustBCG ( double  iBrightness,
double  iContrast,
double  iGamma,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Change brightness + contrast + gamma correction, based on the RGB color model.

Optimizations: multicore, look up table.

Parameters:
iBrightnessbrightness coefficient in range -1.0, +1.0. 0.0 is neutral value.
iContrastcontrast coefficient in range -1.0, +1.0. 0.0 is neutral value.
iGammagamma value in range 0.001, +4.0. 1.0 is neutral value.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::AdjustBrightness ( double  iBrightness,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Change brightness on selected channels, based on the RGB color model.

Optimizations: multicore, look up table.

color.AdjustBrightnessLess.png

ramps.AdjustBrightnessLess.png

less brightness(-0.3)
color.original.png

ramps.original.png

original
color.AdjustBrightnessMore.png

ramps.AdjustBrightnessMore.png

more brightness(+0.3)
Parameters:
iBrightnessbrightness coefficient in range -1.0, +1.0. 0.0 is the neutral value.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::AdjustContrast ( double  iContrast,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Change contrast on selected channels, based on the RGB color model.

Optimizations: multicore, look up table.

color.AdjustContrastLess.png

ramps.AdjustContrastLess.png

less contrast(-0.4)
color.original.png

ramps.original.png

original
color.AdjustContrastMore.png

ramps.AdjustContrastMore.png

more contrast(+0.4)
Parameters:
iContrastcontrast coefficient in range -1.0, +1.0. 0.0 is the neutral value.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::AdjustGamma ( double  iGamma,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Gamma correction on selected channels, based on the RGB color model.

Optimizations: multicore, look up table.

color.AdjustGammaLess.png

ramps.AdjustGammaLess.png

gamma(0.5)
color.original.png

ramps.original.png

original
color.AdjustGammaMore.png

ramps.AdjustGammaMore.png

gamma(3.0)
Parameters:
iGammagamma value in range 0.001, +4.0. 1.0 is the neutral value.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::AdjustHueSaturation ( double  iHue,
double  iSaturation,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Adjust an image hue and a saturation.

Optimizations: multicore.

Parameters:
iHueHue in normalised range [0.0, 1.0].
iSaturationSaturation in normalised range [0.0, 1.0].
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::AdjustMidtone ( double  iMidtone,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Midtone curve on selected channels.

Optimizations: multicore, look up table.

color.AdjustMidtoneLess.png

ramps.AdjustMidtoneLess.png

Midtone(0.2)
color.original.png

ramps.original.png

original
color.AdjustMidtoneMore.png

ramps.AdjustMidtoneMore.png

Midtone(0.7)
Parameters:
iMidtonevalue in range 0.001, 0.999. 0.5 is neutral value.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::AdjustShadowHighlight ( double  iShadow = 0.0,
double  iHighlight = 1.0,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Shadow and highlight adjustment on selected channels.

Optimizations: multicore, look up table.

Parameters:
iShadowadjustment in range [0..1].
iHighlightadjustment in range [0..1].
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::AdjustSigmoid ( double  iAlpha,
double  iBeta,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Adjust Sigmoid curvon selected channels.

Optimizations: multicore, look up table.

color.AdjustSigmoid1.png

ramps.AdjustSigmoid1.png

Sigmoid(2.0, 0.25)
color.original.png

ramps.original.png

original
color.AdjustSigmoid2.png

ramps.AdjustSigmoid2.png

Sigmoid(0.5, 0.75)
Parameters:
iAlphascale factor in range [0.0, 10.0], 1.0 is neutral value.
iBetaoffset in range [0.0, 1.0], 0.5 is neutral value.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::ApplyAdaptiveMedian ( uint32  iWMax = 7,
uint32  iIteration = 1,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Adaptive Median filter on square window.

Based on Salt-and-Pepper Noise Removal by Median-type Noise Detectors and Detail-preserving Regularization.

Parameters:
iWMaxmax size of the median window.
iIterationnumber of iterations. Default is 1.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::ApplyBilateral ( double  iRadius = 1.5,
double  iVarianceSpatial = 2.0,
double  iVarianceRange = 20.0,
double  iBlend = 1.0,
EBorderFill  iBorder = BF_Nearest,
uint32  iIteration = 1,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Apply bilateral filter to an image by means of a nonlinear combination of nearby image values.


[1] Bilateral Filtering for Gray and Color Images
by C. Tomasi and R. Manduchi
[2] Fast Bilateral Filtering for the Display of High-Dynamic-Range Images
by Frédo Durand and Julie Dorsey
Laboratory for Computer Science, Massachusetts Institute of Technology
[3] SEPARABLE BILATERAL FILTERING FOR FAST VIDEO PREPROCESSING
by Tuan Q. Pham and Lucas J. van Vliet
Quantitative Imaging Group, Department of Imaging Science and Technology
Delft University of Technology
Parameters:
iRadiussize of squared Gaussian kernel, the higher the slower.
iVarianceSpatialvariance of Gaussian spatial filter.
iVarianceRangevariance of Gaussian range filter.
iBlendthe blending amount between the original (0.0) and the processed image (1.0). Default is 1.
ex: 0.25 means 25% of original + 75% of processed.
iBorderhow to fill border.
iIterationnumber of iterations. Default is 1.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::ApplyBoxBlur ( uint32  iWidth = 5,
uint32  iHeight = 5,
double  iBlend = 1.0,
EBorderFill  iBorder = BF_Nearest,
uint32  iIteration = 1,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Box blur filter, this is the blur filter with best performance with int64 kernel.


Implementation is based on this article:

[1]Fast Image Convolutions
by Wojciech Jarosz
SIGGRAPH 2001
Parameters:
iWidthkernel width.
iHeightkernel height.
iBorderhow to fill border.
iBlendthe blending amount between the original (0.0) and the processed image (1.0). Default is 1.
ex: 0.25 means 25% of original + 75% of processed.
iBorderhow to fill border.
iIterationnumber of iterations.
iChannelMaskselected channels to be processed. Default is all.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::ApplyCanny ( EEdgeDetector  iDetector,
EEdgeGradient  iGradient,
double  iRadius = 1.5,
double  iThresholdLo = 0.0,
double  iThresholdHi = 1.0,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Canny edge detection.

Parameters:
iDetectordetector type to detect edges.
iGradientgradient to apply. Allowed values are: GDS_Fast, GDS_Accurate, GDS_Max2, GDS_Max4.
iRadiusradius of the Gaussian blur filter.
iThresholdLolower pixel value.
iThresholdHihigher pixel value.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::ApplyCone ( double  iThresholdMin = 0.0,
double  iThresholdMax = 1.0,
double  iBlend = 1.0,
EBorderFill  iBorder = BF_Nearest,
uint32  iIteration = 1,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Apply smooth blurring filter to the current image.

Use a convolution processing with the normalized 5x5 cone kernel:

00100
02220
12521
02220
00100
Parameters:
iThresholdMinchannel value less then iThresholdMin is kept unchanged. Default is 0.
iThresholdMaxchannel value greater then iThresholdMax is kept unchanged. Default is 1.
iBlendthe blending amount between the original (0.0) and the processed image (1.0). Default is 1.
ex: 0.25 means 25% of original + 75% of processed.
iBorderhow to fill border.
iIterationnumber of iterations. Default is 1.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
Note:

thresholds.png
bool eLynx::Image::ImageVariant::ApplyGaussian ( uint32  iWidth,
uint32  iHeight,
double  iVariance,
double  iBlend = 1.0,
EBorderFill  iBorder = BF_Nearest,
uint32  iIteration = 1,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Gaussian filter smooths the current image by convolving a Gaussian kernel(iWidth,iHeight) with selected iVariance.

Parameters:
iWidthwidth of Gaussian kernel.
iHeightheight of Gaussian kernel.
iVariancevariance of Gaussian curve.
iBlendthe blending amount between the original (0.0) and the processed image (1.0). Default is 1.
ex: 0.25 means 25% of original + 75% of processed.
iBorderhow to fill border.
iIterationnumber of iterations. Default is 1.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::ApplyGaussian ( double  iRadius,
double  iVariance,
double  iBlend = 1.0,
EBorderFill  iBorder = BF_Nearest,
uint32  iIteration = 1,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Gaussian blur filter smooths the current image by convolving squared Gaussian kernel with selected iVariance.

Parameters:
iRadiussize of squared Gaussian kernel.
iVariancevariance of Gaussian curve.
iBlendthe blending amount between the original (0.0) and the processed image (1.0). Default is 1.
ex: 0.25 means 25% of original + 75% of processed.
iBorderhow to fill border.
iIterationnumber of iterations. Default is 1.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::ApplyGaussian ( double  iRadius,
double  iBlend = 1.0,
EBorderFill  iBorder = BF_Nearest,
uint32  iIteration = 1,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Gaussian blur filter smooths the current image by convolving squared Gaussian kernel with selected radius, Variance is computes as .

Parameters:
iRadiussize of squared Gaussian kernel.
iBlendthe blending amount between the original (0.0) and the processed image (1.0). Default is 1.
ex: 0.25 means 25% of original + 75% of processed.
iBorderhow to fill border.
iIterationnumber of iterations. Default is 1.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
virtual bool eLynx::Image::ImageVariant::ApplyGradient ( EEdgeDetector  iDetector,
EEdgeGradient  iGradient = EG_Fast,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
) [virtual]

Edge detection using gradient of filter.

Parameters:
iDetectordetector type to detect edges.
iGradientgradient to be computed.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::ApplyMarrHildreth ( EBorderFill  iBorder = BF_Nearest,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Marr-Hildreth filter detects edges.

Parameters:
iBorderhow to fill border.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::ApplyMean ( double  iRadius,
bool  ibCircular = true,
double  iThresholdMin = 0.0,
double  iThresholdMax = 1.0,
double  iBlend = 1.0,
EBorderFill  iBorder = BF_Nearest,
uint32  iIteration = 1,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Mean filter smooths the current image by replacing each pixel with the neighborhood mean.

Use a convolution processing with a normalized kernel of all 1 in a square or a circle of the selected radius and 0 otherwise.

11111
11111
11111
11111
11111

square & radius=3
01110
11111
11111
11111
01110

circle & radius=3
Parameters:
iRadiusThe size of the neighborhood.
ibCircularuse circular (true) or square (false) kernel.
iThresholdMinchannel value less then iThresholdMin is kept unchanged. Default is 0.
iThresholdMaxchannel value greater then iThresholdMax is kept unchanged. Default is 1.
iBlendthe blending amount between the original (0.0) and the processed image (1.0). Default is 1.
ex: 0.25 means 25% of original + 75% of processed.
iBorderhow to fill border.
iIterationnumber of iterations. Default is 1.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
Note:

thresholds.png
bool eLynx::Image::ImageVariant::ApplyMedian ( uint32  iWidth = 3,
uint32  iIteration = 1,
bool  ibCircular = true,
bool  ibLuminance = true,
double  iBlend = 1.0,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Median filter reduces salt and pepper noise replacing each pixel with the median of the neighboring pixel.

Parameters:
iWidthwidth of squared local area.
iIterationnumber of iterations. Default is 1.
ibCircularfalse to use square kernel, true to use circular.
ibLuminancetrue to sort pixels using by luminance, false to process each channel as grey.
iBlendthe blending amount between the original (0.0) and the processed image (1.0). Default is 1.
ex: 0.25 means 25% of original + 75% of processed.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::ApplyMorphological ( EMorphologicalFilterType  iType,
uint32  iWidth = 3,
bool  ibCircular = true,
bool  ibLuminance = true,
uint32  iIteration = 1,
double  iBlend = 1.0,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Morphological filter with squared or circular kernel.

Parameters:
iTypeMorphological filter type.
iWidthwidth of squared local area.
ibCircularfalse to use square kernel, true to use circular.
ibLuminancetrue to sort pixels using by luminance, false to process each channel as grey.
iIterationnumber of iterations. Default is 1.
iBlendthe blending amount between the original (0.0) and the processed image (1.0). Default is 1.
ex: 0.25 means 25% of original + 75% of processed.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::ApplyPyramidal ( double  iThresholdMin = 0.0,
double  iThresholdMax = 1.0,
double  iBlend = 1.0,
EBorderFill  iBorder = BF_Nearest,
uint32  iIteration = 1,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Apply smooth blurring filter to the current image.

Use a convolution processing with the normalized 5x5 pyramidal kernel:

12321
24642
36963
24642
12321
Parameters:
iThresholdMinchannel value less then iThresholdMin is kept unchanged. Default is 0.
iThresholdMaxchannel value greater then iThresholdMax is kept unchanged. Default is 1.
iBlendthe blending amount between the original (0.0) and the processed image (1.0). Default is 1.
ex: 0.25 means 25% of original + 75% of processed.
iBorderhow to fill border.
iIterationnumber of iterations. Default is 1.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
Note:

thresholds.png
bool eLynx::Image::ImageVariant::ApplyRoberts ( bool  ibFast = true,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Roberts Cross 2x2 edge detection.

Parameters:
ibFasttrue to use fast approximation.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::ApplyRotationalGradient ( double  iXc,
double  iYc,
double  iRadialShift,
double  iRotationalShift,
bool  ibInterpolation = true,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

LARSON-SEKANINA filter filter.

Based on The Larsen-Secanina Filter.

Parameters:
iXcnormalized x center of rotation.
iYcnormalized y center of rotation.
iRadialShiftradial shift in ALU.
iRotationalShiftrotational shift in degrees.
ibInterpolationinterpolation required.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::ApplySegmentation ( double  iStep,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Image Segmentation by morphological watersheds.

See Image Segmentation.

Parameters:
iStepflood increment.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::ApplySmooth ( double  iThresholdMin = 0.0,
double  iThresholdMax = 1.0,
double  iBlend = 1.0,
EBorderFill  iBorder = BF_Nearest,
uint32  iIteration = 1,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Apply smooth blurring filter to the current image.

Use a convolution processing with the normalized 3x3 smooth kernel:

111
141
111
Parameters:
iThresholdMinchannel value less then iThresholdMin is kept unchanged. Default is 0.
iThresholdMaxchannel value greater then iThresholdMax is kept unchanged. Default is 1.
iBlendthe blending amount between the original (0.0) and the processed image (1.0). Default is 1.
ex: 0.25 means 25% of original + 75% of processed.
iBorderhow to fill border.
iIterationnumber of iterations. Default is 1.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
Note:

thresholds.png
bool eLynx::Image::ImageVariant::ApplyZeroCrossing ( double  iRadius,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Zero Crossing edge detection.

Parameters:
iRadiusradius of the Laplacian of Gaussian kernel. Recommended 3.0 or greater
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
void eLynx::Image::ImageVariant::Assign ( boost::shared_ptr< AbstractImage > &  ipsAbstractImpl )

Aggregation transfert of implemented abstract image.

Parameters:
ipsAbstractImplthe abstract image implementation to be aggregated by this.
bool eLynx::Image::ImageVariant::AutoCrop (  )

Automatic crop of the image.

Returns:
Method running status.
bool eLynx::Image::ImageVariant::Balance ( double  iRed,
double  iGreen,
double  iBlue,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

The Color Balance allows you to adjust the overall mixture of the colors, based on the RGB color model.

Optimizations: multicore, look up table.

color.original.png

ramps.original.png

original
color.Balance.png

ramps.Balance.png

Balance(0.8, 1.1, 0.5)

In example with RGB image: red channel is scaled by 0.8, green by 1.1 and blue by 0.5.

Parameters:
iRedthe red factor.
iGreenthe green factor.
iBluethe blue factor.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
boost::shared_ptr<IPixelIterator> eLynx::Image::ImageVariant::Begin (  )

Returns an iterator pointing to the beginning of the Pixel map.

Returns:
an iterator pointing to the beginning of the Pixel map
boost::shared_ptr<IPixelIterator> eLynx::Image::ImageVariant::Begin (  ) const

Returns an const iterator pointing to the beginning of the Pixel map.

Returns:
an const iterator pointing to the beginning of the Pixel map
bool eLynx::Image::ImageVariant::Bin2x2 ( EBinningMethod  iMethod = BM_Mean,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Apply binning 2x2 to an image.

color.original.png

Original
color.Bin2x2AVG.png

Bin(2,BI_AVG)
color.Bin2x2SUM.png

Bin(2,BI_SUM)
Parameters:
iMethodBinning method.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::Bin3x3 ( EBinningMethod  iMethod = BM_Mean,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Apply binning 3x3 to an image.

color.original.png

Original
color.Bin3x3AVG.png

Bin(3,BI_AVG)
color.Bin3x3SUM.png

Bin(3,BI_SUM)
Parameters:
iMethodBinning method.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::Blend ( const ImageVariant iImage,
double  iScalar,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Blend with another image by a scalar in range [0..1].

Resulting image is computed as: Notes that iImage should have the same sizes and format as this, otherwise it fails and this is kept unchanged. Optimizations: multicore.

Parameters:
ioImagefirst and output image.
iImagesecond image to be blend with the first.
iScalarBlending scalar in range [0..1].
iChannelMaskselected channels to be processed. Default is all.
iNotifiera notifier for progression, log and cancel.
bool eLynx::Image::ImageVariant::CanLoad ( const char *  iprFilename,
ImageFileInfo oprInfo = NULL,
bool  ibPreview = false 
) const

Check is the file is supported by the manager for loading and get file informations.

Parameters:
iprFilenameThe filename of the file to check.
oprInfoInformations that could be retrieved from file.
ibPreviewSet to true if preview is requested in informations.
Returns:
true if file can be loaded, false otherwise.

Note: See Supported Image File Format plugins before using it.

bool eLynx::Image::ImageVariant::CanSave ( const char *  iprFilename ) const

Check is the image can be saved using file format given by extension in filename.

Parameters:
iprFilenameThe image filename for format.
Returns:
true if image can be exported, false otherwise.

Note: See Supported Image File Format plugins before using it.

bool eLynx::Image::ImageVariant::ChangeResolution ( EResolution  iResolution,
bool  ibScaled = true 
)

Change the image resolution when possible.


Parameters:
iResolutionThe requested new resolution:

  • RT_Undefined for PF_Undefined
  • RT_UINT8 for PF_L*, PF_LA*, PF_RGB* and PF_RGBA*
  • RT_UINT16 for PF_L*, PF_LA*, PF_RGB* and PF_RGBA*
  • RT_INT32 for PF_L*, PF_LA*, PF_RGB*, PF_RGBA* and PF_CPLX*
  • RT_Float for all
  • RT_Double for all
  • Other resolutions aren't supported.
ibScaledtrue for scale to full range, false for simple cast.
Returns:
true if image resolution as been changed.
bool eLynx::Image::ImageVariant::Close ( uint32  iWidth = 3,
bool  ibCircular = true,
bool  ibLuminance = true,
uint32  iIteration = 1,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Open filter performs an Erode followed by Dilate filters.

This smoothes objects and removes isolated pixels.

Parameters:
iWidthwidth of squared local area.
ibCircularfalse to use square kernel, true to use circular.
ibLuminancetrue to sort pixels using by luminance, false to process each channel as grey.
iIterationnumber of iterations. Default is 1.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::Colorize ( double  iHue,
double  iSaturation,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Colorize an image setting a hue and a saturation.

Optimizations: multicore.

color.original.png

ramps.original.png

original
color.Colorize.png

ramps.Colorize.png

Colorize(0.10, 0.54) with Sepia tone
Parameters:
iHueHue in normalised range [0.0, 1.0].
iSaturationSaturation in normalised range [0.0, 1.0].
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::ComputeMax ( double &  oMax,
bool  ibNormalized 
) const

Compute max value of image samples.

Parameters:
oMaxthe output max value of image samples.
ibNormalizedtrue to have value normalised in range[0.0, 1.0].
Returns:
Error status.
bool eLynx::Image::ImageVariant::ComputeMax ( double(&)  oMax[PC_MAX],
bool  ibNormalized 
) const

Compute max value per channels of image samples.

Parameters:
oMaxthe output max value per channels of image samples.
ibNormalizedtrue to have value normalised in range[0.0, 1.0].
Returns:
Error status.
bool eLynx::Image::ImageVariant::ComputeMean ( double &  oMean,
bool  ibNormalized = true 
) const

Compute the mean value of image samples.


Mean is: sum of pixel's channels / (number of pixels * number of channel per pixel).

Parameters:
oMeanthe output max value of image samples.
ibNormalizedtrue to have value normalised in range[0.0, 1.0].
Returns:
Error status.
bool eLynx::Image::ImageVariant::ComputeMean ( double(&)  oMean[PC_MAX],
bool  ibNormalized = true 
) const

Compute the mean value per channels of image samples.


Mean is: sum of channel value per pixel / number of pixels.

Parameters:
oMeanthe output max value of image samples.
ibNormalizedtrue to have value normalised in range[0.0, 1.0].
Returns:
Error status.
bool eLynx::Image::ImageVariant::ComputeMin ( double(&)  oMin[PC_MAX],
bool  ibNormalized 
) const

Compute min values per channels of image samples.

Parameters:
oMinthe output min value per channels of image samples.
ibNormalizedtrue to have value normalised in range[0.0, 1.0].
Returns:
Error status.
bool eLynx::Image::ImageVariant::ComputeMin ( double &  oMin,
bool  ibNormalized 
) const

Compute min value of image samples.

Parameters:
oMinthe output min value of image samples.
ibNormalizedtrue to have value normalised in range[0.0, 1.0].
Returns:
Error status.
bool eLynx::Image::ImageVariant::ComputeMinMax ( double(&)  oMin[PC_MAX],
double(&)  oMax[PC_MAX],
bool  ibNormalized 
) const

Compute min and max values per channels of image samples in one pass.

Parameters:
oMinthe output min value per channels of image samples.
oMaxthe output max value per channels of image samples.
ibNormalizedtrue to have value normalised in range[0.0, 1.0].
Returns:
Error status.
bool eLynx::Image::ImageVariant::ComputeMinMax ( double &  oMin,
double &  oMax,
bool  ibNormalized = true 
) const

Compute min and max values of image samples in one pass.

Parameters:
oMinthe output min value of image samples.
oMaxthe output max value of image samples.
ibNormalizedtrue to have value normalised in range[0.0, 1.0].
Returns:
Error status.
bool eLynx::Image::ImageVariant::Convolve ( const Math::ConvolutionKerneld iKernel,
bool  ibAbsolute = false,
EBorderFill  iBorder = BF_Nearest,
uint32  iIteration = 1,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Convolve with a kernel.

Parameters:
iKernelthe convolution kernel.
ibAbsolutetrue to use absolute value of convolution, false otherwise.
iBorderhow to fill border.
iIterationnumber of iterations. Default is 1.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::Convolve ( const Math::ConvolutionKerneld iKernel,
double  iThresholdMin,
double  iThresholdMax,
bool  ibAbsolute = false,
EBorderFill  iBorder = BF_Nearest,
uint32  iIteration = 1,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Convolve with a kernel.

Parameters:
iKernelthe convolution kernel.
iThresholdMinchannel value less then iThresholdMin is kept unchanged. Default is 0.
iThresholdMaxchannel value greater then iThresholdMax is kept unchanged. Default is 1.
ibAbsolutetrue to use absolute value of convolution, false otherwise.
iBorderhow to fill border.
iIterationnumber of iterations. Default is 1.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
Note:

thresholds.png
bool eLynx::Image::ImageVariant::Convolve ( const Math::ConvolutionKerneld iKernel,
double  iThresholdMin,
double  iThresholdMax,
double  iBlend = 1.0,
bool  ibAbsolute = false,
EBorderFill  iBorder = BF_Nearest,
uint32  iIteration = 1,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Convolve with a kernel.

Parameters:
iKernelthe convolution kernel.
iThresholdMinchannel value less then iThresholdMin is keep unchanged.
iThresholdMaxchannel value greater then iThresholdMax is keep unchanged.
iBlendthe blending amount between the original (0.0) and the processed image (1.0). Default is 1.
ex: 0.25 means 25% of original + 75% of processed.
ibAbsolutetrue to use absolute value of convolution, false otherwise.
iBorderhow to fill border.
iIterationnumber of iterations. Default is 1.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status. Note:
thresholds.png
bool eLynx::Image::ImageVariant::Convolve ( const Math::ConvolutionKerneld iKernel1,
const Math::ConvolutionKerneld iKernel2,
EBorderFill  iBorder = BF_Nearest,
uint32  iIteration = 1,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Convolve with two separable kernels [Wx1] x [1xH].

Greatly improve performance compare to convolution with [WxH] filter.

Parameters:
iKernel1a convolution kernel [Wx1] or [1xH].
iKernel2a convolution kernel, if iKernel1 is [Wx1] must be [1xH], else [Wx1].
iBorderhow to fill border.
iIterationnumber of iterations. Default is 1.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::Crop ( uint32  iX,
uint32  iY,
uint32  iWidth,
uint32  iHeight,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Crop image.

color.original.png

Original
color.Crop.png

Crop(40,20, 100,50)
Parameters:
iXx position of top left point in image.
iYy position of top left point in image.
iWidthwidth image after crop.
iHeightheight image after crop.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::Debloom ( uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Debloom an image.

Parameters:
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::Desaturate ( double  iFactor,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Adjust the Saturation by a multiplier factor, based on the HLS color model.

Optimizations: multicore.

Parameters:
iFactorsaturation multiplier factor.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::Despeckle ( uint32  iWidth = 3,
bool  ibCircular = true,
bool  ibLuminance = true,
uint32  iIteration = 1,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Despeckle filter is a median filter.

It reduces noise in the active image by replacing each pixel with the median of the neighboring pixel values.

Parameters:
iWidthwidth of squared local area.
ibCircularfalse to use square kernel, true to use circular.
ibLuminancetrue to sort pixels using by luminance, false to process each channel as grey.
iIterationnumber of iterations. Default is 1.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::Dilate ( uint32  iWidth = 3,
bool  ibCircular = true,
bool  ibLuminance = true,
uint32  iIteration = 1,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Dilate filter adds pixels to the edges of black objects.

It replaces each pixel in the image with the largest pixel value in that pixel's neighborhood.

Parameters:
iWidthwidth of squared local area.
ibCircularfalse to use square kernel, true to use circular.
ibLuminancetrue to sort pixels using by luminance, false to process each channel as grey.
iIterationnumber of iterations. Default is 1.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
boost::shared_ptr<IPixelIterator> eLynx::Image::ImageVariant::End (  )

Returns an iterator pointing to the end of the Pixel map.

Returns:
an iterator pointing to the end of the Pixel map
boost::shared_ptr<IPixelIterator> eLynx::Image::ImageVariant::End (  ) const

Returns an const iterator pointing to the end of the Pixel map.

Returns:
an const iterator pointing to the end of the Pixel map
bool eLynx::Image::ImageVariant::Erode ( uint32  iWidth = 3,
bool  ibCircular = true,
bool  ibLuminance = true,
uint32  iIteration = 1,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Erode filter removes pixels from the edges of black objects.

It replaces each pixel in the image with the smallest pixel value in that pixel's neighborhood.

Parameters:
iWidthwidth of squared local area.
ibCircularfalse to use square kernel, true to use circular.
ibLuminancetrue to sort pixels using by luminance, false to process each channel as grey.
iIterationnumber of iterations. Default is 1.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::ExemplarBasedInpaint ( const ImageVariant iBinaryMask,
const Math::AOBBox2i iSearchArea,
uint32  iPatchSize,
bool  iUseRegion,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Implementation of Region Filling and Object Removal by Exemplar-Based Image Inpainting article.


Inpainting algorithm to remove int64 objects from images. The algorithm propagets texture and structure into the inpainting region by filling best-fit patches in the order based on the confidence level.

[1]Region Filling and Object Removal by Exemplar-Based Image Inpainting
SEP 2004
by A. Criminisi*, P. Pérez and K. Toyama
Microsoft Research, Cambridge (UK) and Redmond (US)
IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 13, NO. 9
Parameters:
iBinaryMaskimage bitmap. The pixel's value is either IPT_UNKNOWN for pixels to be inpainted or IPT_KNOWN for known pixels.
iSearchAreabounding box to restrict the image area which would be searched for the patches to fill.
iPatchSizesize of the patch. Min value is 3.
iUseRegionflag to use optimizations to inpaint only localized regions. Caution: Some images produce better results without this optimization.
iChannelMaskselected channels to be processed. Default is all.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::FastInpaint ( const ImageVariant iBinaryMask,
bool  iUseRegion,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Implementation of Fast Digital Image Inpainting article.

[1]Fast Digital Image Inpainting
September 3, 2001
by Manuel M. Oliveira, Brian Bowen, Richard McKenna and Yu-Sung Chang
Department of Computer Science
State University of New York at Stony Brook

Very simple inpainting algorithm based on the convolution of the small image region to be restored which is equivalent to the isotropic diffusion. The convolution kernel is a weighted average 3x3 kernel with a zero weight at the center.

Parameters:
iBinaryMaskimage bitmap. The pixel's value is either IPT_UNKNOWN for pixels to be inpainted or IPT_KNOWN for known pixels.
iUseRegionflag to use optimizations to inpaint only localized regions. Caution: Some images produce better results without this optimization.
iChannelMaskselected channels to be processed. Default is all.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::FastMarchingInpaint ( const ImageVariant iBinaryMask,
uint32  iSize,
bool  iUseRegion,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Implementation of An Image Inpainting Technique Based on the Fast Marching Method article.

[1]An Image Inpainting Technique Based on the Fast Marching Method
May 21, 2003
by Alexandru Telea
Eindhoven University of Technology

Simple inpainting algorithm based on the Fast Marching Method (FMM). Pixels are inpainted in the order based on the distance to the know area.

Parameters:
iBinaryMaskimage bitmap. The pixel's value is either IPT_UNKNOWN for pixels to be inpainted or IPT_KNOWN for known pixels .
iSizesize of the pixel's neighborhood. Min value is 3.
iUseRegionflag to use optimizations to inpaint only localized regions. Caution: Some images produce better results without this optimization.
iChannelMaskselected channels to be processed. Default is all.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::Flip ( EFlipPlane  iFlipPlane,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Perform symmetry of an image.

color.FlipH.png

Flip(FP_Horizontal)
color.original.png

Original
color.FlipV.png

Flip(FP_Vertical)
Parameters:
iFlipPlaneflip plane for symetry.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::FlipHorizontal ( ProgressNotifier iNotifier = ProgressNotifier_NULL )

Perform horizontal symmetry of an image.

color.original.png

Original
color.FlipH.png

FlipHorizontal
Parameters:
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::FlipVertical ( ProgressNotifier iNotifier = ProgressNotifier_NULL )

Perform vertical symmetry of an image.

color.original.png

Original
color.FlipV.png

FlipVertical
Parameters:
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
EBayerMatrix eLynx::Image::ImageVariant::GetBayerMatrix (  ) const

Get the image Bayer matrix.

Bayer matrix is only available for image in L format.

Returns:
The Bayer matrix of image. BM_None means not using Color Field Array.
uint32 eLynx::Image::ImageVariant::GetBitsPerPixel (  ) const

Retrieve the number of bits per pixel.

Returns:
The number of bits per pixel. It's the number of channel x the channel resolu
uint32 eLynx::Image::ImageVariant::GetChannelCount (  ) const

Retrieve the number of channel.

Returns:
The number of channel is based on the pixel format:
  • 0 for PF_Undefined
  • 1 for PF_Lub, PF_Lus, PF_Li, PF_Lf and PF_Ld
  • 2 for PF_LAub, PF_LAus, PF_LAi, PF_LAf, PF_LAd, PF_CPLXi, PF_CPLXf and PF_CPLXd
  • 3 for PF_RGBub, PF_RGBus, PF_RGBi, PF_RGBf, PF_RGBd, PF_HLSf, PF_HLSd, PF_XYZf, PF_XYZd, PF_Luvf, PF_Luvd, PF_Labf, PF_Labd, PF_Lchf, PF_Lchd, PF_HLabf and PF_HLabd
  • 4 for PF_RGBAub, PF_RGBAus, PF_RGBAi, PF_RGBAf and PF_RGBAd
EColorSpace eLynx::Image::ImageVariant::GetColorSpace (  ) const

Retrieve the pixel color space.

Returns:
The color space is based on the pixel format and the Bayer matrix value:
  • CS_Undefined for PF_Lub, PF_Lus, PF_Li, PF_Lf and PF_Ld with Bayer matrix set to BM_None
  • CS_RGB for PF_Lub, PF_Lus, PF_Li, PF_Lf and PF_Ld with Bayer matrix NOT set to BM_None
  • CS_Undefined for PF_LAub, PF_LAus, PF_LAi, PF_LAf and PF_LAd
  • CS_Undefined for PF_CPLXi, PF_CPLXf and PF_CPLXd
  • CS_RGB for PF_RGBub, PF_RGBus, PF_RGBi, PF_RGBf and PF_RGBd
  • CS_RGB for PF_RGBAub, PF_RGBAus, PF_RGBAi, PF_RGBAf and PF_RGBAd
  • CS_HLS for PF_HLSf and PF_HLSd
  • CS_CIE_XYZ for PF_XYZf and PF_XYZd
  • CS_CIE_Luv for PF_Luvf and PF_Luvd
  • CS_CIE_Lab for PF_Labf and PF_Labd
  • CS_CIE_Lch for PF_Lchf and PF_Lchd
  • CS_Hunter_Lab for PF_HLabf and PF_HLabd
uint32 eLynx::Image::ImageVariant::GetHeight (  ) const

Retrieve the image height in pixels.

Returns:
The image height in pixels.
boost::shared_ptr<AbstractImage> eLynx::Image::ImageVariant::GetImpl (  )

Retrieve pointeur to implemented abstract image.

Returns:
The read/write reference pointer the to specialized image.
boost::shared_ptr<const AbstractImage> eLynx::Image::ImageVariant::GetImpl (  ) const

Retrieve const pointeur to implemented abstract image.

Returns:
The read reference pointer to the specialized image.
uint32 eLynx::Image::ImageVariant::GetPixelCount (  ) const

Compute the number of pixel for whole image.

Returns:
The number of pixels in image.
EPixelFormat eLynx::Image::ImageVariant::GetPixelFormat (  ) const

Retrieve pixel format.

Returns:
The pixel format of the image, see EPixelFormat.
EPixelMode eLynx::Image::ImageVariant::GetPixelMode (  ) const

Retrieve the pixel mode.

Returns:
The pixel mode, EPixelMode.
EPixelType eLynx::Image::ImageVariant::GetPixelType (  ) const

Retrieve the pixel type.

Returns:
The pixel type, EPixelType.
bool eLynx::Image::ImageVariant::GetPlane ( uint32  iPlane,
ImageVariant oPlane,
bool  ibScaled = true 
) const

Build a grey image from a plane of this.

Parameters:
iPlanethe plane index from 0 to 3.
oPlanethe grey image filled with the selected plane.
ibScaledtrue for scale to full range, false for simple cast.
Returns:
true if plane has been retrieve, false otherwise.
bool eLynx::Image::ImageVariant::GetPlane ( const ImageVariant iImage,
uint32  iPlane,
bool  ibScaled = true 
)

Build an image from a plane of another image.

Parameters:
iImagethe source image to get plane.
iPlanethe plane index from 0 to 3.
ibScaledtrue for scale to full range, false for simple cast.
Returns:
true if plane has been retrieve, false otherwise.
EResolution eLynx::Image::ImageVariant::GetResolution (  ) const

Retrieve the image component resolution.


Returns:
The image component resolution is based on the pixel format:
  • RT_Undefined for PF_Undefined
  • RT_UINT8 for PF_Lub, PF_LAub, PF_RGBub and PF_RGBAub
  • RT_UINT16 for PF_Lus, PF_LAus, PF_RGBus and PF_RGBAus
  • RT_INT32 for PF_Li, PF_LAi, PF_RGBi, PF_RGBAi and PF_CPLXi
  • RT_Float for PF_Lf, PF_LAf, PF_RGBf, PF_RGBAf, PF_CPLXf, PF_HLSf, PF_XYZf, PF_Luvf, PF_Labf, PF_Lchf and HLabf
  • RT_Double for PF_Ld, PF_LAd, PF_RGBd, PF_RGBAd, PF_CPLXd, PF_HLSd, PF_XYZd, PF_Luvd, PF_Labd, PF_Lchd and HLabd
uint32 eLynx::Image::ImageVariant::GetSampleCount (  ) const

Retrieve the number of samples for whole map.

Returns:
The the number of samples for whole map.
bool eLynx::Image::ImageVariant::GetSubImage ( const ImageVariant iImage,
uint32  iX,
uint32  iY,
uint32  iWidth,
uint32  iHeight,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

GetSubImage get an sub-area from an external image.

Parameters:
iImagesource image.
iXx position of top left point of subimage in image.
iYy position of top left point of subimage in image.
iWidthwidth of sub-image.
iHeightheight of sub-image.
iNotifiera notifier for progression and cancel.
Returns:
Method running status.
uint32 eLynx::Image::ImageVariant::GetWidth (  ) const

Retrieve the image width in pixels.

Returns:
The image width in pixels.
bool eLynx::Image::ImageVariant::HasAlpha (  ) const

Retrieve if image has an alpha channel.

Returns:
true for LA and RGBA images, false otherwise.
bool eLynx::Image::ImageVariant::Insert ( const ImageVariant iImage,
int32  iX,
int32  iY,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Insert an sub-image at selected position.

Parameters:
iImageimage to be inserted.
iXx position of top left point in image.
iYy position of top left point in image.
iNotifiera notifier for progression and cancel.
Returns:
Method running status.
void eLynx::Image::ImageVariant::Invalidate ( bool  ibRelease = true )

Invalidate image.

After this call method IsValid() return false.

Parameters:
ibReleasetrue to release image implementation aggregation, false to reset to NULL.
bool eLynx::Image::ImageVariant::IsBayer (  ) const

Get if image is encoded using color field array (CFA), ie with a Bayer matrix.

Returns:
true is image has Bayer matrix different from BM_None, false otherwise.
bool eLynx::Image::ImageVariant::IsColor (  ) const

Retrieve if image is a color type.

Returns:
true for RGB, RGBA, HLS, CIE XYZ, CIE Lub, CIE Lab, CIE Lch and Hunter Lab images, false otherwise.

Note: Grey image L with a Bayer matrix NOT egal to BM_None is considered as a RGB image so return true.

bool eLynx::Image::ImageVariant::IsComplex (  ) const

Retrieve if image is a complex type.

Returns:
true for images with pixel format PF_CPLXi, PF_CPLXf or PF_CPLXd, false otherwise.
bool eLynx::Image::ImageVariant::IsComplexd (  ) const

Retrieve if image has PF_CPLXd pixel format.

Returns:
true for images with PF_CPLXd pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsComplexf (  ) const

Retrieve if image has PF_CPLXf pixel format.

Returns:
true for images with PF_CPLXf pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsComplexi (  ) const

Retrieve if image has PF_CPLXi pixel format.

Returns:
true for images with PF_CPLXi pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsDouble (  ) const

Retrieve if image has RT_Double resolution (64 bits floating point).

Returns:
true for RT_Double resolution images, false otherwise.
bool eLynx::Image::ImageVariant::IsFloat (  ) const

Retrieve if image has RT_Float resolution (32 bits floating point).

Returns:
true for RT_Float resolution images, false otherwise.
bool eLynx::Image::ImageVariant::IsGrey (  ) const

Retrieve if image is a grey type.

Returns:
true for L and LA images, false otherwise.

Note: Grey image L with a Bayer matrix NOT egal to BM_None is considered as a RGB image so return false.

bool eLynx::Image::ImageVariant::IsHLab (  ) const

Retrieve if image is of Hunter Lab format.

Returns:
true for HLab images, false otherwise.
bool eLynx::Image::ImageVariant::IsHLabd (  ) const

Retrieve if image has PF_HLabd pixel format.

Returns:
true for images with PF_HLabd pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsHLabf (  ) const

Retrieve if image has PF_HLabf pixel format.

Returns:
true for images with PF_HLabf pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsHLS (  ) const

Retrieve if image is of HLS format.

Returns:
true for HLS images, false otherwise.
bool eLynx::Image::ImageVariant::IsHLSd (  ) const

Retrieve if image has PF_HLSd pixel format.

Returns:
true for images with PF_HLSd pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsHLSf (  ) const

Retrieve if image has PF_HLSf pixel format.

Returns:
true for images with PF_HLSf pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsInt32 (  ) const

Retrieve if image has RT_INT32 resolution (32 bits signed).

Returns:
true for RT_INT32 resolution images, false otherwise.
bool eLynx::Image::ImageVariant::IsL (  ) const

Retrieve if image has a luminance channel only.

Note: Grey image L with a Bayer matrix not egal to BM_None is considered as a RGB image and return true.

Returns:
true for L images, false otherwise.
bool eLynx::Image::ImageVariant::IsLA (  ) const

Retrieve if image has a luminance and an alpha channels.

Returns:
true for LA images, false otherwise.
bool eLynx::Image::ImageVariant::IsLab (  ) const

Retrieve if image is of CIE Lab format.

Returns:
true for Lab images, false otherwise.
bool eLynx::Image::ImageVariant::IsLabd (  ) const

Retrieve if image has PF_Labd pixel format.

Returns:
true for images with PF_Labd pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsLabf (  ) const

Retrieve if image has PF_Labf pixel format.

Returns:
true for images with PF_Labf pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsLAd (  ) const

Retrieve if image has PF_LAd pixel format.

Returns:
true for images with PF_LAd pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsLAf (  ) const

Retrieve if image has PF_LAf pixel format.

Returns:
true for images with PF_LAf pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsLAi (  ) const

Retrieve if image has PF_LAi pixel format.

Returns:
true for images with PF_LAi pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsLAub (  ) const

Retrieve if image has PF_LAub pixel format.

Returns:
true for images with PF_LAub pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsLAus (  ) const

Retrieve if image has PF_LAus pixel format.

Returns:
true for images with PF_LAus pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsLch (  ) const

Retrieve if image is of CIE Lch format.

Returns:
true for Lch images, false otherwise.
bool eLynx::Image::ImageVariant::IsLchd (  ) const

Retrieve if image has PF_Lchd pixel format.

Returns:
true for images with PF_Lchd pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsLchf (  ) const

Retrieve if image has PF_Lchf pixel format.

Returns:
true for images with PF_Lchf pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsLd (  ) const

Retrieve if image has PF_Ld pixel format.

Returns:
true for images with PF_Ld pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsLf (  ) const

Retrieve if image has PF_Lf pixel format.

Returns:
true for images with PF_Lf pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsLi (  ) const

Retrieve if image has PF_Li pixel format.

Returns:
true for images with PF_Li pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsLub (  ) const

Retrieve if image has PF_Lub pixel format.

Returns:
true for images with PF_Lub pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsLus (  ) const

Retrieve if image has PF_Lus pixel format.

Returns:
true for images with PF_Lus pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsLuv (  ) const

Retrieve if image is of CIE Luv format.

Returns:
true for Luv images, false otherwise.
bool eLynx::Image::ImageVariant::IsLuvd (  ) const

Retrieve if image has PF_Luvd pixel format.

Returns:
true for images with PF_Luvd pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsLuvf (  ) const

Retrieve if image has PF_Luvf pixel format.

Returns:
true for images with PF_Luvf pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsMasking ( uint32  iChannelMask ) const

Retrieve if selected channel mask contains a channel of image.

Parameters:
iChannelMaskThe channel mask.
Returns:
true if at least one channel of the image is activated in mask, false otherwise.
bool eLynx::Image::ImageVariant::IsRGB (  ) const

Retrieve if image is of RGB format.

Returns:
true for RGB images, false otherwise.
bool eLynx::Image::ImageVariant::IsRGBA (  ) const

Retrieve if image is of RGBA format.

Returns:
true for RGBA images, false otherwise.
bool eLynx::Image::ImageVariant::IsRGBAd (  ) const

Retrieve if image has PF_RGBAd pixel format.

Returns:
true for images with PF_RGBAd pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsRGBAf (  ) const

Retrieve if image has PF_RGBAi pixel format.

Returns:
true for images with PF_RGBAi pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsRGBAi (  ) const

Retrieve if image has PF_RGBAi pixel format.

Returns:
true for images with PF_RGBAi pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsRGBAub (  ) const

Retrieve if image has PF_RGBAub pixel format.

Returns:
true for images with PF_RGBAub pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsRGBAus (  ) const

Retrieve if image has PF_RGBAus pixel format.

Returns:
true for images with PF_RGBAus pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsRGBd (  ) const

Retrieve if image has PF_RGBd pixel format.

Returns:
true for images with PF_RGBd pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsRGBf (  ) const

Retrieve if image has PF_RGBf pixel format.

Returns:
true for images with PF_RGBf pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsRGBi (  ) const

Retrieve if image has PF_RGBi pixel format.

Returns:
true for images with PF_RGBi pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsRGBub (  ) const

Retrieve if image has PF_RGBub pixel format.

Returns:
true for images with PF_RGBub pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsRGBus (  ) const

Retrieve if image has PF_RGBus pixel format.

Returns:
true for images with PF_RGBus pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsUInt16 (  ) const

Retrieve if image has RT_UINT16 resolution (16 bits unsigned).

Returns:
true for RT_UINT16 resolution images, false otherwise.
bool eLynx::Image::ImageVariant::IsUInt8 (  ) const

Retrieve if image has RT_UINT8 resolution (8 bits unsigned).

Returns:
true for RT_UINT8 resolution images, false otherwise.
bool eLynx::Image::ImageVariant::IsValid (  ) const

Check image validity.

Returns:
true image is valid, false otherwise.
bool eLynx::Image::ImageVariant::IsXYZ (  ) const

Retrieve if image is of CIE XYZ format.

Returns:
true for XYZ images, false otherwise.
bool eLynx::Image::ImageVariant::IsXYZd (  ) const

Retrieve if image has PF_XYZd pixel format.

Returns:
true for images with PF_XYZd pixel format, false otherwise.
bool eLynx::Image::ImageVariant::IsXYZf (  ) const

Retrieve if image has PF_XYZf pixel format.

Returns:
true for images with PF_XYZf pixel format, false otherwise.
bool eLynx::Image::ImageVariant::Load ( const char *  iprFilename,
ImageFileInfo oprInfo = NULL,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Load an ImageVariant from a filename.

Parameters:
iprFilenameThe image filename to load.
oprInfoInformations that could be retrieved from file.
iNotifiera notifier for progression, log and cancel.
Returns:
true if image has been loaded, false otherwise.

Note: See Supported Image File Format plugins before using it.

bool eLynx::Image::ImageVariant::Normalize ( uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Normalize an image.

Parameters:
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::Open ( uint32  iWidth = 3,
bool  ibCircular = true,
bool  ibLuminance = true,
uint32  iIteration = 1,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Open filter performs an Erode followed by Dilate filters.

This smoothes objects and removes isolated pixels.

Parameters:
iWidthwidth of squared local area.
ibCircularfalse to use square kernel, true to use circular.
ibLuminancetrue to sort pixels using by luminance, false to process each channel as grey.
iIterationnumber of iterations. Default is 1.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::operator!= ( const ImageVariant iOther ) const

Image comparison operator !=.

Parameters:
iOtherImage to compare to this.
Returns:
true is this and iOther are different, false otherwise.
const ImageVariant& eLynx::Image::ImageVariant::operator= ( const ImageVariant iImage )

Assignment from ImageVariant.

Parameters:
iImageto assign.
Returns:
this object.
const ImageVariant& eLynx::Image::ImageVariant::operator= ( const AbstractImage iImage )

Assignment from AbstractImage, aggregation copy of image implementation.

Parameters:
iImageabstract image implementation to assign.
Returns:
this object.
bool eLynx::Image::ImageVariant::operator== ( const ImageVariant iOther ) const

Image comparison operator ==.

Parameters:
iOtherImage to compare to this.
Returns:
true is this and iOther are identical, false otherwise.
bool eLynx::Image::ImageVariant::Posterize ( uint32  iLevels,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

The Posterize effect lets you adjust the number of brightness levels of the image.

Optimizations: look up table.

color.original.png

ramps.original.png

original
color.Posterize.png

ramps.Posterize.png

Posterize(3)
Parameters:
iLevelsnumbers of levels for all image dynamic range.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
void eLynx::Image::ImageVariant::Release (  )

Self destruction.

This method is called when object is no longer needed.

bool eLynx::Image::ImageVariant::RemoveGradient ( ImageVariant oBackground,
const Math::Point2iList iPoints,
EGradientMethod  iMethod = GM_Linear,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Remove background gradient using Delaunay triangulation method with different precisions (linear, quadratic, etc.)

Parameters:
oBackgroundsynthetic background.
iPointsarray of background points.
iMethodmethod of the interpolation.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::Resample ( uint32  iWidth,
uint32  iHeight,
Math::EResampleFilter  iFilter = Math::RF_Mitchell,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Resample image using filter.

color.original.png

Original
color.Resample_Mitchell.png

Resample(220,110) with RF_Mitchell
Parameters:
iWidththe new width.
iHeightthe new height.
iFilterthe filter to use.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::Resize ( uint32  iWidth,
uint32  iHeight,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Resize image.

color.original.png

Original
color.Resize.png

Resize(100, 200)
Parameters:
iWidththe new width.
iHeightthe new height.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::Rotate ( double  iDegrees,
int32  iFlags = RF_Default,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Rotate an image with finest degree angles.

Parameters:
iDegreesthe rotation angle in degrees.
iFlagsa combinaison of RF_Expand, RF_Interpolation and RF_Antialiasing.
iNotifiera notifier for progression and cancel.
bool eLynx::Image::ImageVariant::Rotate ( ERightRotation  iRotation,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Fast rotate image with basic 90° angles.

color.original.png

Original
color.Rotate90R.png

Rotate(RR_90Right)
color.Rotate180.png

Rotate(RR_180)
color.Rotate90L.png

Rotate(RR_90Left)
Parameters:
iRotationthe rotation 0°, 90°, 180° or 270°.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::Rotate180 ( ProgressNotifier iNotifier = ProgressNotifier_NULL )

Fast rotate image of 180°.

color.original.png

Original
color.Rotate180.png

Rotate(RR_180)
Parameters:
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::Rotate90Left ( ProgressNotifier iNotifier = ProgressNotifier_NULL )

Fast rotate image of 90° left.

color.original.png

Original
color.Rotate90L.png

Rotate(RR_90Left)
Parameters:
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::Rotate90Right ( ProgressNotifier iNotifier = ProgressNotifier_NULL )

Fast rotate image of 90° right.

color.original.png

Original
color.Rotate90R.png

Rotate(RR_90Right)
Parameters:
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::Save ( const char *  iprFilename,
ProgressNotifier iNotifier = ProgressNotifier_NULL,
const ImageFileOptions iprOptions = NULL 
) const

Save image to file.

Parameters:
iprFilenameThe image filename.
iNotifiera notifier for progression, log and cancel.
iprOptionsSome specific format options.
Returns:
true if image has been exported, false otherwise.

Note: See Supported Image File Format plugins before using it.

bool eLynx::Image::ImageVariant::SetBayerMatrix ( EBayerMatrix  iBayer )

Set a Bayer matrix to the image.

This has sence only if image is in L format.

Parameters:
iBayerthe Bayer matrit to set.
Returns:
false if image is in incompatible format, true otherwise.
bool eLynx::Image::ImageVariant::SetPlane ( uint32  iPlane,
const ImageVariant iImage,
bool  ibResized = true,
bool  ibScaled = false 
)

Build a grey image from a plane of this.

Parameters:
iPlanethe plane index from 0 to 3.
iImagethe image of plane to insert, must be a L image type.
ibResizedtrue to resize plane to image size, false for insertion at top left.
ibScaledtrue for scale to full range, false for simple cast.
Returns:
true if plane has been retrieve, false otherwise.
bool eLynx::Image::ImageVariant::Shift ( int32  iHorizontal,
int32  iVertical,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Shift an image with complete pixel size.

color.Shift50_10.png

Shift(50,10)
color.original.png

Original
color.ShiftM20_0.png

Shift(-20,0)
Parameters:
iHorizontalhorizontal shift in pixels, >0 means right shift, <0 left shift.
iVerticalvertical shift in pixels, >0 means bottom shift, <0 top shift.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
uint32 eLynx::Image::ImageVariant::sizeofMap (  ) const

Retrieve the number of bytes for whole map.

Returns:
The number of bytes for whole map.
uint32 eLynx::Image::ImageVariant::sizeofPixel (  ) const

Retrieve the number of bytes per pixel.

Returns:
The number of bytes per pixel.
uint32 eLynx::Image::ImageVariant::sizeofWidth (  ) const

Retrieve the number of bytes per line.

Returns:
The number of bytes per line.
bool eLynx::Image::ImageVariant::Solarize ( double  iValue,
uint32  iChannelMask = CM_All,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

The Solarize effect blends an image by inverting all color data when intensity value is greater than a threshold.

Optimizations: multicore, look up table.

color.original.png

ramps.original.png

original
color.Solarize.png

ramps.Solarize.png

Solarize(0.6)
Parameters:
iValuelevel in range [0, 1] when negative occurs.
iChannelMaskselected channels to be processed. Default is all channels.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.
bool eLynx::Image::ImageVariant::SwapPlanes ( uint32  iPlane1,
uint32  iPlane2 
)

Swap two planes into an image.

Parameters:
iPlane1the first plane from 0 to 3.
iPlane2the second plane from 0 to 3.
Returns:
true if planes have been swaped, false otherwise.
bool eLynx::Image::ImageVariant::Zoom ( uint32  iZoom,
ProgressNotifier iNotifier = ProgressNotifier_NULL 
)

Zoom image.

color.original.png

Original
color.Zoom2.png

Zoom(2)
Parameters:
iZoommagnifier coefficient.
iNotifiera notifier for progression, log and cancel.
Returns:
Method running status.

Member Data Documentation

The Bayer matrix to deal with raw image file from CCD.


The documentation for this class was generated from the following file:

Generated on Thu Dec 9 2010 by doxygen 1.7.2