PCL
pcl::ImageVariant Class Reference

Acts like a union for all types of images in PCL, with optional class-wide ownership of transported images. More...

#include <ImageVariant.h>

Public Types

typedef AbstractImage::color_space color_space
 
typedef ImageOp::value_type image_op
 

Public Member Functions

 ImageVariant ()
 
template<class P >
 ImageVariant (GenericImage< P > *image)
 
 ImageVariant (const ImageVariant &image)
 
 ImageVariant (ImageVariant &&image)
 
virtual ~ImageVariant ()
 
template<typename T >
ImageVariant AbsoluteDifference (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
ImageVariant AbsoluteValue (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<typename T >
ImageVariantAdd (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantAdd (const ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariant Added (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
ImageVariantAllocateData (int width, int height, int numberOfChannels=1, color_space colorSpace=ColorSpace::Gray)
 
ImageVariantAllocateData (const Rect &rect, int numberOfChannels=1, color_space colorSpace=ColorSpace::Gray)
 
ImageVariantAllocateImage (int width, int height, int numberOfChannels, color_space colorSpace)
 
size_type AlphaSize () const
 
template<typename T >
ImageVariantAnd (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantAnd (const ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariant Applied (T scalar, image_op op=ImageOp::Mov, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
ImageVariant Applied (const ImageVariant &image, image_op op=ImageOp::Mov, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
ImageVariant Applied (const ImageTransformation &transformation, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<typename T >
ImageVariantApply (T scalar, image_op op=ImageOp::Mov, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantApply (const ImageVariant &image, image_op op=ImageOp::Mov, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantApply (const ImageTransformation &transformation, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantAssign (const ImageVariant &image)
 
ImageVariantAssignImage (const ImageVariant &image, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
double AvgDev (double center, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
double BendMidvariance (double center, double beta=0.2, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
template<typename T >
ImageVariantBinarize (T threshold, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantBinarize (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariant Binarized (T threshold, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
ImageVariant Binarized (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
int BitsPerSample () const
 
double BiweightMidvariance (double center, double sigma, int k=9, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
ImageVariantBlack (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantBlend (const Bitmap &bitmap, const Point &point=Point(int_max), const Rect &rect=Rect(0))
 
ImageVariant Blended (const Bitmap &bitmap, const Point &point=Point(int_max), const Rect &rect=Rect(0)) const
 
Rect Bounds () const
 
int BytesPerSample () const
 
bool CanPopSelections () const
 
String ChannelId (int c) const
 
size_type ChannelSize () const
 
template<typename T >
bool Clip (pcl::GenericPoint< T > &p) const
 
template<typename T >
bool Clip (T &x, T &y) const
 
template<typename T >
bool Clip (pcl::GenericRectangle< T > &r) const
 
template<typename T >
bool Clip (T &x0, T &y0, T &x1, T &y1) const
 
color_space ColorSpace () const
 
Compression::subblock_list Compress (const Compression &compressor, const Rect &rect=Rect(0), int channel=-1, Compression::Performance *perf=nullptr) const
 
template<class P >
ImageVariantCopyImage (const GenericImage< P > &image)
 
ImageVariantCopyImage (const ImageVariant &image)
 
uint64 Count (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
void CreateAlphaChannels (int n)
 
ImageVariantCreateComplexImage (int bitSize=32)
 
ImageVariantCreateFloatImage (int bitSize=32)
 
ImageVariantCreateImage (bool isFloat, bool isComplex, int bitSize)
 
ImageVariantCreateImage ()
 
template<class P >
ImageVariantCreateImageAs (const pcl::GenericImage< P > &image)
 
ImageVariantCreateImageAs (const ImageVariant &image)
 
ImageVariantCreateSharedComplexImage (int bitSize=32)
 
ImageVariantCreateSharedFloatImage (int bitSize=32)
 
ImageVariantCreateSharedImage (bool isFloat, bool isComplex, int bitSize)
 
ImageVariantCreateSharedImage ()
 
template<class P >
ImageVariantCreateSharedImageAs (const pcl::GenericImage< P > &image)
 
ImageVariantCreateSharedImageAs (const ImageVariant &image)
 
ImageVariantCreateSharedUIntImage (int bitSize=16)
 
ImageVariantCreateUIntImage (int bitSize=16)
 
template<typename T >
ImageVariantCrop (const GenericVector< T > &fillValues)
 
ImageVariantCrop ()
 
template<typename T >
ImageVariantCropBy (int left, int top, int right, int bottom, const GenericVector< T > &fillValues)
 
ImageVariantCropBy (int left, int top, int right, int bottom)
 
template<typename T >
ImageVariantCropTo (const Rect &rect, const GenericVector< T > &fillValues)
 
ImageVariantCropTo (const Rect &rect)
 
template<typename T >
ImageVariantCropTo (int x0, int y0, int x1, int y1, const GenericVector< T > &fillValues)
 
ImageVariantCropTo (int x0, int y0, int x1, int y1)
 
void DeleteAlphaChannel (int channel)
 
void DeleteAlphaChannels ()
 
template<typename T >
ImageVariantDif (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
void DisableParallelProcessing (bool disable=true)
 
void DisableRangeClipping (bool disable=true) const
 
template<typename T >
ImageVariantDiv (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantDiv (const ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariantDivide (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantDivide (const ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariant Divided (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
void EnableParallelProcessing (bool enable=true, int maxProcessors=0)
 
void EnableRangeClipping (bool enable=true) const
 
ImageVariantEnsureLocalImage ()
 
ImageVariantEnsureUniqueImage ()
 
ImageVariantExchange (ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariantFill (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariantFill (const GenericVector< T > &values, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariant Filled (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<typename T >
ImageVariant Filled (const GenericVector< T > &values, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
int FirstSelectedChannel () const
 
void ForgetAlphaChannel (int channel)
 
void ForgetAlphaChannels ()
 
ImageVariantFree ()
 
ImageVariantFreeImage ()
 
template<typename T >
void GetColumn (T *buffer, int x, int channel=-1) const
 
template<typename T >
void GetExtremeSampleValues (T &min, T &max, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
void GetIntensity (ImageVariant &Y, const Rect &rect=Rect(0), int maxProcessors=0) const
 
void GetLightness (ImageVariant &L, const Rect &rect=Rect(0), int maxProcessors=0) const
 
void GetLuminance (ImageVariant &Y, const Rect &rect=Rect(0), int maxProcessors=0) const
 
template<typename T >
void GetRow (T *buffer, int y, int channel=-1) const
 
void GetSelectedChannelRange (int &c0, int &c1) const
 
bool HasAlphaChannels () const
 
int Height () const
 
const AbstractImageImagePtr () const
 
AbstractImageImagePtr ()
 
size_type ImageSize () const
 
template<typename T >
bool Includes (const GenericPoint< T > &p) const
 
template<typename T >
bool Includes (const GenericRectangle< T > &r) const
 
template<typename T >
bool Includes (T x0, T y0, T x1, T y1) const
 
template<typename T >
bool Includes (T x, T y) const
 
template<typename T >
bool Intersects (const pcl::GenericRectangle< T > &r) const
 
template<typename T >
bool Intersects (T x0, T y0, T x1, T y1) const
 
template<typename T >
ImageVariantInvert (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantInvert (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariant Inverted (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
ImageVariant Inverted (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<class P >
bool IsAs (const pcl::GenericImage< P > &) const
 
bool IsColor () const
 
bool IsCompletelySelected () const
 
bool IsComplexSample () const
 
bool IsEmptySelection () const
 
bool IsFloatSample () const
 
bool IsFullSelection () const
 
bool IsParallelProcessingEnabled () const
 
bool IsRangeClippingEnabled () const
 
bool IsSameImage (const ImageVariant &image) const
 
bool IsSharedImage () const
 
bool IsUniqueImage () const
 
bool IsValidChannelIndex (int c) const
 
int LastChannel () const
 
int LastSelectedChannel () const
 
size_type LineSize () const
 
template<typename T >
void LocateExtremeSampleValues (int &xmin, int &ymin, T &min, int &xmax, int &ymax, T &max, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
template<typename T >
void LocateExtremeSampleValues (Point &pmin, T &min, Point &pmax, T &max, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
double LocateMaximumSampleValue (int &xmax, int &ymax, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
double LocateMaximumSampleValue (Point &pmax, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
double LocateMinimumSampleValue (int &xmin, int &ymin, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
double LocateMinimumSampleValue (Point &pmin, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
double MAD (double center, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
void MaskFromSwapFile (const String &filePath, const ImageVariant &mask, bool invert=false, bool processEvents=false)
 
void MaskFromSwapFiles (const String &fileName, const StringList &directories, const ImageVariant &mask, bool invert=false, bool processEvents=false)
 
void MaskImage (const ImageVariant &src, const ImageVariant &mask, bool invert=false)
 
template<typename T >
ImageVariantMax (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantMax (const ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariant Maximum (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
double MaximumSampleValue (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
int MaxProcessors () const
 
double Mean (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
double MeanOfSquares (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
double Median (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
template<typename T >
ImageVariantMin (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantMin (const ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariant Minimum (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
double MinimumSampleValue (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
double Modulus (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
template<typename T >
ImageVariantMov (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariantMove (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantMove (const ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariantMul (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantMul (const ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariant Multiplied (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<typename T >
ImageVariantMultiply (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantMultiply (const ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariantNand (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantNand (const ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
size_type NominalSize () const
 
template<typename T >
ImageVariantNor (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantNor (const ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
double Norm (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
template<typename T >
ImageVariantNormalize (T lowerBound, T upperBound, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantNormalize (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariant Normalized (T lowerBound, T upperBound, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
ImageVariant Normalized (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
ImageVariantNot (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
int NumberOfAlphaChannels () const
 
size_type NumberOfAlphaSamples () const
 
int NumberOfChannels () const
 
int NumberOfNominalChannels () const
 
size_type NumberOfNominalSamples () const
 
size_type NumberOfPixels () const
 
size_type NumberOfSamples () const
 
int NumberOfSelectedChannels () const
 
size_type NumberOfSelectedPixels () const
 
size_type NumberOfSelectedSamples () const
 
ImageVariantOne (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
 operator bool () const
 
double operator() (int x, int y, int channel=0) const
 
const AbstractImageoperator* () const
 
AbstractImageoperator* ()
 
template<typename T >
ImageVariantoperator*= (T scalar)
 
ImageVariantoperator*= (const ImageVariant &image)
 
template<typename T >
ImageVariantoperator+= (T scalar)
 
ImageVariantoperator+= (const ImageVariant &image)
 
template<typename T >
ImageVariantoperator-= (T scalar)
 
ImageVariantoperator-= (const ImageVariant &image)
 
const AbstractImageoperator-> () const
 
AbstractImageoperator-> ()
 
template<typename T >
ImageVariantoperator/= (T scalar)
 
ImageVariantoperator/= (const ImageVariant &image)
 
ImageVariantoperator= (const ImageVariant &image)
 
ImageVariantoperator= (ImageVariant &&image)
 
template<typename T >
ImageVariantoperator^= (T scalar)
 
ImageVariantoperator^= (const ImageVariant &image)
 
ImageVariant operator~ () const
 
template<typename T >
ImageVariantOr (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantOr (const ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
bool OwnsImage () const
 
void PopSelections () const
 
template<typename T >
ImageVariantPow (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantPow (const ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
void PushSelections () const
 
double Qn (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
template<typename T >
ImageVariantRaise (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantRaise (const ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariant Raised (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
double RangeClipHigh () const
 
double RangeClipLow () const
 
ImageVariantRead (File &file)
 
ImageVariantRead (const String &filePath)
 
void ReadSwapFile (const String &filePath, Compression::Performance *perf=nullptr, bool processEvents=false)
 
void ReadSwapFiles (const String &fileName, const StringList &directories, Compression::Performance *perf=nullptr, bool processEvents=false)
 
void ReleaseTo (ImageVariant &image)
 
template<typename T >
ImageVariantRescale (T lowerBound, T upperBound, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantRescale (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariant Rescaled (T lowerBound, T upperBound, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
ImageVariant Rescaled (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
void ResetChannelRange () const
 
void ResetPoint () const
 
void ResetRangeClipping () const
 
void ResetSelection () const
 
void ResetSelections () const
 
const RGBColorSystemRGBWorkingSpace () const
 
void SelectAlphaChannels () const
 
void SelectChannel (int c) const
 
void SelectChannelRange (int c0, int c1) const
 
int SelectedChannel () const
 
Point SelectedPoint () const
 
Rect SelectedRectangle () const
 
ImageSelectionsSelections () const
 
void SelectNominalChannels () const
 
void SelectPoint (int x, int y) const
 
void SelectPoint (const Point &p) const
 
void SelectRectangle (int x0, int y0, int x1, int y1) const
 
void SelectRectangle (const Point &p0, const Point &p1) const
 
void SelectRectangle (const Rect &r) const
 
template<typename T >
ImageVariantSetAbsoluteDifference (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantSetAbsoluteDifference (const ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantSetAbsoluteValue (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantSetColorSpace (color_space colorSpace, int maxProcessors=0)
 
template<typename T >
ImageVariantSetColumn (const T *buffer, int x, int channel=-1)
 
template<class P >
ImageVariantSetImage (GenericImage< P > &image)
 
ImageVariantSetLightness (const ImageVariant &L, const Point &point=Point(int_max), const Rect &rect=Rect(0), int maxProcessors=0)
 
ImageVariantSetLuminance (const ImageVariant &Y, const Point &point=Point(int_max), const Rect &rect=Rect(0), int maxProcessors=0)
 
template<typename T >
ImageVariantSetMaximum (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantSetMaximum (const ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
void SetMaxProcessors (int maxProcessors)
 
template<typename T >
ImageVariantSetMinimum (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantSetMinimum (const ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantSetOwnership (bool owner=true)
 
void SetRangeClipHigh (double clipHigh) const
 
void SetRangeClipLow (double clipLow) const
 
void SetRangeClipping (double clipLow, double clipHigh) const
 
void SetRGBWorkingSpace (const RGBColorSystem &rgbws)
 
template<typename T >
ImageVariantSetRow (const T *buffer, int y, int channel=-1)
 
void SetStatusCallback (pcl::StatusCallback *callback) const
 
void * SharedImageHandle () const
 
template<typename T >
ImageVariantShift (const GenericVector< T > &fillValues)
 
ImageVariantShift ()
 
template<typename T >
ImageVariantShiftBy (int dx, int dy, const GenericVector< T > &fillValues)
 
ImageVariantShiftBy (int dx, int dy)
 
template<typename T >
ImageVariantShiftTo (int x, int y, const GenericVector< T > &fillValues)
 
ImageVariantShiftTo (int x, int y)
 
template<typename T >
ImageVariantShiftTo (const Point &p, const GenericVector< T > &fillValues)
 
ImageVariantShiftTo (const Point &p)
 
template<typename T >
ImageVariantShiftToBottomLeft (int width, int height, const GenericVector< T > &fillValues)
 
ImageVariantShiftToBottomLeft (int width, int height)
 
template<typename T >
ImageVariantShiftToBottomRight (int width, int height, const GenericVector< T > &fillValues)
 
ImageVariantShiftToBottomRight (int width, int height)
 
template<typename T >
ImageVariantShiftToCenter (int width, int height, const GenericVector< T > &fillValues)
 
ImageVariantShiftToCenter (int width, int height)
 
template<typename T >
ImageVariantShiftToTopLeft (int width, int height, const GenericVector< T > &fillValues)
 
ImageVariantShiftToTopLeft (int width, int height)
 
template<typename T >
ImageVariantShiftToTopRight (int width, int height, const GenericVector< T > &fillValues)
 
ImageVariantShiftToTopRight (int width, int height)
 
double Sn (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
StatusMonitorStatus () const
 
pcl::StatusCallbackStatusCallback () const
 
double StdDev (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
template<typename T >
ImageVariantSub (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantSub (const ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariantSubtract (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantSubtract (const ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariant Subtracted (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
double SumOfSquares (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
ImageVariantTransfer (ImageVariant &image)
 
ImageVariantTransfer (ImageVariant &&image)
 
ImageVariantTransferImage (ImageVariant &image)
 
void Transform (BidirectionalImageTransformation &transform, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<typename T >
ImageVariantTruncate (T lowerBound, T upperBound, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantTruncate (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariant Truncated (T lowerBound, T upperBound, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
ImageVariant Truncated (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
double Variance (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
ImageVariantWhite (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
int Width () const
 
void Write (File &file, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
void Write (const String &filePath, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
void WriteSwapFile (const String &filePath, swap_compression compression=SwapCompression::None, Compression::Performance *perf=nullptr, bool processEvents=false) const
 
void WriteSwapFiles (const String &fileName, const StringList &directories, swap_compression compression=SwapCompression::None, Compression::Performance *perf=nullptr, bool processEvents=false) const
 
ImageVariantXchg (ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariantXnor (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantXnor (const ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariantXor (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantXor (const ImageVariant &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantZero (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 

Static Public Member Functions

static void DeleteSwapFile (const String &filePath)
 
static void DeleteSwapFiles (const String &fileName, const StringList &directories)
 
static CompressionNewCompression (swap_compression algorithm, int itemSize=1)
 
static uint64 SwapFileSize (const String &filePath)
 
static uint64 SwapFilesSize (const String &fileName, const StringList &directories)
 

Friends

void Swap (ImageVariant &x1, ImageVariant &x2)
 

Detailed Description

An instance of ImageVariant owns a pointer to AbstractImage. That allows it to transport and manage all template instantiations of GenericImage transparently with a unique abstract interface: Image, ComplexImage, UInt16Image, and so on.

Image Template Instantiation Resolution

ImageVariant provides functionality to identify the particular data type that the transported image uses to represent its pixel samples. Once we know the pixel data type, we can resolve the template instantiation of GenericImage, which in turn gives us access to the whole data and functionality of the transported image. The following code snippet shows a typical example of template resolution with ImageVariant:

// ...
if ( image ) // if the ImageVariant transports a valid image
{
if ( image.IsComplexImage() )
throw Error( "Complex images are not supported in DoSomething()" );
if ( image.IsFloatSample() )
switch ( image.BitsPerSample() )
{
case 32 : DoSomething( static_cast<Image&>( *image ) ); break;
case 64 : DoSomething( static_cast<DImage&>( *image ) ); break;
}
else
switch ( image.BitsPerSample() )
{
case 8 : DoSomething( static_cast<UInt8Image&>( *image ) ); break;
case 16 : DoSomething( static_cast<UInt16Image&>( *image ) ); break;
case 32 : DoSomething( static_cast<UInt32Image&>( *image ) ); break;
}
}

In this code, DoSomething is a template function to deal with an image of a particular pixel sample type. In the code above, all standard PCL images are supported except complex images. For example, DoSomething could be like this function:

template <class P> void DoSomething( GenericImage<P>& image )
{
image.ShiftToCenter( image.Width()+20, image.Height()+20 );
}

This DoSomething function adds a 10-pixel black frame around the passed image.

Generalized Image Manipulation

Besides identifying image template instantiations, ImageVariant provides generalized wrappers for most of the member functions of GenericImage. This allows you to work with an instance of ImageVariant just as if it were its transported image, without even knowing its pixel data type in most cases. The example we have seen above could be implemented in a much simpler way as follows:

void DoSomething( ImageVariant& image )
{
if ( image )
{
if ( image.IsComplexImage() )
throw Error( "Complex images are not supported in DoSomething()" );
image.ShiftToCenter( image.Width()+20, image.Height()+20 );
}
}

The above code works because ImageVariant defines a ShiftToCenter member function as a wrapper to GenericImage::ShiftToCenter(), with implicit template instantiation resolution. As we have said, virtually all of GenericImage's functionality can be used transparently in a type-independent way through ImageVariant.

Image Ownership

Transported images can optionally be owned by ImageVariant. When ImageVariant owns a transported image, the image is destroyed when all instances of ImageVariant referencing that image are destroyed. It is important to know that ownership of transported images is a class-wide property of ImageVariant, not a private property of any particular ImageVariant instance.

Class-wide ownership means that an image is not owned only by a particular instance of ImageVariant, but by all existing instances that transport the same image. Consider the following code snippets:

Image image;
ImageVariant var( &image ); // ImageVariant does not own image

In this first case, we have an image and create an ImageVariant object to transport it. When the var object gets out of scope, image will continue existing and won't be destroyed.

var.CreateFloatImage(); // ImageVariant owns a newly created image

In this case, we have an ImageVariant object and tell it to create a new image (a 32-bit floating point image in the example). The newly created image will be transported by var and is now owned by ImageVariant. when the last instance of ImageVariant transporting the image is destroyed, the image will also be destroyed automatically.

You can also switch on and off ImageVariant's ownership:

Image* image = new Image;
ImageVariant var( image );
var.SetOwnership( true ); // now ImageVariant owns image

ImageVariant implements an explicit data sharing mechanism, which makes it different from the implicit data sharing implemented by rest of container classes in PCL. It is important to state clearly that ownership of image data is not a property of any particular object in this case, but of the whole ImageVariant class.

See also
AbstractImage, GenericImage

Definition at line 317 of file ImageVariant.h.

Member Typedef Documentation

◆ color_space

typedef AbstractImage::color_space pcl::ImageVariant::color_space

An enumerated type that represents the set of supported color spaces. Valid constants for this enumeration are defined in the ColorSpace namespace.

Definition at line 326 of file ImageVariant.h.

◆ image_op

typedef ImageOp::value_type pcl::ImageVariant::image_op

An enumerated type that represents the set of supported arithmetic and bitwise pixel operations. Valid constants for this enumeration are defined in the ImageOp namespace.

Definition at line 333 of file ImageVariant.h.

Constructor & Destructor Documentation

◆ ImageVariant() [1/4]

pcl::ImageVariant::ImageVariant ( )
inline

Constructs an empty ImageVariant. An empty ImageVariant instance does not transport an image.

Definition at line 346 of file ImageVariant.h.

◆ ImageVariant() [2/4]

template<class P >
pcl::ImageVariant::ImageVariant ( GenericImage< P > *  image)
inline

Constructs an ImageVariant instance to transport the specified image.

By default, the transported image is not owned by ImageVariant object. To cause ImageVariant to own the transported image, the SetOwnership() member function must be called explicitly.

Definition at line 359 of file ImageVariant.h.

◆ ImageVariant() [3/4]

pcl::ImageVariant::ImageVariant ( const ImageVariant image)
inline

Copy constructor. Constructs an ImageVariant instance as an alias of an existing ImageVariant object.

This constructor simply increments the reference counter of the transported image. When all references to a transported image are removed, and the transported image is owned by ImageVariant, it is destroyed and deallocated.

Definition at line 374 of file ImageVariant.h.

◆ ImageVariant() [4/4]

pcl::ImageVariant::ImageVariant ( ImageVariant &&  image)
inline

Move constructor.

Definition at line 382 of file ImageVariant.h.

◆ ~ImageVariant()

virtual pcl::ImageVariant::~ImageVariant ( )
inlinevirtual

Destroys an ImageVariant instance.

If the transported image exists and is owned by ImageVariant, and there are no more ImageVariant references to it, then it is also destroyed.

Definition at line 393 of file ImageVariant.h.

Member Function Documentation

◆ AbsoluteDifference()

template<typename T >
ImageVariant pcl::ImageVariant::AbsoluteDifference ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Creates a local image with a subset of pixel samples from this image, and computes the absolute values of their differences with the specified scalar. Returns the resulting image.

This member function is a generalized wrapper for GenericImage::AbsoluteDifference()

Definition at line 1483 of file ImageVariant.h.

◆ AbsoluteValue()

ImageVariant pcl::ImageVariant::AbsoluteValue ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Returns a local image with a subset of pixel samples from this image, replaced with their absolute values.

This member function is a generalized wrapper for GenericImage::AbsoluteValue()

Definition at line 1506 of file ImageVariant.h.

◆ Add() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Add ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Adds the specified scalar to a subset of pixel samples in this image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Add()

Definition at line 1528 of file ImageVariant.h.

◆ Add() [2/2]

ImageVariant& pcl::ImageVariant::Add ( const ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Adds pixel samples of the specified image to a subset of pixel samples in this image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Add()

Definition at line 1562 of file ImageVariant.h.

◆ Added()

template<typename T >
ImageVariant pcl::ImageVariant::Added ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Creates a local image with a subset of pixel samples from this image, and adds a scalar. Returns the resulting image.

This member function is a generalized wrapper for GenericImage::Added()

Definition at line 1588 of file ImageVariant.h.

◆ AllocateData() [1/2]

ImageVariant& pcl::ImageVariant::AllocateData ( int  width,
int  height,
int  numberOfChannels = 1,
color_space  colorSpace = ColorSpace::Gray 
)
inline

Allocates new pixel data with the specified geometry and color space. Returns a reference to this image.

If this object transports no image, a new local image is created in 32-bit floating point format by calling CreateImage().

This member function is a generalized wrapper for GenericImage::AllocateData()

Definition at line 1613 of file ImageVariant.h.

◆ AllocateData() [2/2]

ImageVariant& pcl::ImageVariant::AllocateData ( const Rect rect,
int  numberOfChannels = 1,
color_space  colorSpace = ColorSpace::Gray 
)
inline

Allocates new pixel data with the specified geometry and color space. Returns a reference to this image.

If this object transports no image, a new local image is created in 32-bit floating point format by calling CreateImage().

This member function is a generalized wrapper for GenericImage::AllocateData()

Definition at line 1638 of file ImageVariant.h.

◆ AllocateImage()

ImageVariant& pcl::ImageVariant::AllocateImage ( int  width,
int  height,
int  numberOfChannels,
color_space  colorSpace 
)
inline

Allocates pixel data in the image transported by this ImageVariant instance, with the specified geometry and color space. Returns a reference to this object.

Parameters
widthWidth of the newly created image in pixels.
heightHeight of the newly created image in pixels.
numberOfChannelsNumber of channels. Must be larger or equal to the number of nominal channels, as imposed by the specified color space.
colorSpaceColor space. See the ColorSpace namespace for symbolic constants.

If this ImageVariant object transports no image, a new one is created in 32-bit floating point format. ImageVariant will own the newly created image in this case.

This function is useful to allocate pixel data without having to resolve the template instantiation of the transported image. PCL allocates pixels of the appropriate sample data type transparently.

Definition at line 6377 of file ImageVariant.h.

◆ AlphaSize()

size_type pcl::ImageVariant::AlphaSize ( ) const
inline

Returns the size in bytes of all memory blocks required to store the pixel data in the alpha channels (i.e., excluding nominal channels) of this image. Returns zero if this image has no alpha channels, or if this object transports no image.

The returned value is ChannelSize()*NumberOfAlphaChannels().

Definition at line 1400 of file ImageVariant.h.

◆ And() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::And ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Performs a bitwise AND operation between a subset of pixel samples in this image and the specified scalar. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::And()

Definition at line 1661 of file ImageVariant.h.

◆ And() [2/2]

ImageVariant& pcl::ImageVariant::And ( const ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Performs a bitwise AND operation between a subset of pixel samples in this image and the corresponding samples of the specified source image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::And()

Definition at line 1696 of file ImageVariant.h.

◆ Applied() [1/3]

template<typename T >
ImageVariant pcl::ImageVariant::Applied ( scalar,
image_op  op = ImageOp::Mov,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Creates a local image with a subset of pixel samples from this image, and performs an arithmetic or bitwise logical operation with a scalar. Returns the resulting image.

This member function is a generalized wrapper for GenericImage::Applied( T )

Definition at line 1724 of file ImageVariant.h.

◆ Applied() [2/3]

ImageVariant pcl::ImageVariant::Applied ( const ImageVariant image,
image_op  op = ImageOp::Mov,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Creates a local image with a subset of pixel samples from this image, and performs an arithmetic or bitwise logical operation with the corresponding samples of another image. Returns the resulting image.

This member function is a generalized wrapper for GenericImage::Applied( const GenericImage& )

Definition at line 1764 of file ImageVariant.h.

◆ Applied() [3/3]

ImageVariant pcl::ImageVariant::Applied ( const ImageTransformation transformation,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Creates a local image with a subset of pixel samples from this image, and applies an image transformation. Returns the resulting image.

This member function is a generalized wrapper for GenericImage::Applied( const ImageTransformation& )

Definition at line 1791 of file ImageVariant.h.

◆ Apply() [1/3]

template<typename T >
ImageVariant& pcl::ImageVariant::Apply ( scalar,
image_op  op = ImageOp::Mov,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Replaces a subset of pixel samples with the result of an arithmetic, bitwise logical or pixel composition operation with a scalar. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Apply( T )

Definition at line 1816 of file ImageVariant.h.

◆ Apply() [2/3]

ImageVariant& pcl::ImageVariant::Apply ( const ImageVariant image,
image_op  op = ImageOp::Mov,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Performs an arithmetic, bitwise logical or pixel composition operation between a subset of pixel samples in this image and the corresponding samples of another operand image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Apply( const GenericImage& )

Definition at line 1852 of file ImageVariant.h.

◆ Apply() [3/3]

ImageVariant& pcl::ImageVariant::Apply ( const ImageTransformation transformation,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Applies an image transformation to a subset of pixel samples. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Apply( const ImageTransformation& )

Definition at line 1877 of file ImageVariant.h.

◆ Assign()

ImageVariant& pcl::ImageVariant::Assign ( const ImageVariant image)
inline

Assigns another instance of ImageVariant to this object. Returns a reference to this object.

If the previously transported image (if any) was owned by ImageVariant, and there are no more ImageVariant references to it, then it is destroyed before assignment.

Definition at line 5855 of file ImageVariant.h.

◆ AssignImage()

ImageVariant& pcl::ImageVariant::AssignImage ( const ImageVariant image,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Copies pixel samples from the specified source image to this image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Assign()

Definition at line 1911 of file ImageVariant.h.

◆ AvgDev()

double pcl::ImageVariant::AvgDev ( double  center,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns the mean absolute deviation of a subset of pixel samples with respect to the specified center value.

This member function is a generalized wrapper for GenericImage::AvgDev()

Definition at line 1933 of file ImageVariant.h.

◆ BendMidvariance()

double pcl::ImageVariant::BendMidvariance ( double  center,
double  beta = 0.2,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns a percentage bend midvariance (PBMV) for a subset of pixel samples, with respect the the specified center value, with the specified beta rejection parameter.

This member function is a generalized wrapper for GenericImage::BendMidvariance()

Definition at line 2046 of file ImageVariant.h.

◆ Binarize() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Binarize ( threshold,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Binarizes a subset of pixel samples with respect to the specified threshold value. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Binarize()

Definition at line 1956 of file ImageVariant.h.

◆ Binarize() [2/2]

ImageVariant& pcl::ImageVariant::Binarize ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Binarizes a subset of pixel samples with respect to the specified threshold value. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Binarize()

Definition at line 1977 of file ImageVariant.h.

◆ Binarized() [1/2]

template<typename T >
ImageVariant pcl::ImageVariant::Binarized ( threshold,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Returns a local image with a subset of pixel samples from this image, binarized with respect to the specified threshold value.

This member function is a generalized wrapper for GenericImage::Binarized()

Definition at line 2000 of file ImageVariant.h.

◆ Binarized() [2/2]

ImageVariant pcl::ImageVariant::Binarized ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Binarizes a subset of pixel samples with respect to the central value of the native range of the image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Binarized()

Definition at line 2023 of file ImageVariant.h.

◆ BitsPerSample()

◆ BiweightMidvariance()

double pcl::ImageVariant::BiweightMidvariance ( double  center,
double  sigma,
int  k = 9,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns a biweight midvariance (BWMV) for a subset of pixel samples, with respect the the specified center value, sigma estimate of dispersion, and k threshold in sigma units.

This member function is a generalized wrapper for GenericImage::BiweightMidvariance()

Definition at line 2071 of file ImageVariant.h.

◆ Black()

ImageVariant& pcl::ImageVariant::Black ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Fills a subset of pixel samples with the minimum sample value in the native range of the image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Black()

Definition at line 2094 of file ImageVariant.h.

◆ Blend()

ImageVariant& pcl::ImageVariant::Blend ( const Bitmap bitmap,
const Point point = Point( int_max ),
const Rect rect = Rect( 0 ) 
)
inline

Blends a rectangular region of a 32-bit RGBA bitmap with this image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Blend()

Definition at line 2114 of file ImageVariant.h.

◆ Blended()

ImageVariant pcl::ImageVariant::Blended ( const Bitmap bitmap,
const Point point = Point( int_max ),
const Rect rect = Rect( 0 ) 
) const
inline

Returns a local duplicate of this image blended with a rectangular region of a 32-bit RGBA bitmap.

This member function is a generalized wrapper for GenericImage::Blended()

Definition at line 2135 of file ImageVariant.h.

◆ Bounds()

Rect pcl::ImageVariant::Bounds ( ) const
inline

Returns the bounding rectangle of this image.

The upper left corner of the returned rectangle (x0, y0) is always (0,0). The lower right corner coordinates (x1, y1) correspond to the width and height of the image.

If this object transports no image, this function returns an empty rectangle.

Definition at line 610 of file ImageVariant.h.

◆ BytesPerSample()

int pcl::ImageVariant::BytesPerSample ( ) const
inline

Returns the number of 8-bit bytes per sample of the image transported by this ImageVariant, or zero if this object transports no image.

Definition at line 461 of file ImageVariant.h.

◆ CanPopSelections()

bool pcl::ImageVariant::CanPopSelections ( ) const
inline

Returns true if one or more selections have been pushed to the internal selection stack, that is, if the PopSelections() function can be called to restore them. Returns false otherwise, or if this object does not transport an image.

Definition at line 1212 of file ImageVariant.h.

◆ ChannelId()

String pcl::ImageVariant::ChannelId ( int  c) const
inline

Returns the identifier of a nominal channel or component c in the color space of the image transported by this ImageVariant, or an empty string if this object transports no image.

Definition at line 1433 of file ImageVariant.h.

◆ ChannelSize()

size_type pcl::ImageVariant::ChannelSize ( ) const
inline

Returns the size in bytes of a channel in the image transported by this ImageVariant, or zero if this object transports no image.

The returned value is BytesPerSample()*NumberOfPixels().

Definition at line 1362 of file ImageVariant.h.

◆ Clip() [1/4]

template<typename T >
bool pcl::ImageVariant::Clip ( pcl::GenericPoint< T > &  p) const
inline

Constrains a point p to stay within the boundaries of this image. Returns true iff the original point location is included in this image.

If this object transports no image, this function does nothing and returns false.

Definition at line 704 of file ImageVariant.h.

◆ Clip() [2/4]

template<typename T >
bool pcl::ImageVariant::Clip ( T &  x,
T &  y 
) const
inline

Constrains two point coordinates x and y to stay within the boundaries of this image.

Parameters
[out]xHorizontal coordinate of the clipped point.
[out]yVertical coordinate of the clipped point.

Returns true iff the original point location is included in this image.

If this object transports no image, this function does nothing and returns false.

Definition at line 722 of file ImageVariant.h.

◆ Clip() [3/4]

template<typename T >
bool pcl::ImageVariant::Clip ( pcl::GenericRectangle< T > &  r) const
inline

Constrains a rectangular region r in image coordinates to fit into the boundaries of this image. Also ensures coherence of clipped rectangular coordinates such that r.x0 ≤ r.x1 and r.y0 ≤ r.y1.

Returns true iff the original rectangle intersects this image.

If this object transports no image, this function does nothing and returns false.

Definition at line 738 of file ImageVariant.h.

◆ Clip() [4/4]

template<typename T >
bool pcl::ImageVariant::Clip ( T &  x0,
T &  y0,
T &  x1,
T &  y1 
) const
inline

Constrains a rectangular region, given by its separate image coordinates, to fit into the boundaries of this image. Also ensures coherence of rectangular coordinates, such that x0 ≤ x1 and y0 ≤ y1.

Parameters
[out]x0,y0Upper left corner coordinates (horizontal, vertical) of the rectangle that will be clipped.
[out]x1,y1Lower right corner coordinates (horizontal, vertical) of the rectangle that will be clipped.

Returns true iff the original rectangle intersects the image.

If this object transports no image, this function does nothing and returns false.

Definition at line 760 of file ImageVariant.h.

◆ ColorSpace()

color_space pcl::ImageVariant::ColorSpace ( ) const
inline

Returns the identifier of the color space of the image transported by this ImageVariant.

This function returns the value of a symbolic constant enumerated by the ColorSpace namespace. If this object transports no image, this function returns ColorSpace::Unknown.

Definition at line 1423 of file ImageVariant.h.

◆ Compress()

Compression::subblock_list pcl::ImageVariant::Compress ( const Compression compressor,
const Rect rect = Rect( 0 ),
int  channel = -1,
Compression::Performance perf = nullptr 
) const
inline

Compression of pixel samples from the image transported by an ImageVariant. Returns a list of compressed sub-blocks.

If this ImageVariant object does not transport an image, this function returns an empty array.

This member function is a generalized wrapper for GenericImage::Compress().

Definition at line 5822 of file ImageVariant.h.

◆ CopyImage() [1/2]

template<class P >
ImageVariant& pcl::ImageVariant::CopyImage ( const GenericImage< P > &  image)
inline

Assigns an image to the image transported by this ImageVariant instance. Returns a reference to this object.

Parameters
imageImage to assign.

The assigned image can be an instance of any supported template instantiation of GenericImage. If this ImageVariant object transports no image, a new one is created as an instance of the same template instantiation as the specified source image. In this case, ImageVariant will own the newly created image.

This function is useful to assign an image without having to resolve the template instantiation of the transported image. PCL performs the assignment between different image types transparently.

Definition at line 6406 of file ImageVariant.h.

◆ CopyImage() [2/2]

ImageVariant& pcl::ImageVariant::CopyImage ( const ImageVariant image)
inline

Assigns an image transported by another ImageVariant instance to the image transported by this object. Returns a reference to this object.

Parameters
imageSource ImageVariant instance whose transported image will be assigned.

This function calls CopyImage( const I& ) after resolving the template instantiation of the transported image. See the documentation of that function for details.

Definition at line 6429 of file ImageVariant.h.

◆ Count()

uint64 pcl::ImageVariant::Count ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns the number of pixel samples selectable for statistics calculation from a subset of pixel samples.

This member function is a generalized wrapper for GenericImage::Count()

Definition at line 2156 of file ImageVariant.h.

◆ CreateAlphaChannels()

void pcl::ImageVariant::CreateAlphaChannels ( int  n)
inline

Creates n new alpha channels in this image. Alpha channels are those in excess of nominal channels, e.g. a fourth channel in an RGB color image, or a second channel in a grayscale image. Returns a reference to this image.

Newly created channels are not initialized, so their pixel samples will contain unpredictable values.

This member function is a generalized wrapper for GenericImage::CreateAlphaChannels()

Definition at line 2183 of file ImageVariant.h.

◆ CreateComplexImage()

ImageVariant& pcl::ImageVariant::CreateComplexImage ( int  bitSize = 32)
inline

Creates a new floating point complex image with the specified sample size in bits. Returns a reference to this object.

Parameters
bitSizeSample size in bits for the newly created complex image. Valid argument values are 32 and 64.

This function is a convenience shortcut for:

CreateImage( true, true, bitSize );

Definition at line 6073 of file ImageVariant.h.

◆ CreateFloatImage()

ImageVariant& pcl::ImageVariant::CreateFloatImage ( int  bitSize = 32)
inline

Creates a new floating point real image with the specified sample size in bits. Returns a reference to this object.

Parameters
bitSizeSample size in bits for the newly created real image. Valid argument values are 32 and 64. The default value is 32.

This function is a convenience shortcut for:

CreateImage( true, false, bitSize );

Definition at line 6036 of file ImageVariant.h.

Referenced by pcl::GenericMatrix< coefficient >::ToImage().

◆ CreateImage() [1/2]

ImageVariant& pcl::ImageVariant::CreateImage ( bool  isFloat,
bool  isComplex,
int  bitSize 
)
inline

Creates a new image with the specified sample data type. Returns a reference to this object.

Parameters
isFloatIf true, floating-point real samples will be used.
isComplexIf true, complex pixel samples (implicitly floating-point) will be used.
bitSizeNumber of bits per sample. The supported combinations are:

  • For floating-point samples (real or complex): 32 or 64.
  • For integer samples: 8, 16 or 32.
If the previously transported image (if any) was owned by ImageVariant, and there are no more ImageVariant references to it, then it is destroyed before creating the new image.

The newly created image will be empty. To allocate pixel data, you must call GenericImage::AllocateData() explicitly.

The newly created image will be owned by ImageVariant.

Definition at line 5996 of file ImageVariant.h.

◆ CreateImage() [2/2]

ImageVariant& pcl::ImageVariant::CreateImage ( )
inline

Creates a new 32-bit floating point real image. Returns a reference to this object.

This function is a convenience shortcut for:

Definition at line 6057 of file ImageVariant.h.

◆ CreateImageAs() [1/2]

template<class P >
ImageVariant& pcl::ImageVariant::CreateImageAs ( const pcl::GenericImage< P > &  image)
inline

Creates a new image with the same sample data type (template instantiation) as the specified image. Returns a reference to this object.

Parameters
imageImage to obtain sample data type parameters from.

This function is a convenience shortcut for:

CreateImage( P::IsFloatSample(), P::IsComplexSample(), P::BitsPerSample() );

Definition at line 6127 of file ImageVariant.h.

◆ CreateImageAs() [2/2]

ImageVariant& pcl::ImageVariant::CreateImageAs ( const ImageVariant image)
inline

Creates a new image with the same sample data type (template instantiation) as the specified ImageVariant object. Returns a reference to this object.

Parameters
imageImageVariant to obtain sample data type parameters from.

This function is a convenience shortcut for:

CreateImage( image.IsFloatSample(), image.IsComplexSample(), image.BitsPerSample() );

Definition at line 6145 of file ImageVariant.h.

References BitsPerSample(), IsComplexSample(), and IsFloatSample().

◆ CreateSharedComplexImage()

ImageVariant& pcl::ImageVariant::CreateSharedComplexImage ( int  bitSize = 32)
inline

Creates a new shared, floating point complex image with the specified sample size in bits. Returns a reference to this object.

Parameters
bitSizeSample size in bits for the newly created complex image. Valid argument values are 32 and 64.

This function is a convenience shortcut for:

CreateSharedImage( true, true, bitSize );

For an equivalent member function that creates a local image, see CreateComplexImage().

Definition at line 6262 of file ImageVariant.h.

◆ CreateSharedFloatImage()

ImageVariant& pcl::ImageVariant::CreateSharedFloatImage ( int  bitSize = 32)
inline

Creates a new shared, floating point real image with the specified sample size in bits. Returns a reference to this object.

Parameters
bitSizeSample size in bits for the newly created real image. Valid argument values are 32 and 64.

This function is a convenience shortcut for:

CreateSharedImage( true, false, bitSize );

For an equivalent member function that creates a local image, see CreateFloatImage().

Definition at line 6219 of file ImageVariant.h.

◆ CreateSharedImage() [1/2]

ImageVariant& pcl::ImageVariant::CreateSharedImage ( bool  isFloat,
bool  isComplex,
int  bitSize 
)
inline

Creates a new shared image with the specified sample data type. Returns a reference to this object.

Parameters
isFloatIf true, floating-point real pixels will be used.
isComplexIf true, complex pixels ( implicitly floating point ) will be used.
bitSizeNumber of bits per sample. The supported combinations are:

  • For floating-point samples ( real or complex ): 32 or 64.
  • For integer samples: 8, 16 or 32.
This member function works in an equivalent way to:
CreateImage( bool isFloat, bool isComplex, int bitSize );

except that this function creates a shared image, while CreateImage() creates a local image. A shared image is an alias to an image that lives in the PixInsight core application, while a local image is a private object in the local heap of the calling module.

Shared images are particularly useful for processes involving intermodule communication in the PixInsight platform. An example is the FileFormatInstance class, which can be used to perform file I/O operations by invoking any installed file format support module on the platform. FileFormatInstance requires shared images to read/write images from/to disk files (you can actually pass a local image to FileFormatInstance, but then PCL will generate and use a temporary shared working image on the fly, wasting memory unnecessarily).

Definition at line 6185 of file ImageVariant.h.

◆ CreateSharedImage() [2/2]

ImageVariant& pcl::ImageVariant::CreateSharedImage ( )
inline

Creates a new shared, 32-bit floating point real image. Returns a reference to this object.

This function is a convenience shortcut for:

For an equivalent member function that creates a local image, see CreateImage().

Definition at line 6243 of file ImageVariant.h.

◆ CreateSharedImageAs() [1/2]

template<class P >
ImageVariant& pcl::ImageVariant::CreateSharedImageAs ( const pcl::GenericImage< P > &  image)
inline

Creates a new shared image with the same sample data type ( template instantiation ) as the specified image. Returns a reference to this object.

Parameters
imageImage to obtain sample data type parameters from.

This function is a convenience shortcut for:

CreateSharedImage( P::IsFloatSample(), P::IsComplexSample(), P::BitsPerSample() );

For an equivalent member function that creates a local image, see CreateImageAs( const pcl::GenericImage& ).

Definition at line 6322 of file ImageVariant.h.

◆ CreateSharedImageAs() [2/2]

ImageVariant& pcl::ImageVariant::CreateSharedImageAs ( const ImageVariant image)
inline

Creates a new shared image with the same sample data type ( template instantiation ) as the specified ImageVariant object. Returns a reference to this object.

Parameters
imageImageVariant to obtain sample data type parameters from.

This function is a convenience shortcut for:

CreateSharedImage( image.IsFloatSample(), image.IsComplexSample(), image.BitsPerSample() );

For an equivalent member function that creates a local image, see CreateImageAs( const ImageVariant& ).

Definition at line 6343 of file ImageVariant.h.

References BitsPerSample(), IsComplexSample(), and IsFloatSample().

◆ CreateSharedUIntImage()

ImageVariant& pcl::ImageVariant::CreateSharedUIntImage ( int  bitSize = 16)
inline

Creates a new shared, unsigned integer image with the specified sample size in bits. Returns a reference to this object.

Parameters
bitSizeSample size in bits for the newly integer image. Valid argument values are 8, 16 and 32.

This function is a convenience shortcut for:

CreateImage( false, false, bitSize );

For an equivalent member function that creates a local image, see CreateUIntImage().

Definition at line 6289 of file ImageVariant.h.

◆ CreateUIntImage()

ImageVariant& pcl::ImageVariant::CreateUIntImage ( int  bitSize = 16)
inline

Creates a new unsigned integer image with the specified sample size in bits. Returns a reference to this object.

Parameters
bitSizeSample size in bits for the newly integer image. Valid argument values are 8, 16 and 32.

This function is a convenience shortcut for:

CreateImage( false, false, bitSize );

Definition at line 6097 of file ImageVariant.h.

◆ Crop() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Crop ( const GenericVector< T > &  fillValues)
inline

Crops the image to its current rectangular selection. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Crop()

Definition at line 2203 of file ImageVariant.h.

◆ Crop() [2/2]

ImageVariant& pcl::ImageVariant::Crop ( )
inline

Crops the image to its current rectangular selection, filling extended regions with the minimum sample value in the native range of the image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Crop()

Definition at line 2224 of file ImageVariant.h.

◆ CropBy() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::CropBy ( int  left,
int  top,
int  right,
int  bottom,
const GenericVector< T > &  fillValues 
)
inline

Crops or extends the entire image by applying the specified margins. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::CropBy()

Definition at line 2245 of file ImageVariant.h.

◆ CropBy() [2/2]

ImageVariant& pcl::ImageVariant::CropBy ( int  left,
int  top,
int  right,
int  bottom 
)
inline

Crops or extends the entire image by applying the specified margins. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::CropBy()

Definition at line 2265 of file ImageVariant.h.

◆ CropTo() [1/4]

template<typename T >
ImageVariant& pcl::ImageVariant::CropTo ( const Rect rect,
const GenericVector< T > &  fillValues 
)
inline

Crops the image to the specified rectangular region. Returns a reference to this image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::CropTo()

Definition at line 2286 of file ImageVariant.h.

◆ CropTo() [2/4]

ImageVariant& pcl::ImageVariant::CropTo ( const Rect rect)
inline

Crops the image to the specified rectangular region, filling extended regions with the minimum sample value in the native range of the image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::CropTo()

Definition at line 2307 of file ImageVariant.h.

◆ CropTo() [3/4]

template<typename T >
ImageVariant& pcl::ImageVariant::CropTo ( int  x0,
int  y0,
int  x1,
int  y1,
const GenericVector< T > &  fillValues 
)
inline

Crops the image to the specified rectangular region. Returns a reference to this image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::CropTo()

Definition at line 2328 of file ImageVariant.h.

◆ CropTo() [4/4]

ImageVariant& pcl::ImageVariant::CropTo ( int  x0,
int  y0,
int  x1,
int  y1 
)
inline

Crops the image to the specified rectangular region, filling extended regions with the minimum sample value in the native range of the image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::CropTo()

Definition at line 2349 of file ImageVariant.h.

◆ DeleteAlphaChannel()

void pcl::ImageVariant::DeleteAlphaChannel ( int  channel)
inline

Destroys an alpha channel. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::DeleteAlphaChannel()

Definition at line 2369 of file ImageVariant.h.

◆ DeleteAlphaChannels()

void pcl::ImageVariant::DeleteAlphaChannels ( )
inline

Destroys all existing alpha channels in this image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::DeleteAlphaChannels()

Definition at line 2389 of file ImageVariant.h.

◆ DeleteSwapFile()

static void pcl::ImageVariant::DeleteSwapFile ( const String filePath)
static

Deletes all raw storage files previously created by a call to the WriteSwapFile() member function.

◆ DeleteSwapFiles()

static void pcl::ImageVariant::DeleteSwapFiles ( const String fileName,
const StringList directories 
)
static

Deletes all raw storage files previously created by a call to the WriteSwapFiles() member function.

Warning
This function is not thread-safe: it can only be called from the root thread. This function will throw an Error exception if it is called from a local thread.

◆ Dif()

template<typename T >
ImageVariant& pcl::ImageVariant::Dif ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

A synonym for SetAbsoluteDifference().

Definition at line 4449 of file ImageVariant.h.

◆ DisableParallelProcessing()

void pcl::ImageVariant::DisableParallelProcessing ( bool  disable = true)
inline

Disables parallel processing for this image.

This is a convenience function, equivalent to: EnableParallelProcessing( !disable )

If this object does not transport an image, calling this member function has no effect.

Definition at line 1294 of file ImageVariant.h.

◆ DisableRangeClipping()

void pcl::ImageVariant::DisableRangeClipping ( bool  disable = true) const
inline

Disables range clipping for statistical calculations.

See IsRangeClippingEnabled() for more information on range clipping.

Definition at line 1071 of file ImageVariant.h.

◆ Div() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Div ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

A synonym for Divide().

Definition at line 2422 of file ImageVariant.h.

◆ Div() [2/2]

ImageVariant& pcl::ImageVariant::Div ( const ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

A synonym for Divide().

Definition at line 2468 of file ImageVariant.h.

◆ Divide() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Divide ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Divides a subset of pixel samples in this image by the specified scalar. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Divide()

Definition at line 2409 of file ImageVariant.h.

◆ Divide() [2/2]

ImageVariant& pcl::ImageVariant::Divide ( const ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Divides a subset of pixel samples in this image by samples from the specified source image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Divide()

Definition at line 2452 of file ImageVariant.h.

◆ Divided()

template<typename T >
ImageVariant pcl::ImageVariant::Divided ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Creates a local image with a subset of pixel samples from this image, and divides it by a scalar. Returns the resulting image.

This member function is a generalized wrapper for GenericImage::Divided()

Definition at line 2488 of file ImageVariant.h.

◆ EnableParallelProcessing()

void pcl::ImageVariant::EnableParallelProcessing ( bool  enable = true,
int  maxProcessors = 0 
)
inline

Enables parallel processing for this image.

Parameters
enableWhether to enable or disable parallel processing. True by default.
maxProcessorsThe maximum number of processors allowed for this image. If enable is false this parameter is ignored. A value ≤ 0 is ignored. The default value is zero.

If this object does not transport an image, calling this member function has no effect.

Definition at line 1279 of file ImageVariant.h.

◆ EnableRangeClipping()

void pcl::ImageVariant::EnableRangeClipping ( bool  enable = true) const
inline

Enables range clipping for statistical calculations.

See IsRangeClippingEnabled() for more information on range clipping.

Definition at line 1060 of file ImageVariant.h.

◆ EnsureLocalImage()

ImageVariant& pcl::ImageVariant::EnsureLocalImage ( )
inline

Ensures that the image transported by this ImageVariant object uses local pixel data storage. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::EnsureLocal()

Definition at line 4893 of file ImageVariant.h.

◆ EnsureUniqueImage()

ImageVariant& pcl::ImageVariant::EnsureUniqueImage ( )
inline

Ensures that the image transported by this ImageVariant object uniquely references its pixel data, making a unique copy of its referenced pixel data if necessary. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::EnsureUnique()

Definition at line 4872 of file ImageVariant.h.

◆ Exchange()

ImageVariant& pcl::ImageVariant::Exchange ( ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Exchanges a subset of pixel samples between this image and another operand image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Exchange()

Definition at line 2524 of file ImageVariant.h.

◆ Fill() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Fill ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Fills a subset of pixel samples of this image with the specified scalar. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Fill()

Definition at line 2559 of file ImageVariant.h.

◆ Fill() [2/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Fill ( const GenericVector< T > &  values,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Fills a subset of pixel samples of this image with the scalar components of a vector of per-channel filling values. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Fill()

Definition at line 2581 of file ImageVariant.h.

◆ Filled() [1/2]

template<typename T >
ImageVariant pcl::ImageVariant::Filled ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Returns a local image with a subset of pixel samples from this image, filled with the specified scalar.

This member function is a generalized wrapper for GenericImage::Filled()

Definition at line 2603 of file ImageVariant.h.

◆ Filled() [2/2]

template<typename T >
ImageVariant pcl::ImageVariant::Filled ( const GenericVector< T > &  values,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Returns a local image with a subset of pixel samples from this image, filled with the scalar components of a vector of per-channel filling values.

This member function is a generalized wrapper for GenericImage::Filled()

Definition at line 2627 of file ImageVariant.h.

◆ FirstSelectedChannel()

int pcl::ImageVariant::FirstSelectedChannel ( ) const
inline

Returns the channel index of the first selected channel, or -1 if this object does not transport an image.

Definition at line 850 of file ImageVariant.h.

◆ ForgetAlphaChannel()

void pcl::ImageVariant::ForgetAlphaChannel ( int  channel)
inline

Forces this image to discard an existing alpha channel without deallocating it. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::ForgetAlphaChannel()

Definition at line 2649 of file ImageVariant.h.

◆ ForgetAlphaChannels()

void pcl::ImageVariant::ForgetAlphaChannels ( )
inline

Forces this image to discard all existing alpha channels without deallocating them. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::ForgetAlphaChannels()

Definition at line 2669 of file ImageVariant.h.

◆ Free()

ImageVariant& pcl::ImageVariant::Free ( )
inline

Removes the transported image, if there is one, from this ImageVariant object. Returns a reference to this object.

If the transported image is owned by ImageVariant, and there are no more ImageVariant references to it, then it is also destroyed.

Definition at line 6798 of file ImageVariant.h.

Referenced by pcl::FFTConvolution::EnableMagnitudeOutput().

◆ FreeImage()

ImageVariant& pcl::ImageVariant::FreeImage ( )
inline

Destroys the existing pixel data in the image transported by this ImageVariant instance. Returns a reference to this object.

This function is useful to deallocate pixel data without having to resolve the template instantiation of the transported image. PCL deallocates pixel data of any supported pixel sample type transparently.

If this ImageVariant transports no image, this function has no effect.

Note
Unlike the Free() member function, this function cannot destroy the transported image, but only its pixel data. Note that this function destroys pixel data irrespective of whether ImageVariant owns the transported image.

Definition at line 6457 of file ImageVariant.h.

◆ GetColumn()

template<typename T >
void pcl::ImageVariant::GetColumn ( T *  buffer,
int  x,
int  channel = -1 
) const
inline

Stores a duplicate of a column of pixel samples in the specified array, with implicit data type conversion.

This member function is a generalized wrapper for GenericImage::GetColumn()

Definition at line 2690 of file ImageVariant.h.

◆ GetExtremeSampleValues()

template<typename T >
void pcl::ImageVariant::GetExtremeSampleValues ( T &  min,
T &  max,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Obtains the extreme values among a subset of pixel samples of this image.

This member function is a generalized wrapper for GenericImage::GetExtremeSampleValues()

Definition at line 2711 of file ImageVariant.h.

◆ GetIntensity()

void pcl::ImageVariant::GetIntensity ( ImageVariant Y,
const Rect rect = Rect( 0 ),
int  maxProcessors = 0 
) const
inline

Computes the intensity HSI component for a subset of pixel samples and stores it in a grayscale image.

Parameters
[out]YReference to a destination ImageVariant where the computed intensity component will be stored. If this object does not transport an image, a new 32-bit floating point image will be created.

This member function is a generalized wrapper for GenericImage::GetIntensity().

Definition at line 2752 of file ImageVariant.h.

◆ GetLightness()

void pcl::ImageVariant::GetLightness ( ImageVariant L,
const Rect rect = Rect( 0 ),
int  maxProcessors = 0 
) const
inline

Computes the CIE L* component for a subset of pixel samples and stores it in a grayscale image.

Parameters
[out]LReference to a destination ImageVariant where the computed CIE L* component will be stored. If this object does not transport an image, a new floating point image will be created with the appropriate sample type (either 32-bit or 64-bit floating point, depending on the sample data type of this image).

This member function is a generalized wrapper for GenericImage::GetLightness().

Definition at line 2800 of file ImageVariant.h.

◆ GetLuminance()

void pcl::ImageVariant::GetLuminance ( ImageVariant Y,
const Rect rect = Rect( 0 ),
int  maxProcessors = 0 
) const
inline

Computes the CIE Y component for a subset of pixel samples and stores it in a grayscale image.

Parameters
[out]YReference to a destination ImageVariant where the computed CIE Y component will be stored. If this object does not transport an image, a new floating point image will be created with the appropriate sample type (either 32-bit or 64-bit floating point, depending on the sample data type of this image).

This member function is a generalized wrapper for GenericImage::GetLuminance().

Definition at line 2848 of file ImageVariant.h.

◆ GetRow()

template<typename T >
void pcl::ImageVariant::GetRow ( T *  buffer,
int  y,
int  channel = -1 
) const
inline

Stores a duplicate of a row of pixel samples in the specified array, with implicit data type conversion.

This member function is a generalized wrapper for GenericImage::GetRow()

Definition at line 2875 of file ImageVariant.h.

◆ GetSelectedChannelRange()

void pcl::ImageVariant::GetSelectedChannelRange ( int &  c0,
int &  c1 
) const
inline

Copies the first and last channel indices of the current channel selection to the specified variables.

Parameters
[out]c0Index of the first selected channel.
[out]c1Index of the last selected channel.

Definition at line 871 of file ImageVariant.h.

◆ HasAlphaChannels()

bool pcl::ImageVariant::HasAlphaChannels ( ) const
inline

Returns true iff this ImageVariant object transports an image with one or more alpha channels.

Alpha channels are those in excess of the nominal channels corresponding to the color space of the image; for example, a second channel in a grayscale image, or a fourth channel in an RGB color image.

Definition at line 547 of file ImageVariant.h.

◆ Height()

int pcl::ImageVariant::Height ( ) const
inline

Returns the height in pixels of the image transported by this ImageVariant, or zero if this object transports no image.

Definition at line 479 of file ImageVariant.h.

◆ ImagePtr() [1/2]

const AbstractImage* pcl::ImageVariant::ImagePtr ( ) const
inline

Returns a pointer to the unmodifiable image transported by this ImageVariant object.

Definition at line 406 of file ImageVariant.h.

◆ ImagePtr() [2/2]

AbstractImage* pcl::ImageVariant::ImagePtr ( )
inline

Returns a pointer to the image transported by this ImageVariant object.

Definition at line 414 of file ImageVariant.h.

◆ ImageSize()

size_type pcl::ImageVariant::ImageSize ( ) const
inline

Returns the size in bytes of the allocated pixel data in the image transported by this ImageVariant, or zero if this object transports no image.

The returned value is NumberOfSamples()*BytesPerSample().

Definition at line 1374 of file ImageVariant.h.

◆ Includes() [1/4]

template<typename T >
bool pcl::ImageVariant::Includes ( const GenericPoint< T > &  p) const
inline

Returns true iff this image includes the specified point p in image coordinates.

If this object transports no image, this function returns false.

Definition at line 622 of file ImageVariant.h.

◆ Includes() [2/4]

template<typename T >
bool pcl::ImageVariant::Includes ( const GenericRectangle< T > &  r) const
inline

Returns true iff this image includes the specified rectangle r in image coordinates.

If this object transports no image, this function returns false.

Definition at line 634 of file ImageVariant.h.

◆ Includes() [3/4]

template<typename T >
bool pcl::ImageVariant::Includes ( x0,
y0,
x1,
y1 
) const
inline

Returns true iff this image includes a rectangle given by its separate image coordinates.

Parameters
x0,y0Upper left corner coordinates (horizontal, vertical).
x1,y1Lower right corner coordinates (horizontal, vertical).

If this object transports no image, this function returns false.

Definition at line 649 of file ImageVariant.h.

◆ Includes() [4/4]

template<typename T >
bool pcl::ImageVariant::Includes ( x,
y 
) const
inline

Returns true iff this image includes a point given by its separate image coordinates.

Parameters
xHorizontal coordinate.
yVertical coordinate.

If this object transports no image, this function returns false.

Definition at line 664 of file ImageVariant.h.

◆ Intersects() [1/2]

template<typename T >
bool pcl::ImageVariant::Intersects ( const pcl::GenericRectangle< T > &  r) const
inline

Returns true iff this image intersects with the specified rectangle r in image coordinates.

If this object transports no image, this function returns false.

Definition at line 676 of file ImageVariant.h.

◆ Intersects() [2/2]

template<typename T >
bool pcl::ImageVariant::Intersects ( x0,
y0,
x1,
y1 
) const
inline

Returns true iff this image intersects with a rectangle given by its separate image coordinates.

Parameters
x0,y0Upper left corner coordinates (horizontal, vertical).
x1,y1Lower right corner coordinates (horizontal, vertical).

If this object transports no image, this function returns false.

Definition at line 691 of file ImageVariant.h.

◆ Invert() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Invert ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Inverts a subset of pixel samples with respect to the specified scalar. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Invert()

Definition at line 2896 of file ImageVariant.h.

◆ Invert() [2/2]

ImageVariant& pcl::ImageVariant::Invert ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Inverts a subset of pixel samples with respect to the maximum sample value in the native range of the image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Invert()

Definition at line 2917 of file ImageVariant.h.

◆ Inverted() [1/2]

template<typename T >
ImageVariant pcl::ImageVariant::Inverted ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Returns a local image with a subset of pixel samples from this image, inverted with respect to the specified scalar.

This member function is a generalized wrapper for GenericImage::Inverted()

Definition at line 2940 of file ImageVariant.h.

◆ Inverted() [2/2]

ImageVariant pcl::ImageVariant::Inverted ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Returns a local image with a subset of pixel samples from this image, inverted with respect to the maximum sample value in the native range of the image.

This member function is a generalized wrapper for GenericImage::Inverted()

Definition at line 2964 of file ImageVariant.h.

◆ IsAs()

template<class P >
bool pcl::ImageVariant::IsAs ( const pcl::GenericImage< P > &  ) const
inline

Returns true iff this ImageVariant object transports an image that is an instance of the same template instantiation of the specified image.

Definition at line 5840 of file ImageVariant.h.

◆ IsColor()

bool pcl::ImageVariant::IsColor ( ) const
inline

Returns true iff this ImageVariant transports a color image. Returns false if this object transports a grayscale image, or if it does not transport any image.

Definition at line 1410 of file ImageVariant.h.

◆ IsCompletelySelected()

bool pcl::ImageVariant::IsCompletelySelected ( ) const
inline

Returns true if this image is completely selected; false if it is only partially selected, or if this object does not transport an image.

In a completely selected image, the current rectangular selection includes the whole image, and the current channel range selection comprises all existing channels, including nominal and alpha channels.

Definition at line 1005 of file ImageVariant.h.

◆ IsComplexSample()

◆ IsEmptySelection()

bool pcl::ImageVariant::IsEmptySelection ( ) const
inline

Returns true iff the current selection is empty, i.e. if its area is zero. Returns false if the current selection is not empty, or if this object does not transport an image.

Definition at line 973 of file ImageVariant.h.

◆ IsFloatSample()

◆ IsFullSelection()

bool pcl::ImageVariant::IsFullSelection ( ) const
inline

Returns true iff the current rectangular selection comprises the entire image. Returns false if the selection is not complete, or if this object does not transport an image.

Definition at line 983 of file ImageVariant.h.

◆ IsParallelProcessingEnabled()

bool pcl::ImageVariant::IsParallelProcessingEnabled ( ) const
inline

Returns true iff this image is allowed to use multiple parallel execution threads (when multiple threads are permitted and available) for member functions that support parallel execution.

If this object does not transport an image, this member function returns false.

Definition at line 1261 of file ImageVariant.h.

◆ IsRangeClippingEnabled()

bool pcl::ImageVariant::IsRangeClippingEnabled ( ) const
inline

Returns true iff range clipping is currently enabled for this image. Returns false if range clipping is disabled, or if this object does not transport an image.

When range clipping is enabled, pixel samples outside the current clipping range:

]RangeClipLow(),RangeClipHigh()[

are ignored by statistics calculation routines. The clipping range is always defined in the normalized [0,1] range for all pixel sample data types; the necessary conversions are performed transparently.

When range clipping is disabled, the clipping range is ignored and all pixel samples are considered for statistics calculations.

The default clipping range is the normalized [0,1] range. Range clipping is disabled by default.

Definition at line 1050 of file ImageVariant.h.

◆ IsSameImage()

bool pcl::ImageVariant::IsSameImage ( const ImageVariant image) const
inline

Returns true iff this ImageVariant transports the same image as another image.

This member function also returns true if both objects transport no image.

Definition at line 426 of file ImageVariant.h.

◆ IsSharedImage()

bool pcl::ImageVariant::IsSharedImage ( ) const
inline

Returns true iff this ImageVariant object transports a shared image. Returns false if the transported image is local, or if this object transports no image.

This member function is a generalized wrapper for GenericImage::IsShared()

Definition at line 2989 of file ImageVariant.h.

◆ IsUniqueImage()

bool pcl::ImageVariant::IsUniqueImage ( ) const
inline

Returns true iff this ImageVariant object transports an image that uniquely references its pixel data. Returns false if the transported image is sharing its pixel data with other instances, or if this object transports no image.

This member function is a generalized wrapper for GenericImage::IsUnique()

Definition at line 3039 of file ImageVariant.h.

◆ IsValidChannelIndex()

bool pcl::ImageVariant::IsValidChannelIndex ( int  c) const
inline

Returns true iff the specified channel index c is valid. A valid channel index corresponds to an existing channel in this image. Returns false if this object does not transport an image.

Definition at line 521 of file ImageVariant.h.

◆ LastChannel()

int pcl::ImageVariant::LastChannel ( ) const
inline

Returns the index of the last existing channel in this image. This is the largest valid channel index that can be used with this image, corresponding to a nominal or alpha channel. If the image transported by this object is empty, or if this object does not transport an image, this function returns -1.

Definition at line 511 of file ImageVariant.h.

◆ LastSelectedChannel()

int pcl::ImageVariant::LastSelectedChannel ( ) const
inline

Returns the channel index of the last selected channel, or -1 if this object does not transport an image.

Definition at line 859 of file ImageVariant.h.

◆ LineSize()

size_type pcl::ImageVariant::LineSize ( ) const
inline

Returns the size in bytes of a row of pixels (also known as a scan line) in the image transported by this ImageVariant image, or zero if this object transports no image.

The returned value is BytesPerSample()*Width().

Definition at line 1351 of file ImageVariant.h.

◆ LocateExtremeSampleValues() [1/2]

template<typename T >
void pcl::ImageVariant::LocateExtremeSampleValues ( int &  xmin,
int &  ymin,
T &  min,
int &  xmax,
int &  ymax,
T &  max,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Obtains the extreme values, and the image coordinates of their first occurrences, among a subset of pixel samples of this image.

This member function is a generalized wrapper for GenericImage::LocateExtremeSampleValues()

Definition at line 3062 of file ImageVariant.h.

◆ LocateExtremeSampleValues() [2/2]

template<typename T >
void pcl::ImageVariant::LocateExtremeSampleValues ( Point pmin,
T &  min,
Point pmax,
T &  max,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Obtains the extreme values, and the image coordinates of their first occurrences, among a subset of pixel samples of this image.

This member function is a generalized wrapper for GenericImage::LocateExtremeSampleValues()

Definition at line 3086 of file ImageVariant.h.

◆ LocateMaximumSampleValue() [1/2]

double pcl::ImageVariant::LocateMaximumSampleValue ( int &  xmax,
int &  ymax,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns the maximum value among a subset of pixel samples of this image, and obtains the image coordinates of its first occurrence.

This member function is a generalized wrapper for GenericImage::LocateMaximumSampleValue()

Definition at line 3109 of file ImageVariant.h.

◆ LocateMaximumSampleValue() [2/2]

double pcl::ImageVariant::LocateMaximumSampleValue ( Point pmax,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns the maximum value among a subset of pixel samples of this image, and obtains the image coordinates of its first occurrence.

This member function is a generalized wrapper for GenericImage::LocateMaximumSampleValue()

Definition at line 3132 of file ImageVariant.h.

◆ LocateMinimumSampleValue() [1/2]

double pcl::ImageVariant::LocateMinimumSampleValue ( int &  xmin,
int &  ymin,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns the minimum value among a subset of pixel samples of this image, and obtains the image coordinates of its first occurrence.

This member function is a generalized wrapper for GenericImage::LocateMinimumSampleValue()

Definition at line 3155 of file ImageVariant.h.

◆ LocateMinimumSampleValue() [2/2]

double pcl::ImageVariant::LocateMinimumSampleValue ( Point pmin,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns the minimum value among a subset of pixel samples of this image, and obtains the image coordinates of its first occurrence.

This member function is a generalized wrapper for GenericImage::LocateMinimumSampleValue()

Definition at line 3179 of file ImageVariant.h.

◆ MAD()

double pcl::ImageVariant::MAD ( double  center,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns the median absolute deviation (MAD) of a subset of pixel samples with respect to the specified center value.

This member function is a generalized wrapper for GenericImage::MAD()

Definition at line 3201 of file ImageVariant.h.

◆ MaskFromSwapFile()

void pcl::ImageVariant::MaskFromSwapFile ( const String filePath,
const ImageVariant mask,
bool  invert = false,
bool  processEvents = false 
)

Merges the image transported by this object with pixel data read from a raw storage file, masking it with the image transported by another ImageVariant instance.

Parameters
filePathA file path specification to an existing raw storage image file.
maskA reference to an ImageVariant instance whose transported image will act as a mask for the merge operation.
invertIf this argument is true, mask pixels will be inverted before carrying out the merge operation.
processEventsIf true, Module->ProcessEvents() will be called at regular intervals during the file read operation. This is useful to keep the graphical interface responsive during long disk operations. The default value is false.

Given a pixel V of the image transported by this instance, a pixel S read from the input file, and a pixel M of the mask image, the original pixel V is replaced by the result V' of the following expression:

if invert
   M = 1 - M
V' = V*( 1 - M ) + S*M

in the normalized real range [0,1], where 1 represents a saturated (usually white) pixel sample value.

◆ MaskFromSwapFiles()

void pcl::ImageVariant::MaskFromSwapFiles ( const String fileName,
const StringList directories,
const ImageVariant mask,
bool  invert = false,
bool  processEvents = false 
)

Merges the image transported by this object with pixel data read from a set of raw storage files through parallel disk read operations, masking it with the image transported by another ImageVariant instance.

Parameters
fileNameBase file name for the raw storage files from which source pixels will be read to be merged with this image.
directoriesA list of directories where the set of raw files have been created by a previous call to WriteSwapFiles( const String&, const StringList& ).
maskA reference to an ImageVariant instance whose transported image will act as a mask for the merge operation.
invertIf this argument is true, mask pixels will be inverted before carrying out the merge operation.
processEventsIf true, Module->ProcessEvents() will be called at regular intervals during the file read operation. This is useful to keep the graphical interface responsive during long disk operations. The default value is false.

This routine produces exactly the same result as its single-threaded counterpart MaskFromSwapFile().

Warning
This function is not thread-safe: it can only be called from the root thread. This function will throw an Error exception if it is called from a local thread.

◆ MaskImage()

void pcl::ImageVariant::MaskImage ( const ImageVariant src,
const ImageVariant mask,
bool  invert = false 
)

Merges the image transported by this object with the image transported by another ImageVariant instance, masking it with the image transported by a third ImageVariant instance.

Parameters
srcA reference to an ImageVariant instance whose transported image will be the source of the merge operation.
maskA reference to an ImageVariant instance whose transported image will act as a mask for the merge operation.
invertIf this argument is true, mask pixels will be inverted before carrying out the merge operation.

Given a pixel V of the image transported by this instance, a pixel S of the image transported by the source ImageVariant instance, and a pixel M of the mask image, the original pixel V is replaced by the result V' of the following expression:

if invert
   M = 1 - M
V' = V*( 1 - M ) + S*M

in the normalized real range [0,1], where 1 represents a saturated (usually white) pixel sample value.

◆ Max() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Max ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

A synonym for SetMaximum().

Definition at line 4679 of file ImageVariant.h.

◆ Max() [2/2]

ImageVariant& pcl::ImageVariant::Max ( const ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

A synonym for SetMaximum().

Definition at line 4727 of file ImageVariant.h.

◆ Maximum()

template<typename T >
ImageVariant pcl::ImageVariant::Maximum ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Creates a local image with a subset of pixel samples from this image, and computes the maximum of each sample and the specified scalar. Returns the resulting image.

This member function is a generalized wrapper for GenericImage::Maximum()

Definition at line 3225 of file ImageVariant.h.

◆ MaximumSampleValue()

double pcl::ImageVariant::MaximumSampleValue ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns the maximum value among a subset of pixel samples of this image.

This member function is a generalized wrapper for GenericImage::MaximumSampleValue()

Definition at line 3246 of file ImageVariant.h.

◆ MaxProcessors()

int pcl::ImageVariant::MaxProcessors ( ) const
inline

Returns the maximum number of processors allowed for this image, or zero if this object does not transport an image.

The returned nonzero value is the maximum number of processors that this image can use in member functions that support parallel execution.

Irrespective of the value returned by this function, a module should not use more processors than the maximum number of parallel threads allowed for external modules on the PixInsight platform. This number is given by the "Process/MaxProcessors" global variable (refer to the GlobalSettings class for information on global variables).

Definition at line 1313 of file ImageVariant.h.

◆ Mean()

double pcl::ImageVariant::Mean ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns the arithmetic mean of a subset of pixel samples.

This member function is a generalized wrapper for GenericImage::Mean()

Definition at line 3266 of file ImageVariant.h.

◆ MeanOfSquares()

double pcl::ImageVariant::MeanOfSquares ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns the mean of the squares of a subset of pixel samples.

This member function is a generalized wrapper for GenericImage::MeanOfSquares()

Definition at line 3287 of file ImageVariant.h.

◆ Median()

double pcl::ImageVariant::Median ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns the median of a subset of pixel samples.

This member function is a generalized wrapper for GenericImage::Median()

Definition at line 3307 of file ImageVariant.h.

◆ Min() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Min ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

A synonym for SetMinimum().

Definition at line 4760 of file ImageVariant.h.

◆ Min() [2/2]

ImageVariant& pcl::ImageVariant::Min ( const ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

A synonym for SetMinimum().

Definition at line 4808 of file ImageVariant.h.

◆ Minimum()

template<typename T >
ImageVariant pcl::ImageVariant::Minimum ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Creates a local image with a subset of pixel samples from this image, and computes the minimum of each sample and the specified scalar. Returns the resulting image.

This member function is a generalized wrapper for GenericImage::Minimum()

Definition at line 3331 of file ImageVariant.h.

◆ MinimumSampleValue()

double pcl::ImageVariant::MinimumSampleValue ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns the minimum value among a subset of pixel samples of this image.

This member function is a generalized wrapper for GenericImage::MinimumSampleValue()

Definition at line 3352 of file ImageVariant.h.

◆ Modulus()

double pcl::ImageVariant::Modulus ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns the modulus of a subset of pixel samples. The modulus is the sum of the absolute values of all selected pixel sample values.

This member function is a generalized wrapper for GenericImage::Modulus()

Definition at line 3373 of file ImageVariant.h.

◆ Mov()

template<typename T >
ImageVariant& pcl::ImageVariant::Mov ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

A synonym for Move().

Definition at line 3408 of file ImageVariant.h.

◆ Move() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Move ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Replaces a subset of pixel samples in this image with the specified constant scalar. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Move()

Definition at line 3395 of file ImageVariant.h.

◆ Move() [2/2]

ImageVariant& pcl::ImageVariant::Move ( const ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Replaces a subset of pixel samples in this image with samples from the specified source image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Move()

Definition at line 3438 of file ImageVariant.h.

◆ Mul() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Mul ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

A synonym for Multiply().

Definition at line 3484 of file ImageVariant.h.

◆ Mul() [2/2]

ImageVariant& pcl::ImageVariant::Mul ( const ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

A synonym for Multiply().

Definition at line 3531 of file ImageVariant.h.

◆ Multiplied()

template<typename T >
ImageVariant pcl::ImageVariant::Multiplied ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Creates a local image with a subset of pixel samples from this image, and multiplies it by a scalar. Returns the resulting image.

This member function is a generalized wrapper for GenericImage::Multiplied()

Definition at line 3552 of file ImageVariant.h.

◆ Multiply() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Multiply ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Multiplies a subset of pixel samples in this image by the specified scalar. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Multiply()

Definition at line 3471 of file ImageVariant.h.

◆ Multiply() [2/2]

ImageVariant& pcl::ImageVariant::Multiply ( const ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Multiplies a subset of pixel samples in this image by samples from the specified source image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Multiply()

Definition at line 3515 of file ImageVariant.h.

◆ Nand() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Nand ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Performs a bitwise NAND (NOT AND) operation between a subset of pixel samples in this image and the specified scalar. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Nand()

Definition at line 3575 of file ImageVariant.h.

◆ Nand() [2/2]

ImageVariant& pcl::ImageVariant::Nand ( const ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Performs a bitwise NAND (NOT AND) operation between a subset of pixel samples in this image and the corresponding samples of the specified source image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Nand()

Definition at line 3610 of file ImageVariant.h.

◆ NewCompression()

static Compression* pcl::ImageVariant::NewCompression ( swap_compression  algorithm,
int  itemSize = 1 
)
static

Returns a pointer to a dynamically allocated Compression object. The returned object implements the specified raw storage compression algorithm for compression of a contiguous sequence of elements with itemSize bytes each.

◆ NominalSize()

size_type pcl::ImageVariant::NominalSize ( ) const
inline

Returns the size in bytes of all memory blocks required to store the pixel data in the nominal channels (i.e., excluding alpha channels) of the image transported by this ImageVariant, or zero if this object transports no image.

The returned value is ChannelSize()*NumberOfNominalChannels().

Definition at line 1387 of file ImageVariant.h.

References pcl::ColorSpace::NumberOfNominalChannels().

◆ Nor() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Nor ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Performs a bitwise NOR (NOT inclusive OR) operation between a subset of pixel samples in this image and the specified scalar. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Nor()

Definition at line 3636 of file ImageVariant.h.

◆ Nor() [2/2]

ImageVariant& pcl::ImageVariant::Nor ( const ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Performs a bitwise NOR (NOT inclusive OR) operation between a subset of pixel samples in this image and the corresponding samples of the specified source image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Nor()

Definition at line 3671 of file ImageVariant.h.

◆ Norm()

double pcl::ImageVariant::Norm ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns the norm of a subset of pixel samples. The norm is the sum of all selected pixel sample values.

This member function is a generalized wrapper for GenericImage::Norm()

Definition at line 3695 of file ImageVariant.h.

◆ Normalize() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Normalize ( lowerBound,
upperBound,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Normalizes a subset of pixel samples to the specified range of values. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Normalize()

Definition at line 3718 of file ImageVariant.h.

◆ Normalize() [2/2]

ImageVariant& pcl::ImageVariant::Normalize ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Normalizes a subset of pixel samples to the native range of the image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Normalize()

Definition at line 3739 of file ImageVariant.h.

◆ Normalized() [1/2]

template<typename T >
ImageVariant pcl::ImageVariant::Normalized ( lowerBound,
upperBound,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Returns a local image with a subset of pixel samples from this image, normalized to the specified range of values.

This member function is a generalized wrapper for GenericImage::Normalized()

Definition at line 3762 of file ImageVariant.h.

◆ Normalized() [2/2]

ImageVariant pcl::ImageVariant::Normalized ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Returns a local image with a subset of pixel samples from this image, normalized to the native range of the image.

This member function is a generalized wrapper for GenericImage::Normalized()

Definition at line 3785 of file ImageVariant.h.

◆ Not()

ImageVariant& pcl::ImageVariant::Not ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Replaces a subset of pixel samples with their bitwise logical NOT values. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Not()

Definition at line 3806 of file ImageVariant.h.

◆ NumberOfAlphaChannels()

int pcl::ImageVariant::NumberOfAlphaChannels ( ) const
inline

Returns the number of alpha channels in the image transported by this ImageVariant, or zero if this object transports no image.

Alpha channels are those in excess of the nominal channels corresponding to the color space of the image; for example, a second channel in a grayscale image, or a fourth channel in an RGB color image.

Definition at line 560 of file ImageVariant.h.

◆ NumberOfAlphaSamples()

size_type pcl::ImageVariant::NumberOfAlphaSamples ( ) const
inline

Returns the total number of alpha samples in the image transported by this ImageVariant, or zero if this object does not transport an image.

The number of alpha samples is equal to NumberOfPixels()*NumberOfAlphaChannels().

Definition at line 595 of file ImageVariant.h.

◆ NumberOfChannels()

int pcl::ImageVariant::NumberOfChannels ( ) const
inline

Returns the total number of channels in the image transported by this ImageVariant, or zero if this object transports no image.

Definition at line 499 of file ImageVariant.h.

◆ NumberOfNominalChannels()

int pcl::ImageVariant::NumberOfNominalChannels ( ) const
inline

Returns the number of nominal channels in the image transported by this ImageVariant, or zero if this object transports no image.

Nominal channels are those defined by the color space of the image: One channel for monochrome grayscale images, and three channels for RGB color images. Additional channels are known as alpha channels.

Definition at line 534 of file ImageVariant.h.

◆ NumberOfNominalSamples()

size_type pcl::ImageVariant::NumberOfNominalSamples ( ) const
inline

Returns the total number of nominal samples in the image transported by this ImageVariant, or zero if this object does not transport an image.

The number of nominal samples is equal to NumberOfPixels()*NumberOfNominalChannels().

Definition at line 583 of file ImageVariant.h.

◆ NumberOfPixels()

size_type pcl::ImageVariant::NumberOfPixels ( ) const
inline

Returns the number of pixels in the image transported by this ImageVariant, or zero if this object transports no image.

The returned value is equal to Width()*Height().

Definition at line 490 of file ImageVariant.h.

◆ NumberOfSamples()

size_type pcl::ImageVariant::NumberOfSamples ( ) const
inline

Returns the total number of samples in the image transported by this ImageVariant, or zero if this object does not transport an image.

The number of samples is equal to NumberOfPixels()*NumberOfChannels().

Definition at line 571 of file ImageVariant.h.

◆ NumberOfSelectedChannels()

int pcl::ImageVariant::NumberOfSelectedChannels ( ) const
inline

Returns the number of selected channels, or zero if this object does not transport an image.

Definition at line 841 of file ImageVariant.h.

◆ NumberOfSelectedPixels()

size_type pcl::ImageVariant::NumberOfSelectedPixels ( ) const
inline

Returns the number of selected pixels. This is the area in square pixels of the current selection rectangle. Returns zero if this object does not transport an image.

Definition at line 1015 of file ImageVariant.h.

◆ NumberOfSelectedSamples()

size_type pcl::ImageVariant::NumberOfSelectedSamples ( ) const
inline

Returns the number of selected samples. This is the area in square pixels of the current selection rectangle multiplied by the number of selected channels. Returns zero if this object does not transport an image.

Definition at line 1025 of file ImageVariant.h.

◆ One()

ImageVariant& pcl::ImageVariant::One ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Fills a subset of pixel samples with the constant value resulting from converting the scalar one (1) to the sample data type of the image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::One()

Definition at line 3827 of file ImageVariant.h.

◆ operator bool()

pcl::ImageVariant::operator bool ( ) const
inline

Returns true iff this ImageVariant instance transports an image.

Definition at line 6866 of file ImageVariant.h.

◆ operator()()

double pcl::ImageVariant::operator() ( int  x,
int  y,
int  channel = 0 
) const
inline

Returns a pixel sample value, given by its pixel coordinates and channel index.

Parameters
xHorizontal coordinate (or column index) of the desired pixel, 0 ≤ x < w, where w is the width in pixels of this image.
yVertical coordinate (or row index) of the desired scan line, 0 ≤ y < h, where h is the height in pixels of this image.
channelChannel index, 0 ≤ channel < n, where n is the number of channels in this image, including nominal and alpha channels. The default value is zero.

This member function returns the requested pixel sample in the normalized range [0,1], irrespective of the sample data type of the image. This function conventionally returns zero if this object transports no image.

Note
For the sake of performance, this function does not check validity of coordinates and channel indexes. Specifying invalid coordinates may lead to unpredictable results, most likey raising an access violation signal or exception.

Definition at line 6899 of file ImageVariant.h.

◆ operator*() [1/2]

const AbstractImage& pcl::ImageVariant::operator* ( ) const
inline

Dereference operator. Returns a reference to the constant image transported by this ImageVariant object.

Warning
Do not call this member function if the ImageVariant does not transport an image.

Definition at line 6844 of file ImageVariant.h.

◆ operator*() [2/2]

AbstractImage& pcl::ImageVariant::operator* ( )
inline

Dereference operator. Returns a reference to the image transported by this ImageVariant object.

Warning
Do not call this member function if the ImageVariant does not transport an image.

Definition at line 6857 of file ImageVariant.h.

◆ operator*=() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::operator*= ( scalar)
inline

A synonym for Multiply().

Definition at line 3845 of file ImageVariant.h.

◆ operator*=() [2/2]

ImageVariant& pcl::ImageVariant::operator*= ( const ImageVariant image)
inline

A synonym for Multiply().

Definition at line 3875 of file ImageVariant.h.

◆ operator+=() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::operator+= ( scalar)
inline

A synonym for Add().

Definition at line 3895 of file ImageVariant.h.

◆ operator+=() [2/2]

ImageVariant& pcl::ImageVariant::operator+= ( const ImageVariant image)
inline

A synonym for Add().

Definition at line 3925 of file ImageVariant.h.

◆ operator-=() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::operator-= ( scalar)
inline

A synonym for Subtract().

Definition at line 3945 of file ImageVariant.h.

◆ operator-=() [2/2]

ImageVariant& pcl::ImageVariant::operator-= ( const ImageVariant image)
inline

A synonym for Subtract().

Definition at line 3975 of file ImageVariant.h.

◆ operator->() [1/2]

const AbstractImage* pcl::ImageVariant::operator-> ( ) const
inline

Structure member selection operator. Returns a pointer to the constant image transported by this ImageVariant object.

Warning
Do not call this member function if the ImageVariant does not transport an image.

Definition at line 6818 of file ImageVariant.h.

◆ operator->() [2/2]

AbstractImage* pcl::ImageVariant::operator-> ( )
inline

Structure member selection operator. Returns a pointer to the image transported by this ImageVariant object.

Warning
Do not call this member function if the ImageVariant does not transport an image.

Definition at line 6831 of file ImageVariant.h.

◆ operator/=() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::operator/= ( scalar)
inline

A synonym for Divide().

Definition at line 3995 of file ImageVariant.h.

◆ operator/=() [2/2]

ImageVariant& pcl::ImageVariant::operator/= ( const ImageVariant image)
inline

A synonym for Divide().

Definition at line 4025 of file ImageVariant.h.

◆ operator=() [1/2]

ImageVariant& pcl::ImageVariant::operator= ( const ImageVariant image)
inline

Copy assignment operator. Returns a reference to this object.

This operator calls Assign() with the specified source image.

Definition at line 5868 of file ImageVariant.h.

◆ operator=() [2/2]

ImageVariant& pcl::ImageVariant::operator= ( ImageVariant &&  image)
inline

Move assignment operator. Returns a reference to this object.

This operator calls Transfer() with the specified source image.

Definition at line 5921 of file ImageVariant.h.

◆ operator^=() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::operator^= ( scalar)
inline

A synonym for Raise().

Definition at line 4045 of file ImageVariant.h.

◆ operator^=() [2/2]

ImageVariant& pcl::ImageVariant::operator^= ( const ImageVariant image)
inline

A synonym for Raise().

Definition at line 4075 of file ImageVariant.h.

◆ operator~()

ImageVariant pcl::ImageVariant::operator~ ( ) const
inline

Returns an inverted duplicate of this image. The inversion operation is performed on the current pixel sample selection with respect to the maximum sample value in the native range of the image.

This member function is a generalized wrapper for GenericImage::operator ~()

Definition at line 4100 of file ImageVariant.h.

◆ Or() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Or ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Performs a bitwise OR (inclusive OR) operation between a subset of pixel samples in this image and the specified scalar. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Or()

Definition at line 4123 of file ImageVariant.h.

◆ Or() [2/2]

ImageVariant& pcl::ImageVariant::Or ( const ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Performs a bitwise OR (inclusive OR) operation between a subset of pixel samples in this image and the corresponding samples of the specified source image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Or()

Definition at line 4158 of file ImageVariant.h.

◆ OwnsImage()

bool pcl::ImageVariant::OwnsImage ( ) const
inline

Returns true iff ImageVariant owns the image transported by this instance, if any.

Definition at line 6770 of file ImageVariant.h.

◆ PopSelections()

void pcl::ImageVariant::PopSelections ( ) const
inline

Restores and pops (removes) the current selections (rectangular area, channel range, anchor point and range clipping) from the internal selection stack.

If no selections have been previously pushed to the internal selection stack, this function is ignored.

Definition at line 1200 of file ImageVariant.h.

◆ Pow() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Pow ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

A synonym for Raise().

Definition at line 4196 of file ImageVariant.h.

◆ Pow() [2/2]

ImageVariant& pcl::ImageVariant::Pow ( const ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

A synonym for Raise().

Definition at line 4264 of file ImageVariant.h.

◆ PushSelections()

void pcl::ImageVariant::PushSelections ( ) const
inline

Saves the current selections (rectangular area, channel range, anchor point and range clipping), pushing them to the internal selection stack.

Definition at line 1186 of file ImageVariant.h.

◆ Qn()

double pcl::ImageVariant::Qn ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns the Qn scale estimator of Rousseeuw and Croux for a subset of pixel samples.

This member function is a generalized wrapper for GenericImage::Qn()

Definition at line 4212 of file ImageVariant.h.

◆ Raise() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Raise ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Raises (exponentiation operator) a subset of pixel samples in this image to the specified scalar. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Raise()

Definition at line 4183 of file ImageVariant.h.

◆ Raise() [2/2]

ImageVariant& pcl::ImageVariant::Raise ( const ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Raises (exponentiation operator) a subset of pixel samples in this image to samples from the specified source image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Raise()

Definition at line 4248 of file ImageVariant.h.

◆ Raised()

template<typename T >
ImageVariant pcl::ImageVariant::Raised ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Creates a local image with a subset of pixel samples from this image, and raises it to a scalar. Returns the resulting image.

This member function is a generalized wrapper for GenericImage::Raised()

Definition at line 4284 of file ImageVariant.h.

◆ RangeClipHigh()

double pcl::ImageVariant::RangeClipHigh ( ) const
inline

Returns the upper bound of the current clipping range. Returns zero if this object does not transport an image.

See IsRangeClippingEnabled() for more information on range clipping.

Definition at line 1094 of file ImageVariant.h.

◆ RangeClipLow()

double pcl::ImageVariant::RangeClipLow ( ) const
inline

Returns the lower bound of the current clipping range. Returns zero if this object does not transport an image.

See IsRangeClippingEnabled() for more information on range clipping.

Definition at line 1083 of file ImageVariant.h.

◆ Read() [1/2]

ImageVariant& pcl::ImageVariant::Read ( File file)
inline

Reads an image from a raw-storage stream. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Read()

Definition at line 4305 of file ImageVariant.h.

◆ Read() [2/2]

ImageVariant& pcl::ImageVariant::Read ( const String filePath)
inline

Reads an image from a raw-storage file. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Read()

Definition at line 4325 of file ImageVariant.h.

◆ ReadSwapFile()

void pcl::ImageVariant::ReadSwapFile ( const String filePath,
Compression::Performance perf = nullptr,
bool  processEvents = false 
)

Reads the image transported by this ImageVariant instance from a raw storage file.

Parameters
filePathA file path specification to an existing raw storage image file.
perfIf non-null, pointer to a Compression::Performance structure where compression performance data will be provided if the raw file is compressed.
processEventsIf true, Module->ProcessEvents() will be called at regular intervals during the file read operation. This is useful to keep the graphical interface responsive during long disk operations. The default value is false.

If necessary, the transported image is re-created as an instance of a different template instantiation, to match the sample data type stored in the input file.

In any case, if ImageVariant owned the previously transported image ( if any ), it is destroyed before reading the new one.

This function is useful to read pixel data without having to resolve template instantiation, neither of the input file nor of the transported image. PCL does all the necessary data reading, decompression, allocation and deallocation transparently.

◆ ReadSwapFiles()

void pcl::ImageVariant::ReadSwapFiles ( const String fileName,
const StringList directories,
Compression::Performance perf = nullptr,
bool  processEvents = false 
)

Reads an image from a set of raw storage files using parallel disk read operations.

Parameters
fileNameBase file name for the raw storage files.
directoriesA list of directories where the set of raw files have been created by a previous call to WriteSwapFiles( const String&, const StringList& ).
perfIf non-null, pointer to a Compression::Performance structure where compression performance data will be provided if the raw files are compressed. Output performance values are the averages of the same values computed for all threads.
processEventsIf true, Module->ProcessEvents() will be called at regular intervals during the file read operation. This is useful to keep the graphical interface responsive during long disk operations. The default value is false.

The read image will be transported and owned by this ImageVariant instance. If an image is already transported by this object before calling this function, it is removed by a call to Free() prior to the reading operation.

If necessary, the transported image is re-created as an instance of a different template instantiation, to match the sample data type stored in the input file(s).

Warning
This function is not thread-safe: it can only be called from the root thread. This function will throw an Error exception if it is called from a local thread.

◆ ReleaseTo()

void pcl::ImageVariant::ReleaseTo ( ImageVariant image)
inline

Releases the image transported by this object and forces another ImageVariant instance to transport it.

Unlike move assignment (or, equivalently, the Transfer() member function), this object will be in a valid empty state after calling this function.

Definition at line 5934 of file ImageVariant.h.

◆ Rescale() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Rescale ( lowerBound,
upperBound,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Rescales a subset of pixel samples to the specified range of values. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Rescale()

Definition at line 4346 of file ImageVariant.h.

◆ Rescale() [2/2]

ImageVariant& pcl::ImageVariant::Rescale ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Rescales a subset of pixel samples to the native range of the image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Rescale()

Definition at line 4366 of file ImageVariant.h.

◆ Rescaled() [1/2]

template<typename T >
ImageVariant pcl::ImageVariant::Rescaled ( lowerBound,
upperBound,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Returns a local image with a subset of pixel samples from this image, rescaled to the specified range of values.

This member function is a generalized wrapper for GenericImage::Rescaled()

Definition at line 4389 of file ImageVariant.h.

◆ Rescaled() [2/2]

ImageVariant pcl::ImageVariant::Rescaled ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Returns a local image with a subset of pixel samples from this image, rescaled to the native range of the image.

This member function is a generalized wrapper for GenericImage::Rescaled()

Definition at line 4412 of file ImageVariant.h.

◆ ResetChannelRange()

void pcl::ImageVariant::ResetChannelRange ( ) const
inline

Resets the channel range selection to include all existing channels (all nominal and alpha channels) in this image.

Definition at line 831 of file ImageVariant.h.

◆ ResetPoint()

void pcl::ImageVariant::ResetPoint ( ) const
inline

Resets the anchor point to the origin of image coordinates, i.e to x=y=0.

Definition at line 901 of file ImageVariant.h.

◆ ResetRangeClipping()

void pcl::ImageVariant::ResetRangeClipping ( ) const
inline

Resets the range clipping parameters:

Clipping range lower bound = 0.0 Clipping range upper bound = 1.0 Range clipping disabled

Definition at line 1140 of file ImageVariant.h.

◆ ResetSelection()

void pcl::ImageVariant::ResetSelection ( ) const
inline

Resets the rectangular selection to include the entire image boundaries.

Definition at line 962 of file ImageVariant.h.

◆ ResetSelections()

void pcl::ImageVariant::ResetSelections ( ) const
inline

Resets all image selections to default values:

  • All channels are selected, including nominal and alpha channels.
  • The anchor point is located at {0,0}, that is the upper left corner.
  • The rectangular selection is set to comprise the entire image.
  • The clipping range is set to [0,1].
  • Range clipping is disabled.

Calling this member function is equivalent to:

Definition at line 1164 of file ImageVariant.h.

◆ RGBWorkingSpace()

const RGBColorSystem& pcl::ImageVariant::RGBWorkingSpace ( ) const
inline

Returns a reference to the RGB working space associated with the image transported by this ImageVariant object.

Warning
Do not call this member function if the ImageVariant does not transport an image.

Definition at line 1445 of file ImageVariant.h.

◆ SelectAlphaChannels()

void pcl::ImageVariant::SelectAlphaChannels ( ) const
inline

Sets the current channel range selection to include the existing alpha channels only, excluding the nominal channels.

Note
If this image has no alpha channels, this function selects the last nominal channel. The channel range selection cannot be empty by design.

Definition at line 821 of file ImageVariant.h.

◆ SelectChannel()

void pcl::ImageVariant::SelectChannel ( int  c) const
inline

Selects a single channel.

Parameters
cChannel index, 0 ≤ c < n, where n is the total number of channels in this image, including alpha channels.

Definition at line 771 of file ImageVariant.h.

◆ SelectChannelRange()

void pcl::ImageVariant::SelectChannelRange ( int  c0,
int  c1 
) const
inline

Selects a range of channels by their channel indices. The selected range includes the two channels specified.

Parameters
c0Index of the first channel to select.
c1Index of the last channel to select.

Definition at line 798 of file ImageVariant.h.

◆ SelectedChannel()

int pcl::ImageVariant::SelectedChannel ( ) const
inline

Returns the index of the currently selected channel, or -1 if this object does not transport an image.

If the current channel selection includes more than one channel, this function returns the index of the first selected channel.

This function is a convenience synonym for FirstSelectedChannel().

Definition at line 786 of file ImageVariant.h.

◆ SelectedPoint()

Point pcl::ImageVariant::SelectedPoint ( ) const
inline

Returns the current anchor point, or zero if this object does not transport an image.

Definition at line 911 of file ImageVariant.h.

◆ SelectedRectangle()

Rect pcl::ImageVariant::SelectedRectangle ( ) const
inline

Returns the current rectangular selection, or zero if this object does not transport an image.

Definition at line 992 of file ImageVariant.h.

◆ Selections()

ImageSelections& pcl::ImageVariant::Selections ( ) const
inline

Returns a reference to the internal ImageSelections object in the image transported by this ImageVariant.

Note
This member function assumes that this object transports a valid image. Do not call it otherwise.

Definition at line 1177 of file ImageVariant.h.

◆ SelectNominalChannels()

void pcl::ImageVariant::SelectNominalChannels ( ) const
inline

Sets the current channel range selection to include all nominal channels exclusively, excluding alpha channels.

Definition at line 808 of file ImageVariant.h.

◆ SelectPoint() [1/2]

void pcl::ImageVariant::SelectPoint ( int  x,
int  y 
) const
inline

Selects an anchor point by its separate image coordinates.

Parameters
xHorizontal coordinate of the new anchor point.
yVertical coordinate of the new anchor point.

Definition at line 883 of file ImageVariant.h.

◆ SelectPoint() [2/2]

void pcl::ImageVariant::SelectPoint ( const Point p) const
inline

Selects a new anchor point p in image coordinates.

Definition at line 892 of file ImageVariant.h.

◆ SelectRectangle() [1/3]

void pcl::ImageVariant::SelectRectangle ( int  x0,
int  y0,
int  x1,
int  y1 
) const
inline

Defines the current rectangular selection by its separate image coordinates.

Parameters
x0,y0Upper left corner coordinates (horizontal, vertical) of the new rectangular selection.
x1,y1Lower right corner coordinates (horizontal, vertical) of the new rectangular selection.

The resulting selection is constrained to stay within the image boundaries.

Definition at line 929 of file ImageVariant.h.

◆ SelectRectangle() [2/3]

void pcl::ImageVariant::SelectRectangle ( const Point p0,
const Point p1 
) const
inline

Defines the current rectangular selection by its separate corner points in image coordinates.

Parameters
p0Position of the upper left corner of the new selection.
p1Position of the lower right corner of the new selection.

Definition at line 943 of file ImageVariant.h.

◆ SelectRectangle() [3/3]

void pcl::ImageVariant::SelectRectangle ( const Rect r) const
inline

Defines the current rectangular selection as the specified rectangle r in image coordinates.

Definition at line 953 of file ImageVariant.h.

◆ SetAbsoluteDifference() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::SetAbsoluteDifference ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Replaces a subset of pixel samples in this image with the absolute values of their differences with the specified scalar. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::SetAbsoluteDifference()

Definition at line 4436 of file ImageVariant.h.

◆ SetAbsoluteDifference() [2/2]

ImageVariant& pcl::ImageVariant::SetAbsoluteDifference ( const ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Replaces a subset of pixel samples in this image with the absolute values of their differences with samples from the specified source image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::SetAbsoluteDifference()

Definition at line 4481 of file ImageVariant.h.

◆ SetAbsoluteValue()

ImageVariant& pcl::ImageVariant::SetAbsoluteValue ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Replaces a subset of pixel samples with their absolute values. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::SetAbsoluteValue()

Definition at line 4513 of file ImageVariant.h.

◆ SetColorSpace()

ImageVariant& pcl::ImageVariant::SetColorSpace ( color_space  colorSpace,
int  maxProcessors = 0 
)
inline

Converts the image to the specified color space. Returns a reference to this object.

This member function is a generalized wrapper for GenericImage::SetColorSpace()

Definition at line 4539 of file ImageVariant.h.

◆ SetColumn()

template<typename T >
ImageVariant& pcl::ImageVariant::SetColumn ( const T *  buffer,
int  x,
int  channel = -1 
)
inline

Sets a column of pixel samples from values in the specified array, with implicit data type conversion. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::SetColumn()

Definition at line 4561 of file ImageVariant.h.

◆ SetImage()

template<class P >
ImageVariant& pcl::ImageVariant::SetImage ( GenericImage< P > &  image)
inline

Forces this instance of ImageVariant to transport the specified image. Returns a reference to this object.

If the previously transported image (if any) was owned by ImageVariant, and there are no more ImageVariant references to it, then it is destroyed before referencing the specified image.

Definition at line 5954 of file ImageVariant.h.

◆ SetLightness()

ImageVariant& pcl::ImageVariant::SetLightness ( const ImageVariant L,
const Point point = Point( int_max ),
const Rect rect = Rect( 0 ),
int  maxProcessors = 0 
)
inline

Replaces the CIE L* component of a subset of pixel samples with data extracted from another image.

This member function is a generalized wrapper for GenericImage::SetLightness()

Definition at line 4598 of file ImageVariant.h.

◆ SetLuminance()

ImageVariant& pcl::ImageVariant::SetLuminance ( const ImageVariant Y,
const Point point = Point( int_max ),
const Rect rect = Rect( 0 ),
int  maxProcessors = 0 
)
inline

Replaces the CIE Y component of a subset of pixel samples with data extracted from another image.

This member function is a generalized wrapper for GenericImage::SetLuminance()

Definition at line 4639 of file ImageVariant.h.

◆ SetMaximum() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::SetMaximum ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Replaces a subset of pixel samples in this image with the maximum of each sample and the specified scalar. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::SetMaximum()

Definition at line 4666 of file ImageVariant.h.

◆ SetMaximum() [2/2]

ImageVariant& pcl::ImageVariant::SetMaximum ( const ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Replaces a subset of pixel samples in this image with the maximum of each target sample and the corresponding source sample of the specified image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::SetMaximum()

Definition at line 4711 of file ImageVariant.h.

◆ SetMaxProcessors()

void pcl::ImageVariant::SetMaxProcessors ( int  maxProcessors)
inline

Sets the maximum number of processors allowed for this image.

The specified maxProcessors parameter is the maximum number of processors that this image can use in member functions that support parallel execution.

In the current versions of PCL, a module can use a maximum of 1023 processors. The term processor actually refers to the number of threads a module can execute concurrently.

Irrespective of the value specified by this function, a module should not use more processors than the maximum number of parallel threads allowed for external modules on the PixInsight platform. This number is given by the "Process/MaxProcessors" global variable (refer to the GlobalSettings class for information on global variables).

If this object does not transport an image, calling this member function has no effect.

Definition at line 1338 of file ImageVariant.h.

◆ SetMinimum() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::SetMinimum ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Replaces a subset of pixel samples in this image with the minimum of each sample and the specified scalar. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::SetMinimum()

Definition at line 4747 of file ImageVariant.h.

◆ SetMinimum() [2/2]

ImageVariant& pcl::ImageVariant::SetMinimum ( const ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Replaces a subset of pixel samples in this image with the minimum of each target sample and the corresponding source sample of the specified image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::SetMinimum()

Definition at line 4792 of file ImageVariant.h.

◆ SetOwnership()

ImageVariant& pcl::ImageVariant::SetOwnership ( bool  owner = true)
inline

Causes ImageVariant to own the transported image, if any. Returns a reference to this object.

Note
If ImageVariant owns a transported image, it is destroyed when all instances of ImageVariant referencing that image are destroyed. It is very important to point out that ownership of transported images is a class-wide property of ImageVariant, not a private property of any particular ImageVariant instance.

Definition at line 6785 of file ImageVariant.h.

◆ SetRangeClipHigh()

void pcl::ImageVariant::SetRangeClipHigh ( double  clipHigh) const
inline

Sets the upper bound of the clipping range.

See IsRangeClippingEnabled() for more information on range clipping.

Definition at line 1115 of file ImageVariant.h.

◆ SetRangeClipLow()

void pcl::ImageVariant::SetRangeClipLow ( double  clipLow) const
inline

Sets the lower bound of the clipping range.

See IsRangeClippingEnabled() for more information on range clipping.

Definition at line 1104 of file ImageVariant.h.

◆ SetRangeClipping()

void pcl::ImageVariant::SetRangeClipping ( double  clipLow,
double  clipHigh 
) const
inline

Sets the lower and upper bounds of the clipping range and enables range clipping, in a single function call.

See IsRangeClippingEnabled() for more information on range clipping.

Definition at line 1127 of file ImageVariant.h.

◆ SetRGBWorkingSpace()

void pcl::ImageVariant::SetRGBWorkingSpace ( const RGBColorSystem rgbws)
inline

Associates a given RGB working space ( RGBWS ) with the image transported by this ImageVariant object.

Note
For shared images ( i.e. images living in the PixInsight core application ), the RGB working space cannot be changed by calling this function.
Warning
If this member function is called for a shared image, it throws an Error exception with the appropriate error message.

Definition at line 1462 of file ImageVariant.h.

◆ SetRow()

template<typename T >
ImageVariant& pcl::ImageVariant::SetRow ( const T *  buffer,
int  y,
int  channel = -1 
)
inline

Sets a row of pixel samples from values in the specified array, with implicit data type conversion. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::SetRow()

Definition at line 4849 of file ImageVariant.h.

◆ SetStatusCallback()

void pcl::ImageVariant::SetStatusCallback ( pcl::StatusCallback callback) const
inline

Specifies the address of an object that will be used to perform status monitoring callbacks for the image transported by this ImageVariant.

If this object does not transport an image, calling this member function has no effect.

Definition at line 1247 of file ImageVariant.h.

◆ SharedImageHandle()

void* pcl::ImageVariant::SharedImageHandle ( ) const
inline

Returns the handle to the shared image transported by this ImageVariant object, or zero (a null pointer) if the transported image is local, or if this object transports no image.

Definition at line 3013 of file ImageVariant.h.

◆ Shift() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Shift ( const GenericVector< T > &  fillValues)
inline

Shifts (translates) the image to its current anchor point selection. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Shift()

Definition at line 4914 of file ImageVariant.h.

◆ Shift() [2/2]

ImageVariant& pcl::ImageVariant::Shift ( )
inline

Shifts (translates) the image to its current anchor point selection, filling extended regions with the minimum sample value in the native range of the image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Shift()

Definition at line 4935 of file ImageVariant.h.

◆ ShiftBy() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::ShiftBy ( int  dx,
int  dy,
const GenericVector< T > &  fillValues 
)
inline

Shifts (translates) this image by the specified increments in pixels. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::ShiftBy()

Definition at line 4956 of file ImageVariant.h.

◆ ShiftBy() [2/2]

ImageVariant& pcl::ImageVariant::ShiftBy ( int  dx,
int  dy 
)
inline

Shifts (translates) this image by the specified increments in pixels, filling extended regions with the minimum sample value in the native range of the image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::ShiftBy()

Definition at line 4977 of file ImageVariant.h.

◆ ShiftTo() [1/4]

template<typename T >
ImageVariant& pcl::ImageVariant::ShiftTo ( int  x,
int  y,
const GenericVector< T > &  fillValues 
)
inline

Shifts (translates) the image to the specified coordinates. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::ShiftTo()

Definition at line 4998 of file ImageVariant.h.

◆ ShiftTo() [2/4]

ImageVariant& pcl::ImageVariant::ShiftTo ( int  x,
int  y 
)
inline

Shifts (translates) the image to the specified coordinates, filling extended regions with the minimum sample value in the native range of the image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::ShiftTo()

Definition at line 5019 of file ImageVariant.h.

◆ ShiftTo() [3/4]

template<typename T >
ImageVariant& pcl::ImageVariant::ShiftTo ( const Point p,
const GenericVector< T > &  fillValues 
)
inline

Shifts (translates) the image to the specified coordinates. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::ShiftTo()

Definition at line 5040 of file ImageVariant.h.

◆ ShiftTo() [4/4]

ImageVariant& pcl::ImageVariant::ShiftTo ( const Point p)
inline

Shifts (translates) the image to the specified coordinates, filling extended regions with the minimum sample value in the native range of the image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::ShiftTo()

Definition at line 5061 of file ImageVariant.h.

◆ ShiftToBottomLeft() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::ShiftToBottomLeft ( int  width,
int  height,
const GenericVector< T > &  fillValues 
)
inline

Extends or crops the image at its right and top sides to the specified width and height in pixels. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::ShiftToBottomLeft()

Definition at line 5083 of file ImageVariant.h.

◆ ShiftToBottomLeft() [2/2]

ImageVariant& pcl::ImageVariant::ShiftToBottomLeft ( int  width,
int  height 
)
inline

Extends or crops the image at its right and top sides to the specified width and height in pixels, filling extended regions with the minimum sample value in the native range of the image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::ShiftToBottomLeft()

Definition at line 5106 of file ImageVariant.h.

◆ ShiftToBottomRight() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::ShiftToBottomRight ( int  width,
int  height,
const GenericVector< T > &  fillValues 
)
inline

Extends or crops the image at its left and top sides to the specified width and height in pixels. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::ShiftToBottomRight()

Definition at line 5128 of file ImageVariant.h.

◆ ShiftToBottomRight() [2/2]

ImageVariant& pcl::ImageVariant::ShiftToBottomRight ( int  width,
int  height 
)
inline

Extends or crops the image at its left and top sides to the specified width and height in pixels, filling extended regions with the minimum sample value in the native range of the image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::ShiftToBottomRight()

Definition at line 5151 of file ImageVariant.h.

◆ ShiftToCenter() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::ShiftToCenter ( int  width,
int  height,
const GenericVector< T > &  fillValues 
)
inline

Extends or crops the image centered within the specified width and height in pixels. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::ShiftToCenter()

Definition at line 5173 of file ImageVariant.h.

◆ ShiftToCenter() [2/2]

ImageVariant& pcl::ImageVariant::ShiftToCenter ( int  width,
int  height 
)
inline

Extends or crops the image centered within the specified width and height in pixels, filling extended regions with the minimum sample value in the native range of the image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::ShiftToCenter()

Definition at line 5196 of file ImageVariant.h.

◆ ShiftToTopLeft() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::ShiftToTopLeft ( int  width,
int  height,
const GenericVector< T > &  fillValues 
)
inline

Extends or crops the image at its right and bottom sides to the specified width and height in pixels. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::ShiftToTopLeft()

Definition at line 5218 of file ImageVariant.h.

◆ ShiftToTopLeft() [2/2]

ImageVariant& pcl::ImageVariant::ShiftToTopLeft ( int  width,
int  height 
)
inline

Extends or crops the image at its right and bottom sides to the specified width and height in pixels, filling extended regions with the minimum sample value in the native range of the image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::ShiftToTopLeft()

Definition at line 5241 of file ImageVariant.h.

◆ ShiftToTopRight() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::ShiftToTopRight ( int  width,
int  height,
const GenericVector< T > &  fillValues 
)
inline

Extends or crops the image at its left and bottom sides to the specified width and height in pixels. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::ShiftToTopRight()

Definition at line 5263 of file ImageVariant.h.

◆ ShiftToTopRight() [2/2]

ImageVariant& pcl::ImageVariant::ShiftToTopRight ( int  width,
int  height 
)
inline

Extends or crops the image at its left and bottom sides to the specified width and height in pixels, filling extended regions with the minimum sample value in the native range of the image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::ShiftToTopRight()

Definition at line 5286 of file ImageVariant.h.

◆ Sn()

double pcl::ImageVariant::Sn ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns the Sn scale estimator of Rousseeuw and Croux for a subset of pixel samples.

This member function is a generalized wrapper for GenericImage::Sn()

Definition at line 4826 of file ImageVariant.h.

◆ Status()

StatusMonitor& pcl::ImageVariant::Status ( ) const
inline

Returns a reference to the status monitoring object associated with the image transported by this ImageVariant.

Note
This member function assumes that this object transports a valid image. Do not call it otherwise.

Definition at line 1224 of file ImageVariant.h.

◆ StatusCallback()

pcl::StatusCallback* pcl::ImageVariant::StatusCallback ( ) const
inline

Returns the address of the status monitoring callback object currently selected for the image transported by this ImageVariant, or zero if this object does not transport an image.

Definition at line 1235 of file ImageVariant.h.

◆ StdDev()

double pcl::ImageVariant::StdDev ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns the standard deviation of a subset of pixel samples.

This member function is a generalized wrapper for GenericImage::StdDev()

Definition at line 5305 of file ImageVariant.h.

◆ Sub() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Sub ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

A synonym for Subtract().

Definition at line 5341 of file ImageVariant.h.

◆ Sub() [2/2]

ImageVariant& pcl::ImageVariant::Sub ( const ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

A synonym for Subtract().

Definition at line 5388 of file ImageVariant.h.

◆ Subtract() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Subtract ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Subtracts the specified scalar from a subset of pixel samples in this image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Subtract()

Definition at line 5328 of file ImageVariant.h.

◆ Subtract() [2/2]

ImageVariant& pcl::ImageVariant::Subtract ( const ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Subtracts pixel samples of the specified image from a subset of pixel samples in this image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Subtract()

Definition at line 5372 of file ImageVariant.h.

◆ Subtracted()

template<typename T >
ImageVariant pcl::ImageVariant::Subtracted ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Creates a local image with a subset of pixel samples from this image, and subtracts a scalar. Returns the resulting image.

This member function is a generalized wrapper for GenericImage::Subtracted()

Definition at line 5409 of file ImageVariant.h.

◆ SumOfSquares()

double pcl::ImageVariant::SumOfSquares ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns the sum of the squares of a subset of pixel samples.

This member function is a generalized wrapper for GenericImage::SumOfSquares()

Definition at line 5430 of file ImageVariant.h.

◆ SwapFileSize()

static uint64 pcl::ImageVariant::SwapFileSize ( const String filePath)
static

Returns the total size in bytes occupied by a raw storage image file.

Parameters
filePathA file path specification to an existing raw storage image file.

This function does not read any pixel data. All the required data to compute the returned file size is retrieved from existing file headers.

◆ SwapFilesSize()

static uint64 pcl::ImageVariant::SwapFilesSize ( const String fileName,
const StringList directories 
)
static

Returns the total size in bytes occupied by a set of raw storage files.

Parameters
fileNameBase file name for the raw storage files.
directoriesA list of directories where the set of raw files have been created by a previous call to WriteSwapFiles( const String&, const StringList& ).

This function does not read any pixel data. All the required data to compute the returned file size is retrieved from existing file headers.

◆ Transfer() [1/2]

ImageVariant& pcl::ImageVariant::Transfer ( ImageVariant image)
inline

Transfers the image transported by other ImageVariant to this object. Returns a reference to this object.

If the previously transported image (if any) was owned by ImageVariant, and there are no more ImageVariant references to it, then it is destroyed before assignment.

After calling this function, the specified source image is left in an invalid state and should be destroyed immediately.

Definition at line 5893 of file ImageVariant.h.

◆ Transfer() [2/2]

ImageVariant& pcl::ImageVariant::Transfer ( ImageVariant &&  image)
inline

Transfers the image transported by other ImageVariant to this object. Returns a reference to this object.

If the previously transported image (if any) was owned by ImageVariant, and there are no more ImageVariant references to it, then it is destroyed before assignment.

After calling this function, the specified source image is left in an invalid state and should be destroyed immediately.

Definition at line 5909 of file ImageVariant.h.

◆ TransferImage()

ImageVariant& pcl::ImageVariant::TransferImage ( ImageVariant image)
inline

Transfers pixel data to this image from another image, which is an instance of a different template instantiation of GenericImage. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Transfer()

Definition at line 5466 of file ImageVariant.h.

◆ Transform()

void pcl::ImageVariant::Transform ( BidirectionalImageTransformation transform,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Applies a direct image transformation to a subset of pixel samples. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Transform()

Definition at line 5489 of file ImageVariant.h.

◆ Truncate() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Truncate ( lowerBound,
upperBound,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Truncates a subset of pixel samples to the specified range of values. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Truncate()

Definition at line 5511 of file ImageVariant.h.

◆ Truncate() [2/2]

ImageVariant& pcl::ImageVariant::Truncate ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Truncates a subset of pixel samples to the native range of the image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Truncate()

Definition at line 5532 of file ImageVariant.h.

◆ Truncated() [1/2]

template<typename T >
ImageVariant pcl::ImageVariant::Truncated ( lowerBound,
upperBound,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Returns a local image with a subset of pixel samples from this image, truncated to the specified range of values.

This member function is a generalized wrapper for GenericImage::Truncated()

Definition at line 5555 of file ImageVariant.h.

◆ Truncated() [2/2]

ImageVariant pcl::ImageVariant::Truncated ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Returns a local image with a subset of pixel samples from this image, truncated to the native range of the image.

This member function is a generalized wrapper for GenericImage::Truncated()

Definition at line 5578 of file ImageVariant.h.

◆ Variance()

double pcl::ImageVariant::Variance ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns the variance from the mean of a subset of pixel samples.

This member function is a generalized wrapper for GenericImage::Variance()

Definition at line 5598 of file ImageVariant.h.

◆ White()

ImageVariant& pcl::ImageVariant::White ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Fills a subset of pixel samples with the maximum sample value in the native range of the image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::White()

Definition at line 5619 of file ImageVariant.h.

◆ Width()

int pcl::ImageVariant::Width ( ) const
inline

Returns the width in pixels of the image transported by this ImageVariant, or zero if this object transports no image.

Definition at line 470 of file ImageVariant.h.

◆ Write() [1/2]

void pcl::ImageVariant::Write ( File file,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Writes a subset of pixel samples to a raw-storage output stream.

This member function is a generalized wrapper for GenericImage::Write()

Definition at line 5638 of file ImageVariant.h.

◆ Write() [2/2]

void pcl::ImageVariant::Write ( const String filePath,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
) const
inline

Writes a subset of pixel samples to a raw-storage output stream.

This member function is a generalized wrapper for GenericImage::Write()

Definition at line 5656 of file ImageVariant.h.

◆ WriteSwapFile()

void pcl::ImageVariant::WriteSwapFile ( const String filePath,
swap_compression  compression = SwapCompression::None,
Compression::Performance perf = nullptr,
bool  processEvents = false 
) const

Writes the image transported by this ImageVariant instance to a raw storage file.

Parameters
filePathA file path specification where the output raw storage file will be created.
compressionCompression algorithm. If specified, all stored pixel data will be compressed using this algorithm. Compression is disabled by default
perfIf non-null, pointer to a Compression::Performance structure where compression performance data will be provided if the raw file is compressed.
processEventsIf true, Module->ProcessEvents() will be called at regular intervals during the file write operation. This is useful to keep the graphical interface responsive during long disk operations. The default value is false.

The generated file can be employed to construct a new image instance by calling the ReadSwapFile() member function with the same file path specification.

This function is useful to write pixel data without having to resolve the template instantiation of the transported image. PCL writes pixel data of any supported sample type transparently.

◆ WriteSwapFiles()

void pcl::ImageVariant::WriteSwapFiles ( const String fileName,
const StringList directories,
swap_compression  compression = SwapCompression::None,
Compression::Performance perf = nullptr,
bool  processEvents = false 
) const

Writes the image transported by this ImageVariant object to a set of raw storage files using parallel disk write operations.

Parameters
fileNameBase file name for the raw storage files.
directoriesA list of directories where the set of raw files will be created by this function.
compressionCompression algorithm. If specified, all stored pixel data will be compressed using this algorithm. Compression is disabled by default
perfIf non-null, pointer to a Compression::Performance structure where compression performance data will be provided if the raw files are compressed. Output performance values are the averages of the same values computed for all threads.
processEventsIf true, Module->ProcessEvents() will be called at regular intervals during the file write operation. This is useful to keep the graphical interface responsive during long disk operations. The default value is false.

Each string in the directories string list must be a full path specification to an existing directory. On each directory, an output file will be created and an independent execution thread will write the corresponding section of the pixel data from the image transported by this ImageVariant. To retrieve the data, call the ReadSwapFiles() member function with the same base file name and output directories.

Warning
This function is not thread-safe: it can only be called from the root thread. This function will throw an Error exception if it is called from a local thread.

◆ Xchg()

ImageVariant& pcl::ImageVariant::Xchg ( ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

A synonym for Exchange().

Definition at line 2540 of file ImageVariant.h.

◆ Xnor() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Xnor ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Performs a bitwise XNOR (exclusive NOR) operation between a subset of pixel samples in this image and the specified scalar. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Xnor()

Definition at line 5677 of file ImageVariant.h.

◆ Xnor() [2/2]

ImageVariant& pcl::ImageVariant::Xnor ( const ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Performs a bitwise XNOR (NOT exclusive OR) operation between a subset of pixel samples in this image and the corresponding samples of the specified source image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Xnor()

Definition at line 5712 of file ImageVariant.h.

◆ Xor() [1/2]

template<typename T >
ImageVariant& pcl::ImageVariant::Xor ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Performs a bitwise XOR (exclusive OR) operation between a subset of pixel samples in this image and the specified scalar. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Xor()

Definition at line 5738 of file ImageVariant.h.

◆ Xor() [2/2]

ImageVariant& pcl::ImageVariant::Xor ( const ImageVariant image,
const Point point = Point( int_max ),
int  channel = -1,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Performs a bitwise XOR (exclusive OR) operation between a subset of pixel samples in this image and the corresponding samples of the specified source image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Xor()

Definition at line 5773 of file ImageVariant.h.

◆ Zero()

ImageVariant& pcl::ImageVariant::Zero ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Fills a subset of pixel samples with the constant value resulting from converting the scalar zero (0) to the sample data type of the image. Returns a reference to this image.

This member function is a generalized wrapper for GenericImage::Zero()

Definition at line 5798 of file ImageVariant.h.

Friends And Related Function Documentation

◆ Swap

void Swap ( ImageVariant x1,
ImageVariant x2 
)
friend

Exchanges two ImageVariant instances x1 and x2.

Definition at line 5967 of file ImageVariant.h.


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