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

using color_space = AbstractImage::color_space
 
using image_op = ImageOp::value_type
 

Public Member Functions

 ImageVariant ()
 
 ImageVariant (const ImageVariant &image)
 
template<class P >
 ImageVariant (GenericImage< P > *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
 
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 >
ImageVariantAdd (T scalar, 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 (const Rect &rect, int numberOfChannels=1, color_space colorSpace=ColorSpace::Gray)
 
ImageVariantAllocateData (int width, int height, int numberOfChannels=1, color_space colorSpace=ColorSpace::Gray)
 
ImageVariantAllocateImage (int width, int height, int numberOfChannels, color_space colorSpace)
 
size_type AlphaSize () const noexcept
 
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 >
ImageVariantAnd (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariant Applied (const ImageTransformation &transformation, 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
 
template<typename T >
ImageVariant Applied (T scalar, image_op op=ImageOp::Mov, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
ImageVariantApply (const ImageTransformation &transformation, 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)
 
template<typename T >
ImageVariantApply (T scalar, image_op op=ImageOp::Mov, 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
 
ImageVariantBinarize (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariantBinarize (T threshold, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariant Binarized (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<typename T >
ImageVariant Binarized (T threshold, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
int BitsPerSample () const noexcept
 
double BiweightMidvariance (double center, double sigma, int k=9, bool reducedLength=false, 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 noexcept
 
int BytesPerSample () const noexcept
 
bool CanPopSelections () const noexcept
 
String ChannelId (int c) const noexcept
 
size_type ChannelSize () const noexcept
 
template<typename T >
bool Clip (pcl::GenericPoint< T > &p) const noexcept
 
template<typename T >
bool Clip (pcl::GenericRectangle< T > &r) const noexcept
 
template<typename T >
bool Clip (T &x, T &y) const noexcept
 
template<typename T >
bool Clip (T &x0, T &y0, T &x1, T &y1) const noexcept
 
color_space ColorSpace () const noexcept
 
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 ()
 
ImageVariantCreateImage (bool isFloat, bool isComplex, int bitSize)
 
ImageVariantCreateImageAs (const ImageVariant &image)
 
template<class P >
ImageVariantCreateImageAs (const pcl::GenericImage< P > &image)
 
ImageVariantCreateSharedComplexImage (int bitSize=32)
 
ImageVariantCreateSharedFloatImage (int bitSize=32)
 
ImageVariantCreateSharedImage ()
 
ImageVariantCreateSharedImage (bool isFloat, bool isComplex, int bitSize)
 
ImageVariantCreateSharedImageAs (const ImageVariant &image)
 
template<class P >
ImageVariantCreateSharedImageAs (const pcl::GenericImage< P > &image)
 
ImageVariantCreateSharedUIntImage (int bitSize=16)
 
ImageVariantCreateUIntImage (int bitSize=16)
 
ImageVariantCrop ()
 
template<typename T >
ImageVariantCrop (const GenericVector< T > &fillValues)
 
ImageVariantCropBy (int left, int top, int right, int bottom)
 
template<typename T >
ImageVariantCropBy (int left, int top, int right, int bottom, const GenericVector< T > &fillValues)
 
ImageVariantCropTo (const Rect &rect)
 
template<typename T >
ImageVariantCropTo (const Rect &rect, const GenericVector< T > &fillValues)
 
ImageVariantCropTo (int x0, int y0, int x1, int y1)
 
template<typename T >
ImageVariantCropTo (int x0, int y0, int x1, int y1, const GenericVector< T > &fillValues)
 
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) noexcept
 
void DisableRangeClipping (bool disableLow=true, bool disableHigh=true) const noexcept
 
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 >
ImageVariantDiv (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 >
ImageVariantDivide (T scalar, 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) noexcept
 
void EnableRangeClipping (bool enableLow=true, bool enableHigh=true) const noexcept
 
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 (const GenericVector< T > &values, 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 >
ImageVariant Filled (const GenericVector< T > &values, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<typename T >
ImageVariant Filled (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
int FirstSelectedChannel () const noexcept
 
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 noexcept
 
bool HasAlphaChannels () const noexcept
 
int Height () const noexcept
 
const AbstractImageImagePtr () const noexcept
 
AbstractImageImagePtr () noexcept
 
size_type ImageSize () const noexcept
 
template<typename T >
bool Includes (const GenericPoint< T > &p) const noexcept
 
template<typename T >
bool Includes (const GenericRectangle< T > &r) const noexcept
 
template<typename T >
bool Includes (T x, T y) const noexcept
 
template<typename T >
bool Includes (T x0, T y0, T x1, T y1) const noexcept
 
template<typename T >
bool Intersects (const pcl::GenericRectangle< T > &r) const noexcept
 
template<typename T >
bool Intersects (T x0, T y0, T x1, T y1) const noexcept
 
ImageVariantInvert (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariantInvert (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariant Inverted (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<typename T >
ImageVariant Inverted (T scalar, 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 noexcept
 
bool IsCompletelySelected () const noexcept
 
bool IsComplexSample () const noexcept
 
bool IsEmptySelection () const noexcept
 
bool IsFloatSample () const noexcept
 
bool IsFullSelection () const noexcept
 
bool IsHighRangeClippingEnabled () const noexcept
 
bool IsLowRangeClippingEnabled () const noexcept
 
bool IsParallelProcessingEnabled () const noexcept
 
bool IsRangeClippingEnabled () const noexcept
 
bool IsSameImage (const ImageVariant &image) const noexcept
 
bool IsSharedImage () const noexcept
 
bool IsUniqueImage () const noexcept
 
bool IsValidChannelIndex (int c) const noexcept
 
int LastChannel () const noexcept
 
int LastSelectedChannel () const noexcept
 
size_type LineSize () const noexcept
 
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)
 
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 >
ImageVariantMax (T scalar, 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 noexcept
 
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
 
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 >
ImageVariantMin (T scalar, 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)
 
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 >
ImageVariantMove (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 >
ImageVariantMul (T scalar, 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
 
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 >
ImageVariantMultiply (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)
 
template<typename T >
ImageVariantNand (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
size_type NominalSize () const noexcept
 
ImageVariantNor (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 >
ImageVariantNor (T scalar, 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
 
ImageVariantNormalize (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariantNormalize (T lowerBound, T upperBound, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariant Normalized (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<typename T >
ImageVariant Normalized (T lowerBound, T upperBound, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
Vector Norms (int maxDegree, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
ImageVariantNot (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
int NumberOfAlphaChannels () const noexcept
 
size_type NumberOfAlphaSamples () const noexcept
 
int NumberOfChannels () const noexcept
 
int NumberOfNominalChannels () const noexcept
 
size_type NumberOfNominalSamples () const noexcept
 
size_type NumberOfPixels () const noexcept
 
size_type NumberOfSamples () const noexcept
 
int NumberOfSelectedChannels () const noexcept
 
size_type NumberOfSelectedPixels () const noexcept
 
size_type NumberOfSelectedSamples () const noexcept
 
ImageVariantOne (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
 operator bool () const noexcept
 
double operator() (int x, int y, int channel=0) const noexcept
 
const AbstractImageoperator* () const noexcept
 
AbstractImageoperator* () noexcept
 
ImageVariantoperator*= (const ImageVariant &image)
 
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)
 
const AbstractImageoperator-> () const noexcept
 
AbstractImageoperator-> () noexcept
 
ImageVariantoperator/= (const ImageVariant &image)
 
template<typename T >
ImageVariantoperator/= (T scalar)
 
ImageVariantoperator= (const ImageVariant &image)
 
ImageVariantoperator= (ImageVariant &&image)
 
ImageVariantoperator^= (const ImageVariant &image)
 
template<typename T >
ImageVariantoperator^= (T scalar)
 
ImageVariant operator~ () const
 
ImageVariantOr (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 >
ImageVariantOr (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
double OrderStatistic (double k, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
bool OwnsImage () const noexcept
 
void PopSelections () const
 
ImageVariantPow (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 >
ImageVariantPow (T scalar, 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
 
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 >
ImageVariantRaise (T scalar, 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 noexcept
 
double RangeClipLow () const noexcept
 
ImageVariantRead (const String &filePath)
 
ImageVariantRead (File &file)
 
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)
 
ImageVariantRescale (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariantRescale (T lowerBound, T upperBound, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariant Rescaled (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<typename T >
ImageVariant Rescaled (T lowerBound, T upperBound, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
void ResetChannelRange () const noexcept
 
void ResetPoint () const noexcept
 
void ResetRangeClipping () const noexcept
 
void ResetSelection () const noexcept
 
void ResetSelections () const noexcept
 
const RGBColorSystemRGBWorkingSpace () const noexcept
 
void SelectAlphaChannels () const noexcept
 
void SelectChannel (int c) const noexcept
 
void SelectChannelRange (int c0, int c1) const noexcept
 
int SelectedChannel () const noexcept
 
Point SelectedPoint () const noexcept
 
Rect SelectedRectangle () const noexcept
 
ImageSelectionsSelections () const noexcept
 
void SelectNominalChannels () const noexcept
 
void SelectPoint (const Point &p) const noexcept
 
void SelectPoint (int x, int y) const noexcept
 
void SelectRectangle (const Point &p0, const Point &p1) const noexcept
 
void SelectRectangle (const Rect &r) const noexcept
 
void SelectRectangle (int x0, int y0, int x1, int y1) const noexcept
 
ImageVariantSetAbsoluteDifference (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 >
ImageVariantSetAbsoluteDifference (T scalar, 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)
 
ImageVariantSetMaximum (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 >
ImageVariantSetMaximum (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
void SetMaxProcessors (int maxProcessors) noexcept
 
ImageVariantSetMinimum (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 >
ImageVariantSetMinimum (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariantSetOwnership (bool owner=true) noexcept
 
void SetRangeClipHigh (double clipHigh) const noexcept
 
void SetRangeClipLow (double clipLow) const noexcept
 
void SetRangeClipping (double clipLow, double clipHigh) const noexcept
 
void SetRGBWorkingSpace (const RGBColorSystem &rgbws)
 
template<typename T >
ImageVariantSetRow (const T *buffer, int y, int channel=-1)
 
void SetStatusCallback (pcl::StatusCallback *callback) const noexcept
 
void * SharedImageHandle () const noexcept
 
ImageVariantShift ()
 
template<typename T >
ImageVariantShift (const GenericVector< T > &fillValues)
 
ImageVariantShiftBy (int dx, int dy)
 
template<typename T >
ImageVariantShiftBy (int dx, int dy, const GenericVector< T > &fillValues)
 
ImageVariantShiftTo (const Point &p)
 
template<typename T >
ImageVariantShiftTo (const Point &p, const GenericVector< T > &fillValues)
 
ImageVariantShiftTo (int x, int y)
 
template<typename T >
ImageVariantShiftTo (int x, int y, const GenericVector< T > &fillValues)
 
ImageVariantShiftToBottomLeft (int width, int height)
 
template<typename T >
ImageVariantShiftToBottomLeft (int width, int height, const GenericVector< T > &fillValues)
 
ImageVariantShiftToBottomRight (int width, int height)
 
template<typename T >
ImageVariantShiftToBottomRight (int width, int height, const GenericVector< T > &fillValues)
 
ImageVariantShiftToCenter (int width, int height)
 
template<typename T >
ImageVariantShiftToCenter (int width, int height, const GenericVector< T > &fillValues)
 
ImageVariantShiftToTopLeft (int width, int height)
 
template<typename T >
ImageVariantShiftToTopLeft (int width, int height, const GenericVector< T > &fillValues)
 
ImageVariantShiftToTopRight (int width, int height)
 
template<typename T >
ImageVariantShiftToTopRight (int width, int height, const GenericVector< T > &fillValues)
 
double Sn (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
StatusMonitorStatus () const noexcept
 
pcl::StatusCallbackStatusCallback () const noexcept
 
double StdDev (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
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 >
ImageVariantSub (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 >
ImageVariantSubtract (T scalar, 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
 
ImageVariantTruncate (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
ImageVariantTruncate (T lowerBound, T upperBound, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
ImageVariant Truncated (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<typename T >
ImageVariant Truncated (T lowerBound, T upperBound, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
TwoSidedEstimate TwoSidedAvgDev (double center, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
TwoSidedEstimate TwoSidedBiweightMidvariance (double center, const TwoSidedEstimate &sigma, int k=9, bool reducedLength=false, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
TwoSidedEstimate TwoSidedMAD (double center, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) 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 noexcept
 
ImageVariantWrite (const String &filePath, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
ImageVariantWrite (File &file, 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)
 
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 >
ImageVariantXnor (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)
 
template<typename T >
ImageVariantXor (T scalar, 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) noexcept
 

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 321 of file ImageVariant.h.

Member Typedef Documentation

◆ color_space

using pcl::ImageVariant::color_space = AbstractImage::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 330 of file ImageVariant.h.

◆ image_op

using pcl::ImageVariant::image_op = ImageOp::value_type

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 337 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 350 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 363 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 378 of file ImageVariant.h.

◆ ImageVariant() [4/4]

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

Move constructor.

Definition at line 387 of file ImageVariant.h.

◆ ~ImageVariant()

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

Virtual destructor.

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 399 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 1524 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 1548 of file ImageVariant.h.

◆ Add() [1/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 1606 of file ImageVariant.h.

◆ Add() [2/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 1570 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 1632 of file ImageVariant.h.

◆ AllocateData() [1/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 1683 of file ImageVariant.h.

◆ AllocateData() [2/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 1658 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 6620 of file ImageVariant.h.

◆ AlphaSize()

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

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 1441 of file ImageVariant.h.

◆ And() [1/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 1743 of file ImageVariant.h.

◆ And() [2/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 1706 of file ImageVariant.h.

◆ Applied() [1/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 1840 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 1813 of file ImageVariant.h.

◆ Applied() [3/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 1771 of file ImageVariant.h.

◆ Apply() [1/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 1928 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 1903 of file ImageVariant.h.

◆ Apply() [3/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 1865 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 6098 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 1963 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 1986 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 2125 of file ImageVariant.h.

◆ Binarize() [1/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 2056 of file ImageVariant.h.

◆ Binarize() [2/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 2035 of file ImageVariant.h.

◆ Binarized() [1/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 2102 of file ImageVariant.h.

◆ Binarized() [2/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 2079 of file ImageVariant.h.

◆ BitsPerSample()

◆ BiweightMidvariance()

double pcl::ImageVariant::BiweightMidvariance ( double  center,
double  sigma,
int  k = 9,
bool  reducedLength = false,
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 2150 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 2198 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 2218 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 2240 of file ImageVariant.h.

◆ Bounds()

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

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 616 of file ImageVariant.h.

◆ BytesPerSample()

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

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 467 of file ImageVariant.h.

◆ CanPopSelections()

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

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 1252 of file ImageVariant.h.

◆ ChannelId()

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

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 1474 of file ImageVariant.h.

◆ ChannelSize()

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

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 1403 of file ImageVariant.h.

◆ Clip() [1/4]

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

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 710 of file ImageVariant.h.

◆ Clip() [2/4]

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

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 744 of file ImageVariant.h.

◆ Clip() [3/4]

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

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 728 of file ImageVariant.h.

◆ Clip() [4/4]

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

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 766 of file ImageVariant.h.

◆ ColorSpace()

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

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 1464 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 6065 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 6649 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 6672 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 2261 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 2288 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 6316 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 6279 of file ImageVariant.h.

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

◆ CreateImage() [1/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 6300 of file ImageVariant.h.

◆ CreateImage() [2/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 6239 of file ImageVariant.h.

◆ CreateImageAs() [1/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 6388 of file ImageVariant.h.

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

◆ CreateImageAs() [2/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 6370 of file ImageVariant.h.

◆ 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 6505 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 6462 of file ImageVariant.h.

◆ CreateSharedImage() [1/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 6486 of file ImageVariant.h.

◆ CreateSharedImage() [2/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 6428 of file ImageVariant.h.

◆ CreateSharedImageAs() [1/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 6586 of file ImageVariant.h.

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

◆ CreateSharedImageAs() [2/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 6565 of file ImageVariant.h.

◆ 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 6532 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 6340 of file ImageVariant.h.

◆ Crop() [1/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 2329 of file ImageVariant.h.

◆ Crop() [2/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 2308 of file ImageVariant.h.

◆ CropBy() [1/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 2370 of file ImageVariant.h.

◆ CropBy() [2/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 2350 of file ImageVariant.h.

◆ CropTo() [1/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 2412 of file ImageVariant.h.

◆ CropTo() [2/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 2391 of file ImageVariant.h.

◆ CropTo() [3/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 2454 of file ImageVariant.h.

◆ CropTo() [4/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 2433 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 2474 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 2494 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 4665 of file ImageVariant.h.

◆ DisableParallelProcessing()

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

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 1334 of file ImageVariant.h.

◆ DisableRangeClipping()

void pcl::ImageVariant::DisableRangeClipping ( bool  disableLow = true,
bool  disableHigh = true 
) const
inlinenoexcept

Disables range clipping for statistical calculations.

See IsRangeClippingEnabled() for more information on range clipping.

Definition at line 1111 of file ImageVariant.h.

◆ Div() [1/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 2574 of file ImageVariant.h.

◆ Div() [2/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 2527 of file ImageVariant.h.

◆ Divide() [1/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 2558 of file ImageVariant.h.

◆ Divide() [2/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 2514 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 2594 of file ImageVariant.h.

◆ EnableParallelProcessing()

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

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 1319 of file ImageVariant.h.

◆ EnableRangeClipping()

void pcl::ImageVariant::EnableRangeClipping ( bool  enableLow = true,
bool  enableHigh = true 
) const
inlinenoexcept

Enables range clipping for statistical calculations.

See IsRangeClippingEnabled() for more information on range clipping.

Definition at line 1100 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 5118 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 5097 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 2632 of file ImageVariant.h.

◆ Fill() [1/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 2690 of file ImageVariant.h.

◆ Fill() [2/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 2667 of file ImageVariant.h.

◆ Filled() [1/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 2738 of file ImageVariant.h.

◆ Filled() [2/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 2713 of file ImageVariant.h.

◆ FirstSelectedChannel()

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

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

Definition at line 856 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 2761 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 2781 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 7041 of file ImageVariant.h.

◆ 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 6700 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 2802 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 2823 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 2865 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 2913 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 2961 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 2988 of file ImageVariant.h.

◆ GetSelectedChannelRange()

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

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 877 of file ImageVariant.h.

◆ HasAlphaChannels()

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

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 553 of file ImageVariant.h.

◆ Height()

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

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

Definition at line 485 of file ImageVariant.h.

◆ ImagePtr() [1/2]

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

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

Definition at line 412 of file ImageVariant.h.

◆ ImagePtr() [2/2]

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

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

Definition at line 420 of file ImageVariant.h.

◆ ImageSize()

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

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 1415 of file ImageVariant.h.

◆ Includes() [1/4]

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

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 628 of file ImageVariant.h.

◆ Includes() [2/4]

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

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 640 of file ImageVariant.h.

◆ Includes() [3/4]

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

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 670 of file ImageVariant.h.

◆ Includes() [4/4]

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

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 655 of file ImageVariant.h.

◆ Intersects() [1/2]

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

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 682 of file ImageVariant.h.

◆ Intersects() [2/2]

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

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 697 of file ImageVariant.h.

◆ Invert() [1/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 3030 of file ImageVariant.h.

◆ Invert() [2/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 3009 of file ImageVariant.h.

◆ Inverted() [1/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 3078 of file ImageVariant.h.

◆ Inverted() [2/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 3053 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 6083 of file ImageVariant.h.

◆ IsColor()

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

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 1451 of file ImageVariant.h.

◆ IsCompletelySelected()

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

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 1011 of file ImageVariant.h.

◆ IsComplexSample()

◆ IsEmptySelection()

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

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 979 of file ImageVariant.h.

◆ IsFloatSample()

◆ IsFullSelection()

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

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 989 of file ImageVariant.h.

◆ IsHighRangeClippingEnabled()

bool pcl::ImageVariant::IsHighRangeClippingEnabled ( ) const
inlinenoexcept

Returns true iff range clipping is currently enabled for the high clipping bound. Returns false if this object does not transport an image.

When this function returns true, pixel samples with values greater than or equal to the high clipping bound (as reported by RangeClipHigh() ) will be rejected for statistical calculations.

See IsRangeClippingEnabled() for more information on range clipping.

Definition at line 1090 of file ImageVariant.h.

◆ IsLowRangeClippingEnabled()

bool pcl::ImageVariant::IsLowRangeClippingEnabled ( ) const
inlinenoexcept

Returns true iff range clipping is currently enabled for the low clipping bound. Returns false if this object does not transport an image.

When this function returns true, pixel samples with values less than or equal to the low clipping bound (as reported by RangeClipLow() ) will be rejected for statistical calculations.

See IsRangeClippingEnabled() for more information on range clipping.

Definition at line 1075 of file ImageVariant.h.

◆ IsParallelProcessingEnabled()

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

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 1301 of file ImageVariant.h.

◆ IsRangeClippingEnabled()

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

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. Note that range bounds are always excluded, since the range is open on both sides. 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 statistical calculations.

To make it more flexible, range clipping can be enabled/disabled separately for the low and high bounds.

The default clipping range is the normalized (0,1) range. Range clipping is disabled by default.

Definition at line 1060 of file ImageVariant.h.

◆ IsSameImage()

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

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 432 of file ImageVariant.h.

◆ IsSharedImage()

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

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 3103 of file ImageVariant.h.

◆ IsUniqueImage()

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

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 3153 of file ImageVariant.h.

◆ IsValidChannelIndex()

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

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 527 of file ImageVariant.h.

◆ LastChannel()

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

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 517 of file ImageVariant.h.

◆ LastSelectedChannel()

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

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

Definition at line 865 of file ImageVariant.h.

◆ LineSize()

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

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 1392 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 3176 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 3200 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 3223 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 3247 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 3271 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 3295 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 3318 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]

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 4948 of file ImageVariant.h.

◆ Max() [2/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 4898 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 3368 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 3390 of file ImageVariant.h.

◆ MaxProcessors()

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

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 1353 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 3411 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 3433 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 3454 of file ImageVariant.h.

◆ Min() [1/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 5032 of file ImageVariant.h.

◆ Min() [2/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 4982 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 3501 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 3523 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 3545 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 3582 of file ImageVariant.h.

◆ Move() [1/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 3613 of file ImageVariant.h.

◆ Move() [2/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 3568 of file ImageVariant.h.

◆ Mul() [1/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 3709 of file ImageVariant.h.

◆ Mul() [2/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 3660 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 3730 of file ImageVariant.h.

◆ Multiply() [1/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 3693 of file ImageVariant.h.

◆ Multiply() [2/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 3646 of file ImageVariant.h.

◆ Nand() [1/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 3791 of file ImageVariant.h.

◆ Nand() [2/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 3754 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
inlinenoexcept

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 1428 of file ImageVariant.h.

References pcl::ColorSpace::NumberOfNominalChannels().

◆ Nor() [1/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 3854 of file ImageVariant.h.

◆ Nor() [2/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 3817 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 3878 of file ImageVariant.h.

◆ Normalize() [1/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 3945 of file ImageVariant.h.

◆ Normalize() [2/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 3923 of file ImageVariant.h.

◆ Normalized() [1/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 3992 of file ImageVariant.h.

◆ Normalized() [2/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 3968 of file ImageVariant.h.

◆ Norms()

Vector pcl::ImageVariant::Norms ( int  maxDegree,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns a vector of norms for a subset of pixel samples.

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

Definition at line 3899 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 4013 of file ImageVariant.h.

◆ NumberOfAlphaChannels()

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

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 566 of file ImageVariant.h.

◆ NumberOfAlphaSamples()

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

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 601 of file ImageVariant.h.

◆ NumberOfChannels()

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

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

Definition at line 505 of file ImageVariant.h.

◆ NumberOfNominalChannels()

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

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 540 of file ImageVariant.h.

◆ NumberOfNominalSamples()

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

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 589 of file ImageVariant.h.

◆ NumberOfPixels()

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

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 496 of file ImageVariant.h.

◆ NumberOfSamples()

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

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 577 of file ImageVariant.h.

◆ NumberOfSelectedChannels()

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

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

Definition at line 847 of file ImageVariant.h.

◆ NumberOfSelectedPixels()

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

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 1021 of file ImageVariant.h.

◆ NumberOfSelectedSamples()

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

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 1031 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 4034 of file ImageVariant.h.

◆ operator bool()

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

Returns true iff this ImageVariant instance transports an image.

Definition at line 7109 of file ImageVariant.h.

◆ operator()()

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

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 7142 of file ImageVariant.h.

◆ operator*() [1/2]

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

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 7087 of file ImageVariant.h.

◆ operator*() [2/2]

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

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 7100 of file ImageVariant.h.

◆ operator*=() [1/2]

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

A synonym for Multiply().

Definition at line 4082 of file ImageVariant.h.

◆ operator*=() [2/2]

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

A synonym for Multiply().

Definition at line 4052 of file ImageVariant.h.

◆ operator+=() [1/2]

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

A synonym for Add().

Definition at line 4132 of file ImageVariant.h.

◆ operator+=() [2/2]

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

A synonym for Add().

Definition at line 4102 of file ImageVariant.h.

◆ operator-=() [1/2]

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

A synonym for Subtract().

Definition at line 4182 of file ImageVariant.h.

◆ operator-=() [2/2]

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

A synonym for Subtract().

Definition at line 4152 of file ImageVariant.h.

◆ operator->() [1/2]

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

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 7061 of file ImageVariant.h.

◆ operator->() [2/2]

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

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 7074 of file ImageVariant.h.

◆ operator/=() [1/2]

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

A synonym for Divide().

Definition at line 4232 of file ImageVariant.h.

◆ operator/=() [2/2]

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

A synonym for Divide().

Definition at line 4202 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 6111 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 6164 of file ImageVariant.h.

◆ operator^=() [1/2]

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

A synonym for Raise().

Definition at line 4282 of file ImageVariant.h.

◆ operator^=() [2/2]

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

A synonym for Raise().

Definition at line 4252 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 4307 of file ImageVariant.h.

◆ Or() [1/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 4366 of file ImageVariant.h.

◆ Or() [2/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 4330 of file ImageVariant.h.

◆ OrderStatistic()

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

Returns an order statistic computed for a subset of pixel samples.

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

Definition at line 3475 of file ImageVariant.h.

◆ OwnsImage()

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

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

Definition at line 7013 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 1240 of file ImageVariant.h.

◆ Pow() [1/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 4476 of file ImageVariant.h.

◆ Pow() [2/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 4405 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 1226 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 4422 of file ImageVariant.h.

◆ Raise() [1/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 4460 of file ImageVariant.h.

◆ Raise() [2/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 4391 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 4496 of file ImageVariant.h.

◆ RangeClipHigh()

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

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 1134 of file ImageVariant.h.

◆ RangeClipLow()

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

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 1123 of file ImageVariant.h.

◆ Read() [1/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 4538 of file ImageVariant.h.

◆ Read() [2/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 4518 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 6177 of file ImageVariant.h.

◆ Rescale() [1/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 4580 of file ImageVariant.h.

◆ Rescale() [2/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 4559 of file ImageVariant.h.

◆ Rescaled() [1/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 4627 of file ImageVariant.h.

◆ Rescaled() [2/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 4603 of file ImageVariant.h.

◆ ResetChannelRange()

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

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

Definition at line 837 of file ImageVariant.h.

◆ ResetPoint()

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

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

Definition at line 907 of file ImageVariant.h.

◆ ResetRangeClipping()

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

Resets the range clipping parameters:

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

Definition at line 1180 of file ImageVariant.h.

◆ ResetSelection()

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

Resets the rectangular selection to include the entire image boundaries.

Definition at line 968 of file ImageVariant.h.

◆ ResetSelections()

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

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 1204 of file ImageVariant.h.

◆ RGBWorkingSpace()

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

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 1486 of file ImageVariant.h.

◆ SelectAlphaChannels()

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

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 827 of file ImageVariant.h.

◆ SelectChannel()

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

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 777 of file ImageVariant.h.

◆ SelectChannelRange()

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

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 804 of file ImageVariant.h.

◆ SelectedChannel()

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

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 792 of file ImageVariant.h.

◆ SelectedPoint()

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

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

Definition at line 917 of file ImageVariant.h.

◆ SelectedRectangle()

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

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

Definition at line 998 of file ImageVariant.h.

◆ Selections()

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

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 1217 of file ImageVariant.h.

◆ SelectNominalChannels()

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

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

Definition at line 814 of file ImageVariant.h.

◆ SelectPoint() [1/2]

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

Selects a new anchor point p in image coordinates.

Definition at line 898 of file ImageVariant.h.

◆ SelectPoint() [2/2]

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

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 889 of file ImageVariant.h.

◆ SelectRectangle() [1/3]

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

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 949 of file ImageVariant.h.

◆ SelectRectangle() [2/3]

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

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

Definition at line 959 of file ImageVariant.h.

◆ SelectRectangle() [3/3]

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

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 935 of file ImageVariant.h.

◆ SetAbsoluteDifference() [1/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 4699 of file ImageVariant.h.

◆ SetAbsoluteDifference() [2/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 4651 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 4731 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 4757 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 4779 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 6197 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 4816 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 4857 of file ImageVariant.h.

◆ SetMaximum() [1/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 4932 of file ImageVariant.h.

◆ SetMaximum() [2/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 4884 of file ImageVariant.h.

◆ SetMaxProcessors()

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

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. A value ≤ 0 is ignored and causes the call to this function to have no effect.

In the current versions of PCL, a module can use a maximum of 1023 processors. The term processors 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 1379 of file ImageVariant.h.

◆ SetMinimum() [1/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 5016 of file ImageVariant.h.

◆ SetMinimum() [2/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 4968 of file ImageVariant.h.

◆ SetOwnership()

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

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 7028 of file ImageVariant.h.

◆ SetRangeClipHigh()

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

Sets the upper bound of the clipping range.

See IsRangeClippingEnabled() for more information on range clipping.

Definition at line 1155 of file ImageVariant.h.

◆ SetRangeClipLow()

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

Sets the lower bound of the clipping range.

See IsRangeClippingEnabled() for more information on range clipping.

Definition at line 1144 of file ImageVariant.h.

◆ SetRangeClipping()

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

Sets the lower and upper bounds of the clipping range and enables range clipping (both low and high clipping bounds), in a single function call.

See IsRangeClippingEnabled() for more information on range clipping.

Definition at line 1167 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 1503 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 5074 of file ImageVariant.h.

◆ SetStatusCallback()

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

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 1287 of file ImageVariant.h.

◆ SharedImageHandle()

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

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 3127 of file ImageVariant.h.

◆ Shift() [1/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 5160 of file ImageVariant.h.

◆ Shift() [2/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 5139 of file ImageVariant.h.

◆ ShiftBy() [1/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 5202 of file ImageVariant.h.

◆ ShiftBy() [2/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 5181 of file ImageVariant.h.

◆ ShiftTo() [1/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 5286 of file ImageVariant.h.

◆ ShiftTo() [2/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 5265 of file ImageVariant.h.

◆ ShiftTo() [3/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 5244 of file ImageVariant.h.

◆ ShiftTo() [4/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 5223 of file ImageVariant.h.

◆ ShiftToBottomLeft() [1/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 5331 of file ImageVariant.h.

◆ ShiftToBottomLeft() [2/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 5308 of file ImageVariant.h.

◆ ShiftToBottomRight() [1/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 5376 of file ImageVariant.h.

◆ ShiftToBottomRight() [2/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 5353 of file ImageVariant.h.

◆ ShiftToCenter() [1/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 5421 of file ImageVariant.h.

◆ ShiftToCenter() [2/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 5398 of file ImageVariant.h.

◆ ShiftToTopLeft() [1/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 5466 of file ImageVariant.h.

◆ ShiftToTopLeft() [2/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 5443 of file ImageVariant.h.

◆ ShiftToTopRight() [1/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 5511 of file ImageVariant.h.

◆ ShiftToTopRight() [2/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 5488 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 5050 of file ImageVariant.h.

◆ Status()

StatusMonitor& pcl::ImageVariant::Status ( ) const
inlinenoexcept

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 1264 of file ImageVariant.h.

◆ StatusCallback()

pcl::StatusCallback* pcl::ImageVariant::StatusCallback ( ) const
inlinenoexcept

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 1275 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 5530 of file ImageVariant.h.

◆ Sub() [1/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 5617 of file ImageVariant.h.

◆ Sub() [2/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 5568 of file ImageVariant.h.

◆ Subtract() [1/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 5601 of file ImageVariant.h.

◆ Subtract() [2/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 5554 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 5638 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 5660 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 6152 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 6136 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 5697 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 5720 of file ImageVariant.h.

◆ Truncate() [1/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 5764 of file ImageVariant.h.

◆ Truncate() [2/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 5742 of file ImageVariant.h.

◆ Truncated() [1/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 5811 of file ImageVariant.h.

◆ Truncated() [2/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 5787 of file ImageVariant.h.

◆ TwoSidedAvgDev()

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

Returns the two-sided 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::TwoSidedAvgDev()

Definition at line 2010 of file ImageVariant.h.

◆ TwoSidedBiweightMidvariance()

TwoSidedEstimate pcl::ImageVariant::TwoSidedBiweightMidvariance ( double  center,
const TwoSidedEstimate sigma,
int  k = 9,
bool  reducedLength = false,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

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

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

Definition at line 2175 of file ImageVariant.h.

◆ TwoSidedMAD()

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

Returns the two-sided 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::TwoSidedMAD()

Definition at line 3342 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 5831 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 5852 of file ImageVariant.h.

◆ Width()

int pcl::ImageVariant::Width ( ) const
inlinenoexcept

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

Definition at line 476 of file ImageVariant.h.

◆ Write() [1/2]

ImageVariant& 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. Returns a reference to this image.

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

Definition at line 5893 of file ImageVariant.h.

◆ Write() [2/2]

ImageVariant& 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. Returns a reference to this image.

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

Definition at line 5872 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 2648 of file ImageVariant.h.

◆ Xnor() [1/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 5953 of file ImageVariant.h.

◆ Xnor() [2/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 5916 of file ImageVariant.h.

◆ Xor() [1/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 6016 of file ImageVariant.h.

◆ Xor() [2/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 5979 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 6041 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 6210 of file ImageVariant.h.


The documentation for this class was generated from the following file:
Image
32-bit floating point real image.
pcl::ImageVariant::ResetSelection
void ResetSelection() const noexcept
Definition: ImageVariant.h:968
UInt16Image
16-bit unsigned integer image.
UInt8Image
8-bit unsigned integer image.
pcl::ImageVariant::CreateSharedImage
ImageVariant & CreateSharedImage()
Definition: ImageVariant.h:6486
UInt32Image
32-bit unsigned integer image.
pcl::ImageVariant::ResetPoint
void ResetPoint() const noexcept
Definition: ImageVariant.h:907
pcl::ImageVariant::ResetRangeClipping
void ResetRangeClipping() const noexcept
Definition: ImageVariant.h:1180
pcl::ImageVariant::ImageVariant
ImageVariant()
Definition: ImageVariant.h:350
DImage
64-bit floating point real image.
pcl::ImageVariant::CreateFloatImage
ImageVariant & CreateFloatImage(int bitSize=32)
Definition: ImageVariant.h:6279
pcl::ImageVariant::ResetChannelRange
void ResetChannelRange() const noexcept
Definition: ImageVariant.h:837
pcl::ImageVariant::CreateSharedFloatImage
ImageVariant & CreateSharedFloatImage(int bitSize=32)
Definition: ImageVariant.h:6462
pcl::ImageVariant::CreateImage
ImageVariant & CreateImage()
Definition: ImageVariant.h:6300