PCL
pcl::GenericImage< P > Class Template Reference

Implements a generic, two-dimensional, shared or local image. More...

#include <Image.h>

+ Inheritance diagram for pcl::GenericImage< P >:

Classes

class  const_filter_pixel_iterator
 Immutable filter pixel iterator. More...
 
class  const_filter_sample_iterator
 Immutable filter pixel sample iterator. More...
 
class  const_pixel_iterator
 Immutable pixel iterator. More...
 
class  const_roi_filter_pixel_iterator
 Immutable region-of-interest, filter pixel iterator. More...
 
class  const_roi_filter_sample_iterator
 Immutable region-of-interest, filter pixel sample iterator. More...
 
class  const_roi_pixel_iterator
 Immutable region-of-interest pixel iterator. More...
 
class  const_roi_sample_iterator
 Immutable region-of-interest pixel sample iterator. More...
 
class  const_sample_iterator
 Immutable pixel sample iterator. More...
 
class  filter_pixel_iterator
 Mutable filter pixel iterator. More...
 
class  filter_sample_iterator
 Mutable filter pixel sample iterator. More...
 
class  pixel_iterator
 Mutable pixel iterator. More...
 
class  roi_filter_pixel_iterator
 Mutable region-of-interest, filter pixel iterator. More...
 
class  roi_filter_sample_iterator
 Mutable region-of-interest, filter pixel sample iterator. More...
 
class  roi_pixel_iterator
 Mutable region-of-interest pixel iterator. More...
 
class  roi_sample_iterator
 Mutable region-of-interest pixel sample iterator. More...
 
class  sample_iterator
 Mutable pixel sample iterator. More...
 

Public Types

using color_space = AbstractImage::color_space
 
using image_op = ImageOp::value_type
 
using pixel_allocator = PixelAllocator< P >
 
using pixel_traits = P
 
using sample = typename pixel_traits::sample
 
using sample_array = Array< sample >
 
using sample_vector = GenericVector< sample >
 
using selection_stack = AbstractImage::selection_stack
 
- Public Types inherited from pcl::AbstractImage
using color_space = ImageColor::color_space
 
using selection_stack = Array< ImageSelections >
 
- Public Types inherited from pcl::ImageColor
using color_space = ColorSpace::value_type
 

Public Member Functions

 GenericImage ()
 
 GenericImage (const GenericImage &image)
 
template<class P1 >
 GenericImage (const GenericImage< P1 > &image)
 
template<class P1 >
 GenericImage (const GenericImage< P1 > &image, const Rect &rect, int firstChannel=-1, int lastChannel=-1)
 
 GenericImage (File &stream)
 
 GenericImage (GenericImage &&image)
 
 GenericImage (int width, int height, color_space colorSpace=ColorSpace::Gray)
 
 GenericImage (void *, int width, int height, color_space colorSpace=ColorSpace::Gray)
 
 GenericImage (void *handle)
 
 ~GenericImage () override
 
GenericImageAbs (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImage AbsoluteDifference (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
GenericImage AbsoluteValue (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<class P1 >
GenericImageAdd (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageAdd (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
GenericImageAddAlphaChannel (sample *data=nullptr)
 
template<typename T >
GenericImage Added (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
GenericImageAllocateData (const Rect &rect, int numberOfChannels=1, color_space colorSpace=ColorSpace::Gray)
 
GenericImageAllocateData (int width, int height, int numberOfChannels=1, color_space colorSpace=ColorSpace::Gray)
 
pixel_allocatorAllocator () const noexcept
 
size_type AlphaSize () const noexcept
 
template<class P1 >
GenericImageAnd (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageAnd (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<class P1 >
GenericImage Applied (const GenericImage< P1 > &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
 
GenericImage Applied (const ImageTransformation &transformation, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<typename T >
GenericImage Applied (T scalar, image_op op=ImageOp::Mov, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<class P1 >
GenericImageApply (const GenericImage< P1 > &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)
 
GenericImageApply (const ImageTransformation &transformation, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageApply (T scalar, image_op op=ImageOp::Mov, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<class P1 >
GenericImageAssign (const GenericImage< P1 > &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
 
GenericImageBinarize (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageBinarize (T threshold, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
GenericImage Binarized (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<typename T >
GenericImage Binarized (T threshold, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
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
 
GenericImageBlack (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
GenericImageBlend (const Bitmap &bitmap, const Point &point=Point(int_max), const Rect &rect=Rect(0))
 
GenericImage Blended (const Bitmap &bitmap, const Point &point=Point(int_max), const Rect &rect=Rect(0)) const
 
size_type ChannelSize () const noexcept
 
sample_vector ColumnVector (int x, int channel=-1) const
 
sample_vector ColVector (int x, int channel=0) const
 
Compression::subblock_list Compress (const Compression &compressor, const Rect &rect=Rect(0), int channel=-1, Compression::Performance *perf=nullptr) const
 
size_type Count (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
GenericImageCreateAlphaChannels (int n)
 
GenericImageCrop ()
 
template<typename T >
GenericImageCrop (const GenericVector< T > &fillValues)
 
GenericImageCropBy (int left, int top, int right, int bottom)
 
template<typename T >
GenericImageCropBy (int left, int top, int right, int bottom, const GenericVector< T > &fillValues)
 
GenericImageCropTo (const Rect &rect)
 
template<typename T >
GenericImageCropTo (const Rect &rect, const GenericVector< T > &fillValues)
 
GenericImageCropTo (int x0, int y0, int x1, int y1)
 
template<typename T >
GenericImageCropTo (int x0, int y0, int x1, int y1, const GenericVector< T > &fillValues)
 
GenericImageDeleteAlphaChannel (int channel)
 
GenericImageDeleteAlphaChannels ()
 
template<class P1 >
GenericImageDif (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageDif (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<class P1 >
GenericImageDiv (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageDiv (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<class P1 >
GenericImageDivide (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageDivide (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImage Divided (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
GenericImageEnsureLocal ()
 
GenericImageEnsureUnique ()
 
template<class P1 >
GenericImageExchange (GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageFill (const GenericVector< T > &values, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageFill (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImage Filled (const GenericVector< T > &values, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<typename T >
GenericImage Filled (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
GenericImageForgetAlphaChannel (int channel)
 
GenericImageForgetAlphaChannels ()
 
GenericImageFreeData ()
 
template<typename T >
void GetColumn (T *buffer, int x, int channel=-1) const
 
void GetExtremePixelValues (sample &min, sample &max, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) 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
 
template<class P1 >
void GetIntensity (GenericImage< P1 > &I, const Rect &rect=Rect(0), int maxProcessors=0) const
 
void GetIntensity (ImageVariant &I, const Rect &rect=Rect(0), int maxProcessors=0) const
 
template<class P1 >
void GetLightness (GenericImage< P1 > &L, const Rect &rect=Rect(0), int maxProcessors=0) const
 
void GetLightness (ImageVariant &L, const Rect &rect=Rect(0), int maxProcessors=0) const
 
template<class P1 >
void GetLuminance (GenericImage< P1 > &Y, 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
 
uint64 Hash (int channel=-1, uint64 seed=0) const noexcept
 
uint32 Hash32 (int channel=-1, uint32 seed=0) const noexcept
 
uint64 Hash64 (int channel=-1, uint64 seed=0) const noexcept
 
size_type ImageSize () const noexcept
 
GenericImageImportData (sample **data, int width, int height, int numberOfChannels=1, color_space colorSpace=ColorSpace::Gray)
 
GenericImageInvert (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageInvert (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
GenericImage Inverted (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<typename T >
GenericImage Inverted (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
bool IsShared () const noexcept
 
bool IsUnique () 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
 
sample LocateMaximumPixelValue (int &xmax, int &ymax, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
sample LocateMaximumPixelValue (Point &pmax, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
sample LocateMaximumSampleValue (int &xmax, int &ymax, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
sample LocateMaximumSampleValue (Point &pmax, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
sample LocateMinimumPixelValue (int &xmin, int &ymin, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
sample LocateMinimumPixelValue (Point &pmin, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
sample LocateMinimumSampleValue (int &xmin, int &ymin, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
sample 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
 
template<class P1 >
GenericImageMax (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageMax (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImage Maximum (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
sample MaximumPixelValue (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
sample MaximumSampleValue (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
double Mean (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
double MeanOfSquares (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
double Median (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
template<class P1 >
GenericImageMin (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageMin (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImage Minimum (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
sample MinimumPixelValue (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
sample 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<class P1 >
GenericImageMov (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageMov (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<class P1 >
GenericImageMove (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageMove (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<class P1 >
GenericImageMul (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageMul (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImage Multiplied (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<class P1 >
GenericImageMultiply (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageMultiply (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<class P1 >
GenericImageNand (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageNand (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
size_type NominalSize () const noexcept
 
template<class P1 >
GenericImageNor (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageNor (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
 
GenericImageNormalize (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageNormalize (T lowerBound, T upperBound, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
GenericImage Normalized (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<typename T >
GenericImage Normalized (T lowerBound, T upperBound, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
Vector Norms (int maxDegree=2, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
GenericImageNot (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
GenericImageOne (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
 operator bool () const noexcept
 
sampleoperator() (const Point &p, int channel=0)
 
sample operator() (const Point &p, int channel=0) const noexcept
 
sampleoperator() (int x, int y, int channel=0)
 
sample operator() (int x, int y, int channel=0) const noexcept
 
sampleoperator* ()
 
const sampleoperator* () const noexcept
 
template<class P1 >
GenericImageoperator*= (const GenericImage< P1 > &image)
 
template<typename T >
GenericImageoperator*= (T scalar)
 
template<class P1 >
GenericImageoperator+= (const GenericImage< P1 > &image)
 
template<typename T >
GenericImageoperator+= (T scalar)
 
template<class P1 >
GenericImageoperator-= (const GenericImage< P1 > &image)
 
template<typename T >
GenericImageoperator-= (T scalar)
 
template<class P1 >
GenericImageoperator/= (const GenericImage< P1 > &image)
 
template<typename T >
GenericImageoperator/= (T scalar)
 
GenericImageoperator= (const GenericImage &image)
 
template<class P1 >
GenericImageoperator= (const GenericImage< P1 > &image)
 
GenericImageoperator= (GenericImage &&image)
 
GenericImageoperator= (sample scalar)
 
sampleoperator[] (int channel)
 
const sampleoperator[] (int channel) const noexcept
 
template<class P1 >
GenericImageoperator^= (const GenericImage< P1 > &image)
 
template<typename T >
GenericImageoperator^= (T scalar)
 
GenericImage operator~ () const
 
template<class P1 >
GenericImageOr (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageOr (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
 
samplePixel (const Point &p, int channel=0)
 
sample Pixel (const Point &p, int channel=0) const noexcept
 
samplePixel (int x, int y, int channel=0)
 
sample Pixel (int x, int y, int channel=0) const noexcept
 
samplePixelAddress (const Point &p, int channel=0)
 
const samplePixelAddress (const Point &p, int channel=0) const noexcept
 
samplePixelAddress (int x, int y, int channel=0)
 
const samplePixelAddress (int x, int y, int channel=0) const noexcept
 
samplePixelData (int channel=0)
 
const samplePixelData (int channel=0) const noexcept
 
template<class P1 >
GenericImagePow (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImagePow (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
double Qn (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
template<class P1 >
GenericImageRaise (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageRaise (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImage Raised (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
GenericImageRead (const String &filePath)
 
GenericImageRead (File &file)
 
GenericImageReleaseAlphaChannel (GenericImage &image, int channel)
 
sample ** ReleaseData ()
 
GenericImageRescale (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageRescale (T lowerBound, T upperBound, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
GenericImage Rescaled (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<typename T >
GenericImage Rescaled (T lowerBound, T upperBound, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
sample_vector RowVector (int y, int channel=-1) const
 
bool SameSampleType (const GenericImage &image) const noexcept
 
template<class P1 >
bool SameSampleType (const GenericImage< P1 > &image) const noexcept
 
sampleScanLine (int y, int channel=0)
 
const sampleScanLine (int y, int channel=0) const noexcept
 
template<class P1 >
GenericImageSetAbsoluteDifference (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageSetAbsoluteDifference (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
GenericImageSetAbsoluteValue (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
GenericImageSetColorSpace (color_space colorSpace, int maxProcessors=0)
 
template<typename T >
GenericImageSetColumn (const T *buffer, int x, int channel=-1)
 
template<class P1 >
GenericImageSetLightness (const GenericImage< P1 > &L, const Point &point=Point(int_max), const Rect &rect=Rect(0), int maxProcessors=0)
 
GenericImageSetLightness (const ImageVariant &L, const Point &point=Point(int_max), const Rect &rect=Rect(0), int maxProcessors=0)
 
template<class P1 >
GenericImageSetLuminance (const GenericImage< P1 > &Y, const Point &point=Point(int_max), const Rect &rect=Rect(0), int maxProcessors=0)
 
GenericImageSetLuminance (const ImageVariant &Y, const Point &point=Point(int_max), const Rect &rect=Rect(0), int maxProcessors=0)
 
template<class P1 >
GenericImageSetMaximum (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageSetMaximum (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<class P1 >
GenericImageSetMinimum (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageSetMinimum (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
void SetRGBWorkingSpace (const RGBColorSystem &RGBWS) override
 
template<typename T >
GenericImageSetRow (const T *buffer, int y, int channel=-1)
 
GenericImageShift ()
 
template<typename T >
GenericImageShift (const GenericVector< T > &fillValues)
 
GenericImageShiftBy (int dx, int dy)
 
template<typename T >
GenericImageShiftBy (int dx, int dy, const GenericVector< T > &fillValues)
 
GenericImageShiftTo (const Point &p)
 
template<typename T >
GenericImageShiftTo (const Point &p, const GenericVector< T > &fillValues)
 
GenericImageShiftTo (int x, int y)
 
template<typename T >
GenericImageShiftTo (int x, int y, const GenericVector< T > &fillValues)
 
GenericImageShiftToBottomLeft (int width, int height)
 
template<typename T >
GenericImageShiftToBottomLeft (int width, int height, const GenericVector< T > &fillValues)
 
GenericImageShiftToBottomRight (int width, int height)
 
template<typename T >
GenericImageShiftToBottomRight (int width, int height, const GenericVector< T > &fillValues)
 
GenericImageShiftToCenter (int width, int height)
 
template<typename T >
GenericImageShiftToCenter (int width, int height, const GenericVector< T > &fillValues)
 
GenericImageShiftToTopLeft (int width, int height)
 
template<typename T >
GenericImageShiftToTopLeft (int width, int height, const GenericVector< T > &fillValues)
 
GenericImageShiftToTopRight (int width, int height)
 
template<typename T >
GenericImageShiftToTopRight (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
 
double StdDev (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
 
template<class P1 >
GenericImageSub (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageSub (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<class P1 >
GenericImageSubtract (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageSubtract (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImage 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
 
GenericImageTransfer (GenericImage &&image)
 
GenericImageTransfer (GenericImage &image)
 
void Transform (BidirectionalImageTransformation &transform, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
GenericImageTruncate (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageTruncate (T lowerBound, T upperBound, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
GenericImage Truncated (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<typename T >
GenericImage 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
 
GenericImageWhite (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
GenericImageWrite (const String &filePath, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
GenericImageWrite (File &file, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1) const
 
template<class P1 >
GenericImageXchg (GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<class P1 >
GenericImageXnor (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageXnor (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<class P1 >
GenericImageXor (const GenericImage< P1 > &image, const Point &point=Point(int_max), int channel=-1, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
template<typename T >
GenericImageXor (T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
GenericImageZero (const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
 
- Public Member Functions inherited from pcl::AbstractImage
 ~AbstractImage () override
 
bool CanPopSelections () const noexcept
 
void DisableRangeClipping (bool disableLow=true, bool disableHigh=true) const noexcept
 
void EnableRangeClipping (bool enableLow=true, bool enableHigh=true) const noexcept
 
int FirstSelectedChannel () const noexcept
 
void GetSelectedChannelRange (int &c0, int &c1) const noexcept
 
pcl::StatusCallbackGetStatusCallback () const noexcept
 
bool HasAlphaChannels () const noexcept
 
bool IsCompletelySelected () const noexcept
 
bool IsEmptySelection () const noexcept
 
bool IsFullSelection () const noexcept
 
bool IsHighRangeClippingEnabled () const noexcept
 
bool IsLowRangeClippingEnabled () const noexcept
 
bool IsRangeClippingEnabled () const noexcept
 
int LastSelectedChannel () const noexcept
 
int NumberOfAlphaChannels () const noexcept
 
size_type NumberOfAlphaSamples () const noexcept
 
int NumberOfNominalChannels () const noexcept
 
size_type NumberOfNominalSamples () const noexcept
 
int NumberOfSelectedChannels () const noexcept
 
size_type NumberOfSelectedPixels () const noexcept
 
size_type NumberOfSelectedSamples () const noexcept
 
int NumberOfThreads (size_type count, int maxProcessors=0, size_type overheadLimit=16u) const noexcept
 
int NumberOfThreadsForRows (int rowCount=0, int rowWidth=0, int maxProcessors=0, size_type overheadLimitPx=1024u) const noexcept
 
Array< size_typeOptimalThreadRows (int rowCount=0, int rowWidth=0, int maxProcessors=0, size_type overheadLimitPx=1024u) const noexcept
 
bool ParseChannel (int &channel) const noexcept
 
bool ParseRect (Rect &rect) const noexcept
 
bool ParseSelection (Rect &rect, int &channel) const noexcept
 
bool ParseSelection (Rect &rect, int &firstChannel, int &lastChannel) const noexcept
 
void PopSelections () const
 
void PushSelections () const
 
double RangeClipHigh () const noexcept
 
double RangeClipLow () const noexcept
 
void ResetChannelRange () const noexcept
 
void ResetPoint () const noexcept
 
void ResetRangeClipping () const noexcept
 
void ResetSelection () const noexcept
 
void ResetSelections () const noexcept
 
void SelectAlphaChannels () const noexcept
 
void SelectChannel (int c) const noexcept
 
void SelectChannelRange (int c0, int c1) const noexcept
 
int SelectedChannel () const noexcept
 
const PointSelectedPoint () const noexcept
 
const RectSelectedRectangle () 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
 
void SetRangeClipHigh (double clipHigh) const noexcept
 
void SetRangeClipLow (double clipLow) const noexcept
 
void SetRangeClipping (double clipLow, double clipHigh) const noexcept
 
void SetStatusCallback (pcl::StatusCallback *callback) const noexcept
 
StatusMonitorStatus () const noexcept
 
pcl::StatusCallbackStatusCallback () const noexcept
 
- Public Member Functions inherited from pcl::ImageGeometry
Rect Bounds () 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
 
int Height () 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
 
bool IsEmpty () const noexcept
 
bool IsValidChannelIndex (int c) const noexcept
 
int LastChannel () const noexcept
 
int NumberOfChannels () const noexcept
 
size_type NumberOfPixels () const noexcept
 
size_type NumberOfSamples () const noexcept
 
distance_type PixelOffset (int x, int y) const noexcept
 
distance_type RowOffset (int y) const noexcept
 
int Width () const noexcept
 
- Public Member Functions inherited from pcl::ImageColor
String ChannelId (int c) const noexcept
 
color_space ColorSpace () const noexcept
 
bool IsColor () const noexcept
 
const RGBColorSystemRGBWorkingSpace () const noexcept
 
- Public Member Functions inherited from pcl::ParallelProcess
 ParallelProcess ()=default
 
 ParallelProcess (const ParallelProcess &)=default
 
virtual ~ParallelProcess ()
 
void DisableParallelProcessing (bool disable=true) noexcept
 
void EnableParallelProcessing (bool enable=true, int maxProcessors=0) noexcept
 
bool IsParallelProcessingEnabled () const noexcept
 
int MaxProcessors () const noexcept
 
ParallelProcessoperator= (const ParallelProcess &)=default
 
void SetMaxProcessors (int maxProcessors) noexcept
 
void Swap (ParallelProcess &process) noexcept
 

Static Public Member Functions

static int BitsPerSample () noexcept
 
static int BytesPerSample () noexcept
 
static bool IsComplexSample () noexcept
 
static bool IsFloatSample () noexcept
 
- Static Public Member Functions inherited from pcl::AbstractImage
template<class thread >
static void RunThreads (ReferenceArray< thread > &threads, ThreadData &data, bool useAffinity=true)
 
- Static Public Member Functions inherited from pcl::ImageColor
static const RGBColorSystemDefaultRGBWorkingSpace () noexcept
 
static void ResetDefaultRGBWorkingSpace ()
 
static void SetDefaultRGBWorkingSpace (const RGBColorSystem &RGBWS)
 

Friends

void Swap (GenericImage &x1, GenericImage &x2) noexcept
 

Detailed Description

template<class P>
class pcl::GenericImage< P >

Template class GenericImage implements a two-dimensional image in PCL. It inherits all public properties and functionality from its base classes: ImageGeometry, ImageColor, and AbstractImage, and adds a rich set of processing primitives through a versatile and easily adaptable interface.

Template instantiations of GenericImage and GenericPixelTraits provide instantiable image classes adapted to particular pixel sample types. Seven image types are already predefined in this way by PCL, corresponding to all supported real, integer and complex two-dimensional images in the current versions of the PixInsight platform:

pcl::Image 32-bit floating point real image
pcl::DImage 64-bit floating point real image
pcl::ComplexImage 32-bit floating point complex image
pcl::DComplexImage 64-bit floating point complex image
pcl::UInt8Image 8-bit unsigned integer image
pcl::UInt16Image 16-bit unsigned integer image
pcl::UInt32Image 32-bit unsigned integer image

Developers can define new image types easily by writing suitable instantiations of GenericPixelTraits and the corresponding instantiations of GenericImage. This system allows for the implementation of new image types tightly adapted to particular requirements.

See also
2-D Image Types, Image Iterators, ImageGeometry, ImageColor, AbstractImage, ImageVariant, GenericPixelTraits

Definition at line 277 of file Image.h.

Member Typedef Documentation

◆ color_space

template<class P >
using pcl::GenericImage< P >::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 312 of file Image.h.

◆ image_op

template<class P >
using pcl::GenericImage< P >::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 325 of file Image.h.

◆ pixel_allocator

template<class P >
using pcl::GenericImage< P >::pixel_allocator = PixelAllocator<P>

Represents a class responsible for allocation and deallocation of pixel data in this template instantiation of GenericImage. pixel_allocator must be able to handle shared and local pixel data allocation and deallocation in a transparent way.

By default, GenericImage uses an instantiation of the PixelAllocator template class for pixel_traits.

Definition at line 299 of file Image.h.

◆ pixel_traits

template<class P >
using pcl::GenericImage< P >::pixel_traits = P

Represents the GenericPixelTraits instantiation used in this template instantiation of GenericImage.

The pixel_traits type identifies a class implementing basic storage and functional primitives adapted to a particular sample data type.

Definition at line 288 of file Image.h.

◆ sample

template<class P >
using pcl::GenericImage< P >::sample = typename pixel_traits::sample

Represents the data type used to store pixel sample values in this template instantiation of GenericImage.

Definition at line 305 of file Image.h.

◆ sample_array

template<class P >
using pcl::GenericImage< P >::sample_array = Array<sample>

A dynamic array of pixel sample values.

Definition at line 335 of file Image.h.

◆ sample_vector

template<class P >
using pcl::GenericImage< P >::sample_vector = GenericVector<sample>

A vector of pixel sample values.

Definition at line 330 of file Image.h.

◆ selection_stack

The type of a container class used to store rectangular and channel range selections.

Definition at line 318 of file Image.h.

Constructor & Destructor Documentation

◆ GenericImage() [1/9]

template<class P >
pcl::GenericImage< P >::GenericImage ( )
inline

Constructs a default local image. This object will be initialized as an empty grayscale image with local storage.

Definition at line 6060 of file Image.h.

◆ GenericImage() [2/9]

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

Copy constructor. Constructs a local image to store a copy of the currently selected pixel samples in a local or shared image. The behavior of this constructor depends on the current selections and storage type of the specified source image:

  • If the source object is a shared image, then this constructor will create a duplicate of its current selection as a local image.
  • If the source object is a completely selected local image (see the note below), then this object will reference the same image data, and hence no duplicate of the existing pixel data will be generated. This enables the copy-on-write (or implicit data sharing) functionality of GenericImage.
  • If the source image is only partially selected, then a local image will be initialized to store in this object a copy of the selected pixel samples in the source image. If the selected range of channels is smaller than the required number of nominal channels for the source color space, then this object will be in the grayscale space. Otherwise this object will inherit the color space of the source image.
Note
In a completely selected image, the current rectangular selection includes the entire image boundaries, and the range of selected channels comprises all existing channels, including all nominal and alpha channels. By default, all images are completely selected. A complete selection is also enabled after calling the inherited ImageGeometry::ResetSelections() member function.

Definition at line 6094 of file Image.h.

References pcl::AbstractImage::IsCompletelySelected(), and pcl::GenericImage< P >::IsShared().

◆ GenericImage() [3/9]

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

Move constructor.

Definition at line 6113 of file Image.h.

◆ GenericImage() [4/9]

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

Constructs a local image to store a copy of the specified image, which belongs to a different template instantiation.

This constructor generates a uniquely referenced duplicate of the current selection of pixel samples in the specified image, converted to the sample type of this template instantiation.

Note
Don't confuse this constructor with the copy constructor for GenericImage. Note that the source image argument is a reference to a different template instantiation of GenericImage.

Definition at line 6133 of file Image.h.

◆ GenericImage() [5/9]

template<class P >
template<class P1 >
pcl::GenericImage< P >::GenericImage ( const GenericImage< P1 > &  image,
const Rect rect,
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

Constructs a local image to store a copy of a subset of pixel samples in the specified image.

Parameters
imageSource image.
rectSource rectangular selection. If this parameter defines an empty rectangle, the current rectangular selection in the source image will be used. If the specified rectangle is not empty and extends beyond the boundaries of the source image, only the intersection with the source image will be used. If that intersection does not exist, this constructor will initialize an empty image.
firstChannelZero-based index of the first channel to copy. If a negative index is specified, the first selected channel in the source image will be used. If the specified index is larger than or equal to the number of existing channels in the source image, this constructor will initialize an empty image. The default value is -1.
lastChannelZero-based index of the last channel to copy. If a negative index is specified, the last selected channel in the source image will be used. If the specified index is larger than or equal to the number of existing channels in the source image, this constructor will initialize an empty image. The default value is -1.

If the specified source image and this object use different pixel sample types, this constructor will use pixel traits primitives to perform all the necessary data type conversions between different pixel sample types transparently.

Note
This constructor will always generate a uniquely referenced, local image, irrespective of whether the rect, firstChannel and lastChannel parameters define a complete or partial selection for the specified source image. To make use of the implicit data sharing mechanism of GenericImage, use the copy constructor and make sure that the source image is completely selected.

Definition at line 6180 of file Image.h.

◆ GenericImage() [6/9]

template<class P >
pcl::GenericImage< P >::GenericImage ( int  width,
int  height,
color_space  colorSpace = ColorSpace::Gray 
)
inline

Constructs a local image with the specified dimensions and color space.

Parameters
widthWidth in pixels of the newly created image.
heightHeight in pixels of the newly created image.
colorSpaceColor space. See the ColorSpace namespace for symbolic constants. If this parameter is not specified, a grayscale image will be constructed.

The number of channels in the constructed image will depend on the specified color space. Grayscale images will have a single channel. In general, color images will have three channels.

Note
Pixel samples in the newly constructed image are not initialized by this constructor, so the image will contain unpredictable values.

Definition at line 6204 of file Image.h.

◆ GenericImage() [7/9]

template<class P >
pcl::GenericImage< P >::GenericImage ( File stream)
inlineexplicit

Constructs a local image with data read from a raw-storage stream.

Parameters
streamReference to an input stream where a raw image has been previously stored (e.g. with the Write() member function).

The input stream must provide sample values in the sample data type of this image. The sample data type of an image is invariantly defined by its template instantiation, and thus cannot be changed.

Warning
If the image stored in the input stream and this image use different pixel sample data types, this function will throw an Error exception with the appropriate error message.

Definition at line 6225 of file Image.h.

◆ GenericImage() [8/9]

template<class P >
pcl::GenericImage< P >::GenericImage ( void *  handle)
inlineexplicit

Constructs a shared, client-side managed image corresponding to a server-side image living in the PixInsight core application.

Parameters
handleA low-level API handle to an existing image in the PixInsight core application.

Shared images are alias objects referencing server-side images living within the PixInsight core application. Shared images allocate pixel data in the core application's heap, which we call shared memory.

Local images exist within the user module's local heap, including all of their pixel data.

PCL implements an abstraction mechanism that allows you to handle local and shared images transparently. Except in very few and special cases, you don't have to know whether you're working with a shared or a local image; your code will be exactly the same under both situations.

Definition at line 6250 of file Image.h.

◆ GenericImage() [9/9]

template<class P >
pcl::GenericImage< P >::GenericImage ( void *  ,
int  width,
int  height,
color_space  colorSpace = ColorSpace::Gray 
)
inline

Constructs a new shared image with the specified geometry and color.

Parameters
widthWidth in pixels of the newly created image.
heightHeight in pixels of the newly created image.
colorSpaceColor space. See the ColorSpace namespace for symbolic constants. If this parameter is not specified, a grayscale image will be constructed.

The first void* parameter is strictly formal. Its value will be ignored as its sole purpose is to distinguish this constructor from the corresponding local storage constructor.

The number of channels in the constructed image will depend on the specified color space. Grayscale images will have a single channel. In general, color images will have three channels.

A shared image created with this constructor can be used for intermodule communication tasks, such as file I/O operations with the FileFormat and FileFormatInstance classes, and execution of processes with Process and ProcessInstance.

Note
Pixel samples in the newly constructed image are not initialized by this constructor, so the image will contain unpredictable values.

Definition at line 6283 of file Image.h.

◆ ~GenericImage()

template<class P >
pcl::GenericImage< P >::~GenericImage ( )
inlineoverride

Destroys a GenericImage instance. If this is a nonempty local or shared image, the image data associated with this object are dereferenced. If the image data become unreferenced, they are also destroyed.

The internal allocator object does all the necessary clean-up work for both local and shared images transparently:

  • When a local image becomes unreferenced, all the internal data structures are destroyed and the memory space in use to store pixel samples is released immediately in the local heap of the calling module.
  • When a shared image becomes unreferenced, the server-side image is dereferenced. When the server-side shared image becomes unreferenced, it is garbage-collected and eventually destroyed by the PixInsight core application.

Definition at line 6306 of file Image.h.

Member Function Documentation

◆ Abs()

template<class P >
GenericImage& pcl::GenericImage< P >::Abs ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

A synonym for SetAbsoluteValue().

Definition at line 8957 of file Image.h.

◆ AbsoluteDifference()

template<class P >
template<typename T >
GenericImage pcl::GenericImage< P >::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.

For information on the parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 10056 of file Image.h.

◆ AbsoluteValue()

template<class P >
GenericImage pcl::GenericImage< P >::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.

For information on the parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 8972 of file Image.h.

◆ Add() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Add ( const GenericImage< P1 > &  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 equivalent to:

Apply( image, ImageOp::Add, point, channel, rect, firstChannel, lastChannel );
GenericImage & Apply(T scalar, image_op op=ImageOp::Mov, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
Definition: Image.h:9119

Definition at line 10295 of file Image.h.

◆ Add() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

Apply( scalar, ImageOp::Add, rect, firstChannel, lastChannel );

Definition at line 9772 of file Image.h.

◆ AddAlphaChannel()

template<class P >
GenericImage& pcl::GenericImage< P >::AddAlphaChannel ( sample data = nullptr)
inline

Forces this image to acquire the specified pixel sample data as a new alpha channel. Returns a reference to this image.

Parameters
dataStarting address of the acquired pixel data. If this parameter is a null pointer, a single new alpha channel will be added to the image.

The image will own the acquired pixel data. The new alpha channel is appended to the existing channels.

Warning
See the ImportData() member function documentation for an important warning notice that applies also to this function.

Definition at line 7620 of file Image.h.

◆ Added()

template<class P >
template<typename T >
GenericImage pcl::GenericImage< P >::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.

For information on the parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 9797 of file Image.h.

◆ AllocateData() [1/2]

template<class P >
GenericImage& pcl::GenericImage< P >::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.

This member function is equivalent to:

AllocateData( rect.Width(), rect.Height(), numberOfChannels, colorSpace );
GenericImage & AllocateData(int width, int height, int numberOfChannels=1, color_space colorSpace=ColorSpace::Gray)
Definition: Image.h:6484

Definition at line 6509 of file Image.h.

◆ AllocateData() [2/2]

template<class P >
GenericImage& pcl::GenericImage< P >::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.

Parameters
widthNew image width in pixels.
heightNew image height in pixels.
numberOfChannelsNumber of channels. Must be greater than or equal to the number of nominal channels corresponding to the specified color space: one for grayscale images; three for color images. If this parameter is not specified, a single grayscale channel will be allocated.
colorSpaceNew color space. See the ColorSpace namespace for symbolic constants. If this parameter is not specified, new image data will be allocated in the grayscale space.

If this object uniquely references its pixel data, then the previously existing pixel data are destroyed, deallocated, and replaced with a newly allocated local or shared image, preserving the storage space of this instance.

If this object is not unique, then the previously referenced pixel data are dereferenced, and a newly created local image is uniquely referenced by this object and allocated with the specified parameters.

All image selections are reset to the default full selection after calling this function.

Note
Newly allocated pixel samples are not initialized, so the image will contain unpredictable values after calling this member function.

Definition at line 6484 of file Image.h.

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

◆ Allocator()

template<class P >
pixel_allocator& pcl::GenericImage< P >::Allocator ( ) const
inlinenoexcept

Returns a reference to the internal pixel allocator object associated with this image.

The type of the allocator object is a template specialization of the PixelAllocator class for the sample data type of this image. The allocator is responsible for dynamic allocation of pixel data, including channel slots (pointers to pixel sample blocks) and pixel sample blocks (used to store channel pixel data).

The allocator must be able to handle dynamic allocation for local and shared memory transparently. This means that the allocator object knows whether this is a local image (allocated in the calling module's heap) or a shared image (allocated in the PixInsight core's heap), and allows you to manage and allocate pixel data without distinction in both cases.

Warning
Never use the new and delete operators with pixel data memory blocks. Always call the Allocator() member function of GenericImage to get a reference to its PixelAllocator object, then use its public member functions for all allocations and deallocations of pixel data.

Definition at line 6434 of file Image.h.

◆ AlphaSize()

template<class P >
size_type pcl::GenericImage< P >::AlphaSize ( ) const
inlinenoexcept

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

Definition at line 6702 of file Image.h.

◆ And() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::And ( const GenericImage< P1 > &  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 equivalent to:

Apply( image, ImageOp::And, point, channel, rect, firstChannel, lastChannel );

Definition at line 10589 of file Image.h.

◆ And() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

Apply( scalar, ImageOp::And, rect, firstChannel, lastChannel );

Definition at line 10180 of file Image.h.

◆ Applied() [1/3]

template<class P >
template<class P1 >
GenericImage pcl::GenericImage< P >::Applied ( const GenericImage< P1 > &  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.

For information on the parameters of this member function, see the documentation for Apply().

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 9420 of file Image.h.

◆ Applied() [2/3]

template<class P >
GenericImage pcl::GenericImage< P >::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 to a subset of pixel samples. Returns the resulting image.

Parameters
transformationAn image transformation that will be applied to the selected subset of pixel samples.

For information on the rest of parameters of this member function, see the documentation for Fill(). For information on image transformations, see Apply( const ImageTransformation& ) and ImageTransformation.

Warning
This member function is not thread safe, even if the subset of pixel samples is selected directly with the rect, firstChannel and lastChannel parameters. This is because image transformations always use the current image selection, which this function changes temporarily.

Definition at line 9489 of file Image.h.

◆ Applied() [3/3]

template<class P >
template<typename T >
GenericImage pcl::GenericImage< P >::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.

Parameters
scalarRight-hand operand value.
opIdentifies an arithmetic or bitwise logical operator. For a list of supported operators, see the ImageOp namespace. The default value is ImageOp::Mov (replace target with source).

For information on the rest of parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 9176 of file Image.h.

◆ Apply() [1/3]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Apply ( const GenericImage< P1 > &  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 or bitwise logical operation between a subset of pixel samples in this image and the corresponding samples of another operand image. Returns a reference to this image.

Parameters
imageRight-hand operand image.
opIdentifies an arithmetic or bitwise logical operator. For a list of supported operators, see the ImageOp namespace. The default value is ImageOp::Mov (replace target with source).
pointTarget point in image coordinates. This is the upper left corner of the target rectangular region where the source image will be applied to this image. If one or both point coordinates are equal to int_max (the maximum possible value of type int), then the current anchor point selection will be used. The default value is Point( int_max ).
channelTarget channel index (zero-based). This is the index of the first channel where source pixel samples will be applied. If this parameter is negative, then the currently selected channel will be used. The default value is -1.

For information on the rest of parameters of this member function, see the documentation for Fill().

The specified operation is performed with samples in the intersection between the specified (or implicit) rectangular selections for both images. Each channel in the specified channel range selection for this image is operated with its counterpart channel in the right-hand operand image, starting from the first selected channel in the right-hand operand image.

The operation may involve conversions to the appropriate floating point data type for intermediate results, or LUT table lookups, as necessary to ensure preservation of the full native range of the image. Floating point conversions may take place even if both images share the same sample data type, depending on the selected operator.

Note
Increments the status monitoring object by the number of pixel samples in the intersection between both operand images.

Definition at line 9231 of file Image.h.

◆ Apply() [2/3]

template<class P >
GenericImage< P > & pcl::GenericImage< P >::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.

Parameters
transformationAn image transformation that will be applied to the selected subset of pixel samples.

For information on the rest of parameters of this member function, see the documentation for Fill().

If the applied transformation is bidirectional, then this function represents an inverse transformation, usually requiring a previous direct transformation. See the Transform() member function.

Bidirectional transformations such as FourierTransform and ATrousWaveletTransform usually ignore the specified (or implicit) selections of a rectangular region and channel range. Other non-invertible transformations, especially geometric transformations such as Resample or Rotation, also ignore pixel sample selections.

Note
In general, the applied transformation increments the status monitoring object proportionally to the number of selected pixel samples. However, the specific increments depend on the applied transformations.
Warning
This member function is not thread safe, even if the subset of pixel samples is selected directly with the rect, firstChannel and lastChannel parameters. This is because image transformations always use the current image selection, which this function changes temporarily.
See also
ImageTransformation

Definition at line 378 of file ImageTransformation.h.

◆ Apply() [3/3]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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.

Parameters
scalarRight-hand operand value.
opIdentifies an arithmetic, bitwise logical or pixel composition operator. For a list of supported operators, see the ImageOp namespace. The default value is ImageOp::Mov (replace target with source).

For information on the rest of parameters of this member function, see the documentation for Fill().

If the specified scalar is zero or insignificant, and the op argument is ImageOp::Div, this function throws an Error exception to prevent a division by zero.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 9119 of file Image.h.

◆ Assign()

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Assign ( const GenericImage< P1 > &  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.

Parameters
imageSource image.
rectSource rectangular selection. If this parameter defines an empty rectangle, the current rectangular selection in the source image will be used. If the specified rectangle is not empty and extends beyond source image boundaries, only the intersection with the source image will be used. If that intersection does not exist, then this image will be empty after calling this member function. The default value is an empty rectangle.
firstChannelZero-based index of the first channel to copy. If a negative value is specified, the first selected channel in the source image will be used. If the specified value is larger than or equal to the number of existing channels in the source image, then this image will be empty after calling this function. The default value is -1.
lastChannelZero-based index of the last channel to copy. If a negative value is specified, the last selected channel in the source image will be used. If the specified value is larger than or equal to the number of existing channels in the source image, then this image will be empty after calling this function. The default value is -1.

Previously referenced data in this image will be dereferenced, and immediately destroyed if they become unreferenced.

If this image and the specified source image are (a) compatible in terms of pixel sample types, (b) both are local images, and (c) the source image is completely selected, then this member function just references the same pixel data, enabling the implicit data sharing mechanism of GenericImage. In this case, existing pixel data in the source image are not duplicated, and no allocation is performed.

If this member function causes a reallocation of pixel data, the newly allocated data will be uniquely referenced by this image.

The source image can be an instance of any supported template instantiation of GenericImage, not necessarily of the same instantiation than this image. All the necessary data type conversions are performed transparently. If pixel sample types are different, source data are transformed to the data type of this image. This involves conversions from the source data type P1::sample to the target data type P::sample, as per pixel traits primitives.

Note
It is very important to point out that the storage class of an image cannot be changed with this member function, even if this image and the source image belong to the same template instantiation. For example:
Image aSharedImage( (void*)0, 0, 0 );
...
Image local;
...
local.Assign( aSharedImage ); // local continues being a local image.
// It now stores a copy of aSharedImage's
// pixel data.
local = aSharedImage; // Same as above, since the assignment operator is
// just an alias for the Assign() function.
ImageVariant otherShared;
otherShared.CreateSharedFloatImage();
otherShared.AssignImage( local ); // otherShared is still a shared image.
32-bit floating point real image.

Definition at line 7150 of file Image.h.

◆ AvgDev()

template<class P >
double pcl::GenericImage< P >::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.

Parameters
centerReference central value for computation of the mean absolute deviation in the normalized range [0,1]. Typically, this parameter is set to the median value of the set of pixel samples used for calculation.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

This member function returns the mean absolute deviation with respect to center in the normalized range [0,1], irrespective of the sample data type of the image.

For complex-valued images, this function returns the average absolute deviation of the magnitudes (or absolute values) of all selected samples.

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account for calculation of the average absolute deviation.

This function implements a numerically stable summation algorithm to reduce roundoff errors to the machine's floating point precision.

Note
To make the average absolute deviation about the median consistent with the standard deviation of a normal distribution, it must be multiplied by the constant 1.2533.
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 12130 of file Image.h.

◆ BendMidvariance()

template<class P >
double pcl::GenericImage< P >::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.

Parameters
centerReference center value in the [0,1] range. Normally, the median of the selected pixel samples should be used.
betaRejection parameter in the [0,0.5] range. Higher values improve robustness to outliers (i.e., increase the breakdown point of the estimator) at the expense of lower efficiency. The default value is beta=0.2.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

The square root of the percentage bend midvariance is a robust estimator of scale. With the default beta=0.2, its Gaussian efficiency is 67%. With beta=0.1, its efficiency is 85% but its breakdown is only 0.1.

This member function returns PBMV in the normalized range [0,1], irrespective of the sample data type of the image.

For complex-valued images, this function returns a PBMV for the magnitudes (or absolute values) of all selected samples.

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account for calculation of the percentage bend midvariance.

References

Rand R. Wilcox (2012), Introduction to Robust Estimation and Hypothesis Testing, 3rd Edition, Elsevier Inc., Section 3.12.3.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 12854 of file Image.h.

◆ Binarize() [1/2]

template<class P >
GenericImage& pcl::GenericImage< P >::Binarize ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
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 convenience shortcut for:

Binarize( (P::MinSampleValue() + P::MaxSampleValue())/2, rect, firstChannel, lastChannel );
GenericImage & Binarize(T threshold, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
Definition: Image.h:8808

For information on the parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 8882 of file Image.h.

◆ Binarize() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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.

Parameters
thresholdBinarizing threshold.

The specified binarizing threshold is converted to the sample data type of this image, using pixel traits primitives.

For information on the rest of parameters of this member function, see the documentation for Fill().

The binarized value b of a sample s is given by:

if s < t
   b = 0
else
   b = 1
endif

where t is the binarizing threshold value, and 0 and 1 represent, respectively, the minimum and maximum pixel sample values in the native range of the image.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 8808 of file Image.h.

◆ Binarized() [1/2]

template<class P >
GenericImage pcl::GenericImage< P >::Binarized ( 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 central value of the native range of the image.

For information on the parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 8898 of file Image.h.

◆ Binarized() [2/2]

template<class P >
template<typename T >
GenericImage pcl::GenericImage< P >::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.

For information on the rest of parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 8858 of file Image.h.

◆ BitsPerSample()

template<class P >
static int pcl::GenericImage< P >::BitsPerSample ( )
inlinestaticnoexcept

Returns the number of bits in a pixel sample of this GenericImage template instantiation.

Definition at line 6024 of file Image.h.

◆ BiweightMidvariance()

template<class P >
double pcl::GenericImage< P >::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.

Parameters
centerReference center value in the [0,1] range. Normally, the median of the selected pixel samples should be used.
sigmaA reference estimate of dispersion in the [0,1] range. Normally, the median absolute deviation from the median (MAD) of the selected pixel samples should be used.
kRejection limit in sigma units. The default value is k=9.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

The square root of the biweight midvariance is a robust estimator of scale. It is an efficient estimator with respect to many statistical distributions (about 87% Gaussian efficiency), and appears to have a breakdown point close to 0.5 (the same as MAD).

This member function returns BWMV in the normalized range [0,1], irrespective of the sample data type of the image.

For complex-valued images, this function returns a BWMV for the magnitudes (or absolute values) of all selected samples.

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account for calculation of the biweight midvariance.

References

Rand R. Wilcox (2012), Introduction to Robust Estimation and Hypothesis Testing, 3rd Edition, Elsevier Inc., Section 3.12.1.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 12671 of file Image.h.

◆ Black()

template<class P >
GenericImage& pcl::GenericImage< P >::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 convenience shortcut for:

Fill( P::MinSampleValue(), rect, firstChannel, lastChannel );
GenericImage & Fill(T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
Definition: Image.h:7881
Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 8049 of file Image.h.

◆ Blend()

template<class P >
GenericImage& pcl::GenericImage< P >::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.

Parameters
bitmapReference to a constant source bitmap.
pointTarget point in image coordinates. This is the upper left corner of the target rectangular region where the source bitmap will be applied to this image. If one or both point coordinates are equal to int_max (the maximum possible value of type int), then the current anchor point selection will be used. The default value is Point( int_max ).
rectSource rectangular region in bitmap coordinates. If this parameter defines an empty rectangle, the whole source bitmap will be applied. If the specified rectangle is not empty and extends beyond image boundaries, only the intersection with the source bitmap will be used. If that intersection does not exist, then this member function has no effect. The default value is an empty rectangle.

The blending operation involves only nominal image channels. The alpha channel of the source bitmap defines a transparency mask for combining bitmap pixel values and image pixel sample values. The resulting pixel sample value V1 after the blending operation is given in the normalized real range [0,1] by the following expression:

V1 = V*(1 - A/255) + B * A/255

where V is the initial pixel value of this image, A is the alpha value of the source bitmap pixel, and B is one of the red, green or blue values in the source bitmap pixel. The expression above is applied respectively for each nominal sample of this image.

Note
Increments the status monitoring object by the number of pixels in the intersection between this image and the specified rectangular region of the source bitmap.

Definition at line 9567 of file Image.h.

◆ Blended()

template<class P >
GenericImage pcl::GenericImage< P >::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.

For information on the parameters of this member function, see the documentation for Blend().

Note
Increments the status monitoring object of the returned image by the number of pixels in the intersection between this image and the specified rectangular region of the source bitmap.

Definition at line 9724 of file Image.h.

◆ BytesPerSample()

template<class P >
static int pcl::GenericImage< P >::BytesPerSample ( )
inlinestaticnoexcept

Returns the number of 8-bit bytes required to store a pixel sample in this GenericImage template instantiation.

Definition at line 6015 of file Image.h.

◆ ChannelSize()

template<class P >
size_type pcl::GenericImage< P >::ChannelSize ( ) const
inlinenoexcept

Returns the size in bytes of a channel of this image. This is equal to the area in square pixels multiplied by BytesPerSample().

Definition at line 6671 of file Image.h.

◆ ColumnVector()

template<class P >
sample_vector pcl::GenericImage< P >::ColumnVector ( int  x,
int  channel = -1 
) const
inline

Generates a vector of pixel samples from a column of this image.

Parameters
xHorizontal coordinate (or column index) of the desired column, 0 ≤ x < w, where w is the width in pixels of this image.
channelChannel index. If this parameter is negative, the currently selected channel will be used. The default value is -1.

The number of components in the returned vector will be equal to the height in pixels of this image.

If this image is empty, if the specified horizontal coordinate is out of range, or if a nonexistent channel is specified, this member function returns an empty vector.

Definition at line 7403 of file Image.h.

◆ ColVector()

template<class P >
sample_vector pcl::GenericImage< P >::ColVector ( int  x,
int  channel = 0 
) const
inline

A convenience synonym for ColumnVector( int, int ) const.

Definition at line 7419 of file Image.h.

◆ Compress()

template<class P >
Compression::subblock_list pcl::GenericImage< P >::Compress ( const Compression compressor,
const Rect rect = Rect( 0 ),
int  channel = -1,
Compression::Performance perf = nullptr 
) const
inline

Compression of image pixel samples.

Parameters
compressorA compression algorithm that will be used to compress pixel sample data from this image.
rectA rectangular region in image pixel coordinates. This region determines the subset of pixel samples that will be compressed. If this parameter is not specified, or if an empty rectangle is specified, this function will compress pixel samples in the current rectangular selection of this image, that is, SelectedRectangle().
channelChannel index. Must be the zero-based index of an existing channel in this image, or an integer < 0. If this parameter is not specified or a negative integer, this function will compress pixel samples in the currently selected channel of this image, that is, SelectedChannel().
perfIf non-null, pointer to a Compression::Performance structure where performance data will be provided.

Returns a dynamic array of compressed sub-blocks. Each array element is a Compression::Subblock structure with the compressed data and the corresponding uncompressed length in bytes. If compression succeeds, the returned array will have at least one element.

Data will be compressed for the intersection of the specified (or implicitly selected) rectangular region with this image. All predefined pixel sample types are supported, including integer, real and complex pixels.

If there is no intersection between the rectangular region and the image, if an invalid channel index is specified, or if one or more sub-blocks are not compressible with the specified compression algorithm, this function returns an empty array.

Definition at line 15060 of file Image.h.

◆ Count()

template<class P >
size_type pcl::GenericImage< P >::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.

Parameters
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account. If range clipping is disabled, the result of this member function will be the volume of the specified (or implicitly selected) region.

When range clipping is enabled and this is a complex-valued image, this function uses the magnitudes (or absolute values) of all selected samples to compare them with the bounds of the current clipping range.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 11490 of file Image.h.

◆ CreateAlphaChannels()

template<class P >
GenericImage& pcl::GenericImage< P >::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.

Definition at line 7571 of file Image.h.

◆ Crop() [1/2]

template<class P >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

GenericImage & Crop()
Definition: Image.h:13890
GenericVector< sample > sample_vector
Definition: Image.h:330

Definition at line 13890 of file Image.h.

◆ Crop() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::Crop ( const GenericVector< T > &  fillValues)
inline

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

This member function is equivalent to:

CropTo( SelectedRectangle(), fillValues );
const Rect & SelectedRectangle() const noexcept
GenericImage & CropTo(const Rect &rect, const GenericVector< T > &fillValues)
Definition: Image.h:13809

Definition at line 13874 of file Image.h.

◆ CropBy() [1/2]

template<class P >
GenericImage& pcl::GenericImage< P >::CropBy ( int  left,
int  top,
int  right,
int  bottom 
)
inline

Crops or extends the entire image by applying the specified margins, 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 equivalent to:

CropBy( left, top, right, bottom, sample_vector() );
GenericImage & CropBy(int left, int top, int right, int bottom, const GenericVector< T > &fillValues)
Definition: Image.h:13675

Definition at line 13793 of file Image.h.

◆ CropBy() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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.

Parameters
leftLeft margin in pixels.
topTop margin in pixels.
rightRight margin in pixels.
bottomBottom margin in pixels.
fillValuesVector of filling sample values for extended areas, used when one or more margins are greater than zero. Each vector component is used for its corresponding channel (e.g., the first component is used to fill the red channel of an RGB image, the second component to fill the green channel, etc.). If there are less vector components than channels in the image, the minimum sample value in the native range of the image (usually zero or black) is used for the missing filling values. The default parameter value is an empty vector, so the extended areas are filled with black by default.

Negative margins crop the image at their respective sides. Positive margin values add extra space.

Note
Increments the status monitoring object by the area in square pixels of the cropping rectangle.

Definition at line 13675 of file Image.h.

◆ CropTo() [1/4]

template<class P >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

CropTo( rect, sample_vector() );

Definition at line 13826 of file Image.h.

◆ CropTo() [2/4]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

CropBy( -rect.x0, -rect.y0, rect.x1 - m_width, rect.y1 - m_height, fillValues );

Definition at line 13809 of file Image.h.

References pcl::GenericRectangle< T >::Ordered(), pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, and pcl::GenericRectangle< T >::y0.

◆ CropTo() [3/4]

template<class P >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

CropTo( x0, y0, x1, y1, sample_vector() );

Definition at line 13858 of file Image.h.

◆ CropTo() [4/4]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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.

This member function is equivalent to:

CropTo( Rect( x0, y0, x1, y1 ), fillValues );
32-bit integer rectangle on the plane.

Definition at line 13842 of file Image.h.

◆ DeleteAlphaChannel()

template<class P >
GenericImage& pcl::GenericImage< P >::DeleteAlphaChannel ( int  channel)
inline

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

Parameters
channelZero-based index of the alpha channel to be destroyed, 0 ≤ c < n, where n is the number of existing alpha channels before calling this function.
Note
The specified channel index is an alpha channel index, not a normal channel index comprising nominal channels. That is, the first alpha channel is indexed as zero by this function.

Definition at line 7732 of file Image.h.

References pcl::ColorSpace::NumberOfNominalChannels().

◆ DeleteAlphaChannels()

template<class P >
GenericImage& pcl::GenericImage< P >::DeleteAlphaChannels ( )
inline

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

Definition at line 7794 of file Image.h.

References pcl::ColorSpace::NumberOfNominalChannels().

◆ Dif() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Dif ( const GenericImage< P1 > &  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 SetAbsoluteDifference().

Definition at line 10491 of file Image.h.

◆ Dif() [2/2]

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

A synonym for SetAbsoluteDifference().

Definition at line 10039 of file Image.h.

◆ Div() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Div ( const GenericImage< P1 > &  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 10413 of file Image.h.

◆ Div() [2/2]

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

A synonym for Divide().

Definition at line 9931 of file Image.h.

◆ Divide() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Divide ( const GenericImage< P1 > &  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 equivalent to:

Apply( image, ImageOp::Div, point, channel, rect, firstChannel, lastChannel );

When a source pixel sample of the specified image is zero or insignificant, the corresponding target pixel sample is set to the maximum sample value in the native range of this image.

Definition at line 10402 of file Image.h.

◆ Divide() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

Apply( scalar, ImageOp::Div, rect, firstChannel, lastChannel );
Warning
Make sure that the specified scalar is not zero or insignificant.

Definition at line 9922 of file Image.h.

◆ Divided()

template<class P >
template<typename T >
GenericImage pcl::GenericImage< P >::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.

For information on the parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.
Warning
Make sure that the specified scalar is not zero or insignificant.

Definition at line 9959 of file Image.h.

◆ EnsureLocal()

template<class P >
GenericImage& pcl::GenericImage< P >::EnsureLocal ( )
inline

Ensures that this image uses local pixel data storage. Returns a reference to this image.

If this object is already a local image, then calling this member function has no effect.

If the image is shared, then this function creates a local duplicate, dereferences the previously referenced pixel data, and references the newly created local duplicate. Upon returning, this image will uniquely reference its pixel data.

Definition at line 6365 of file Image.h.

◆ EnsureUnique()

template<class P >
GenericImage& pcl::GenericImage< P >::EnsureUnique ( )
inline

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

If this object is not sharing its pixel data with other GenericImage instances, then calling this member function has no effect.

If this object is sharing its pixel data with other instances, then the previously referenced pixel data are dereferenced, and a newly created copy of the pixel data is uniquely referenced by this image. In this case this object will always be a local image after calling this function: newly created duplicates of existing pixel data are always allocated in the local heap of the calling module.

Definition at line 6401 of file Image.h.

◆ Exchange()

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Exchange ( GenericImage< P1 > &  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.

Parameters
imageOperand image, whose pixel samples will be exchanged with samples from this image.
pointTarget point in image coordinates. This is the upper left corner of the target rectangular region where the source image will be exchanged with this image. If one or both point coordinates are equal to int_max (the maximum possible value of type int), then the current anchor point selection will be used. The default value is Point( int_max ).
channelTarget channel index (zero-based). This is the index of the first channel of this image where pixel samples will be exchanged. If this parameter is negative, then the currently selected channel will be used. The default value is -1.

For information on the rest of parameters of this member function, see the documentation for Fill().

The specified operation is performed with samples in the intersection between the specified (or implicit) rectangular selections for both images. Each channel in the specified channel range selection for this image is operated with its counterpart channel in the operand image, starting from the first selected channel in the operand image.

The operation may involve conversions to the appropriate floating point data type for intermediate results, or LUT table lookups, as necessary to ensure preservation of the full native range of both images.

Note
Increments the status monitoring object by the number of pixel samples in the intersection between both operand images.

Definition at line 10712 of file Image.h.

◆ Fill() [1/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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.

Parameters
valuesVector of filling values. Each component of this vector is a filling value for the corresponding channel in the pixel sample selection (i.e., the first component is the filling value for the first selected channel, the second component for the second selected channel, etc.). If the vector has less components than channels in the selection, the missing values are replaced with the minimum sample value in the native range of the image (usually zero).

The rest of parameters of this function are identical to those of Fill( T, const Rect&, int, int ).

Definition at line 7928 of file Image.h.

◆ Fill() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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.

Parameters
scalarScalar value to fill with. The specified value will be converted to the sample data type of this image.
rectTarget rectangular region. If this parameter defines an empty rectangle, the current rectangular selection will be used. If the specified rectangle is not empty and extends beyond image boundaries, only the intersection with this image will be used. If that intersection does not exist, then this member function has no effect. The default value is an empty rectangle.
firstChannelZero-based index of the first channel to fill. If a negative index is specified, the first selected channel will be used. If the specified index is larger than or equal to the number of channels in this image, then this member function has no effect. The default value is -1.
lastChannelZero-based index of the last channel to fill. If a negative index is specified, the last selected channel will be used. If the specified index is larger than or equal to the number of channels in this image, then this member function has no effect. The default value is -1.

Previously referenced data in this image will be dereferenced, and immediately destroyed if they become unreferenced.

If this member function causes a reallocation of pixel data, the newly allocated data will be local and uniquely referenced by this image.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 7881 of file Image.h.

◆ Filled() [1/2]

template<class P >
template<typename T >
GenericImage pcl::GenericImage< P >::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.

For information on the parameters of this member function, see the documentation for Fill( const GenericVector&, const Rect&, int, int ).

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 7990 of file Image.h.

◆ Filled() [2/2]

template<class P >
template<typename T >
GenericImage pcl::GenericImage< P >::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.

For information on the parameters of this member function, see the documentation for Fill( T, const Rect&, int, int ).

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 7971 of file Image.h.

◆ ForgetAlphaChannel()

template<class P >
GenericImage& pcl::GenericImage< P >::ForgetAlphaChannel ( int  channel)
inline

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

Parameters
channelZero-based index of the alpha channel to be forgotten, 0 ≤ c < n, where n is the number of existing alpha channels before calling this function.
Warning
You should have gained control over the pixel data corresponding to the forgotten channel before calling this function, in order to be able to deallocate it when appropriate, or you'll induce a memory leak.
Note
The specified channel index is an alpha channel index, not a normal channel index comprising nominal channels. That is, the first alpha channel is indexed as zero by this function.

Definition at line 7762 of file Image.h.

◆ ForgetAlphaChannels()

template<class P >
GenericImage& pcl::GenericImage< P >::ForgetAlphaChannels ( )
inline

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

Warning
You should have gained control over the pixel data for all alpha channels in this image before calling this function, in order to be able to deallocate them when appropriate, or you'll induce a memory leak.

Definition at line 7818 of file Image.h.

References pcl::ColorSpace::NumberOfNominalChannels().

◆ FreeData()

template<class P >
GenericImage& pcl::GenericImage< P >::FreeData ( )
inline

Causes this object to reference an empty image. Returns a reference to this image.

If this object uniquely references its pixel data, then the pixel data are destroyed and deallocated immediately.

If this object is not unique, then the previously referenced pixel data are dereferenced, and a newly created empty local image is uniquely referenced by this object.

Definition at line 6527 of file Image.h.

◆ GetColumn()

template<class P >
template<typename T >
void pcl::GenericImage< P >::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.

Parameters
[out]bufferStarting address of a contiguous block where samples from the source column will be converted and copied. The length of this block must be at least equal to the height in pixels of this image.
xHorizontal coordinate (or column index) of the desired column, 0 ≤ x < w, where w is the width in pixels of this image.
channelChannel index. If this parameter is negative, the currently selected channel will be used. The default value is -1.

If this image is empty, if the specified horizontal coordinate is out of range, or if a nonexistent channel is specified, this member function does nothing.

Definition at line 7479 of file Image.h.

◆ GetExtremePixelValues()

template<class P >
void pcl::GenericImage< P >::GetExtremePixelValues ( sample min,
sample max,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline
Deprecated:
This member function has been deprecated. It is still part of PCL only to keep existing code alive. In newly produced code, use GetExtremeSampleValues() instead.

Definition at line 11041 of file Image.h.

◆ GetExtremeSampleValues()

template<class P >
template<typename T >
void pcl::GenericImage< P >::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.

Parameters
[out]minMinimum sample value.
[out]maxMaximum sample value.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

If necessary, the output values will be converted from the pixel sample data type of this image using pixel traits primitives.

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account to search for the extreme sample values.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 10979 of file Image.h.

◆ GetIntensity() [1/2]

template<class P >
template<class P1 >
void pcl::GenericImage< P >::GetIntensity ( GenericImage< P1 > &  I,
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]IReference to a destination image, where the computed intensity component will be stored. This image can be an instance of any supported GenericImage template instantiation; all the necessary data type conversions are carried out transparently.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

This member function computes the I intensity component in the HSI color ordering scheme. The intensity is useful for applications where a colorimetrically correct component, such as luminance or lightness, is not necessary. For example, the intensity component can be used for feature detection (e.g., star detection) on RGB color images.

The intensity component I of an RGB pixel is given by:

I = (Max(R,G,B) + Min(R,G,B))/2

where R, G and B are the red, green and blue components of the RGB pixel, respectively.

If this image is in the grayscale or HSI spaces, gray or intensity source samples are simply copied to the destination image, after conversion to the destination sample data type, if necessary, using pixel traits primitives.

If this image is in the RGB color space, the intensity components for each pixel is calculated as described above. For other color spaces intermediate RGB components are computed on the fly.

The intensity is computed for the specified subset of pixel samples, or for the current rectangular selection, depending on parameter values. For more information on the rest of parameters of this function, see the documentation for Fill(). The current channel range selection is always ignored by this function.

The previous contents of the destination image will be dereferenced (and immediately destroyed if they become unreferenced) and replaced with the computed, uniquely referenced intensity data. The destination image will be in the grayscale color space; it will have a single channel corresponding to the intensity of the specified pixel sample subset in this image. The dimensions of the destination image will be the same ones of the specified pixel sample subset, and it will be associated with the same RGBWS as this image.

Note
Increments the status monitoring object by the number of modified pixels (not samples).

Definition at line 14673 of file Image.h.

◆ GetIntensity() [2/2]

template<class P >
void pcl::GenericImage< P >::GetIntensity ( ImageVariant I,
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, transported by an ImageVariant object.

If the specified ImageVariant 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).

Definition at line 7268 of file ImageVariant.h.

◆ GetLightness() [1/2]

template<class P >
template<class P1 >
void pcl::GenericImage< P >::GetLightness ( GenericImage< P1 > &  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 image, where the computed CIE L* component will be stored. This image can be an instance of any supported GenericImage template instantiation; all the necessary data type conversions are carried out transparently.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

This member function computes the L* component of the CIE L*a*b* space. CIE L* component values are calculated in the RGB working space (RGBWS) currently associated with this image.

If this image is in the grayscale color space, gray source samples are simply copied to the destination image, after conversion to the destination sample data type, if necessary, using pixel traits primitives.

If this image is in the CIE L*a*b* color space, samples from the lightness channel (source channel #0) are simply copied to the destination image, after conversion to the destination sample data type, if necessary.

For other color spaces, CIE L* values are obtained by means of the simplest possible intermediate transformation (usually to the CIE L*a*b* space), converted to the destination sample data type if necessary, and transferred to the destination image.

The lightness is computed for the specified subset of pixel samples, or for the current rectangular selection, depending on parameter values. For more information on the rest of parameters of this function, see the documentation for Fill(). The current channel range selection is always ignored by this function.

The previous contents of the destination image will be dereferenced (and immediately destroyed if they become unreferenced) and replaced with the computed, uniquely referenced CIE L* data. The destination image will be in the grayscale color space; it will have a single channel corresponding to the lightness of the specified pixel sample subset in this image. The dimensions of the destination image will be the same ones of the specified pixel sample subset, and it will be associated with the same RGBWS as this image.

Note
In general, computing lightness components as integer values is an error. The GenericPixelTraits instantiation P1 should correspond to a floating point real pixel sample type, either float or double, depending on the source data type. The recommended types are:

  • FloatPixelTraits for 8-bit and 16-bit integer images, as well as for 32-bit floating point real and complex images.
  • DoublePixelTraits for 32-bit integer images, as well as for 64-bit floating point real and complex images.
Increments the status monitoring object by the number of modified pixels (not samples).
Warning
Please note that the computed lightness is meaningful as such exclusively in the RGB working space of this image.

Definition at line 14550 of file Image.h.

◆ GetLightness() [2/2]

template<class P >
void pcl::GenericImage< P >::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, transported by an ImageVariant object.

If the specified ImageVariant 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).

Definition at line 7262 of file ImageVariant.h.

◆ GetLuminance() [1/2]

template<class P >
template<class P1 >
void pcl::GenericImage< P >::GetLuminance ( GenericImage< P1 > &  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 image, where the computed CIE Y component will be stored. This image can be an instance of any supported GenericImage template instantiation; all the necessary data type conversions are carried out transparently.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

This member function computes the Y component of the CIE XYZ space. CIE Y component values are calculated in the RGB working space (RGBWS) currently associated with the image.

If this image is in the grayscale color space, gray source samples are simply copied to the destination image, after conversion to the destination sample data type, if necessary, using pixel traits primitives.

If this image is in the CIE XYZ color space, samples from the luminance channel (source channel #1) are simply copied to the destination image, after conversion to the destination sample data type, if necessary.

For other color spaces, CIE Y values are obtained by means of the simplest possible intermediate transformation (usually to the CIE XYZ space), converted to the destination sample data type if necessary, and transferred to the destination image.

The luminance is computed for the specified subset of pixel samples, or for the current rectangular selection, depending on parameter values. For more information on the rest of parameters of this function, see the documentation for Fill(). The current channel range selection is always ignored by this function.

The previous contents of the destination image will be dereferenced (and immediately destroyed if they become unreferenced) and replaced with the computed, uniquely referenced CIE Y data. The destination image will be in the grayscale color space; it will have a single channel corresponding to the luminance of the specified pixel sample subset in this image. The dimensions of the destination image will be the same ones of the specified pixel sample subset, and it will be associated with the same RGBWS as this image.

Note
In general, computing luminance components as integer values is an error. The GenericPixelTraits instantiation P1 should correspond to a floating point real pixel sample type, either float or double, depending on the source data type. The recommended types are:

  • FloatPixelTraits for 8-bit and 16-bit integer images, as well as for 32-bit floating point real and complex images.
  • DoublePixelTraits for 32-bit integer images, as well as for 64-bit floating point real and complex images.
Increments the status monitoring object by the number of selected pixel samples.
Warning
Please note that the computed lightness is meaningful as such exclusively in the RGB working space of this image.

Definition at line 14418 of file Image.h.

◆ GetLuminance() [2/2]

template<class P >
void pcl::GenericImage< P >::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, transported by an ImageVariant object.

If the specified ImageVariant 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).

Definition at line 7256 of file ImageVariant.h.

◆ GetRow()

template<class P >
template<typename T >
void pcl::GenericImage< P >::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.

Parameters
[out]bufferStarting address of a contiguous block where samples from the source row will be converted and copied. The length of this block must be at least equal to 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. If this parameter is negative, the currently selected channel will be used. The default value is -1.

If this image is empty, if the specified vertical coordinate is out of range, or if a nonexistent channel is specified, this member function does nothing.

Definition at line 7448 of file Image.h.

◆ Hash()

template<class P >
uint64 pcl::GenericImage< P >::Hash ( int  channel = -1,
uint64  seed = 0 
) const
inlinenoexcept

Returns a non-cryptographic hash value computed for the specified channel of this image. This function is a synonym for Hash64().

Definition at line 13489 of file Image.h.

References pcl::Hash64().

◆ Hash32()

template<class P >
uint32 pcl::GenericImage< P >::Hash32 ( int  channel = -1,
uint32  seed = 0 
) const
inlinenoexcept

Returns a 32-bit non-cryptographic hash value computed for the specified channel of this image.

This function calls pcl::Hash32() for the internal pixel sample buffer.

The seed parameter can be used to generate repeatable hash values. It can also be set to a random value in compromised environments.

For information on the rest of parameters of this member function, see the documentation for Fill().

Definition at line 13478 of file Image.h.

References pcl::Hash32().

◆ Hash64()

template<class P >
uint64 pcl::GenericImage< P >::Hash64 ( int  channel = -1,
uint64  seed = 0 
) const
inlinenoexcept

Returns a 64-bit non-cryptographic hash value computed for the specified channel of this image.

This function calls pcl::Hash64() for the internal pixel sample buffer.

The seed parameter can be used to generate repeatable hash values. It can also be set to a random value in compromised environments.

For information on the rest of parameters of this member function, see the documentation for Fill().

Definition at line 13459 of file Image.h.

References pcl::Hash64().

◆ ImageSize()

template<class P >
size_type pcl::GenericImage< P >::ImageSize ( ) const
inlinenoexcept

Returns the size in bytes of all memory blocks required to store the pixel data in this image, including nominal and alpha channels. This is equal to the area in square pixels multiplied by the number of channels, multiplied by BytesPerSample().

Definition at line 6682 of file Image.h.

◆ ImportData()

template<class P >
GenericImage& pcl::GenericImage< P >::ImportData ( sample **  data,
int  width,
int  height,
int  numberOfChannels = 1,
color_space  colorSpace = ColorSpace::Gray 
)
inline

Forces this image to acquire the specified pixel data. Returns a reference to this image.

Parameters
dataStarting address of the acquired pixel data. Must be either a null pointer, or a pointer to an array of contiguous blocks of pixel samples.
widthWidth in pixels of the acquired pixel data.
heightHeight in pixels of the acquired pixel data.
numberOfChannelsNumber of channels in the acquired data. Must be greater than or equal to the number of nominal channels corresponding to the specified color space: one for grayscale images; three for color images. If this parameter is not specified, a single grayscale channel is assumed.
colorSpaceColor space of the acquired data. See the ColorSpace namespace for symbolic constants. If this parameter is not specified, the grayscale space is assumed for the acquired data.

If this object uniquely references its pixel data, then the previously existing pixel data are destroyed, deallocated, and replaced with the specified local or shared data, preserving the storage space of this instance.

If this object is a non-unique local image, then the previously referenced pixel data are dereferenced, and a newly created local image is uniquely referenced by this object and forced to own the specified local data.

If this object is a non-unique shared image, then this member function throws an Error exception with the appropriate error message: An aliased shared image cannot be forced to store externally allocated pixel data.

When successful, this function resets all image selections to the default full selection.

Warning
When calling this member function for a shared image, always make sure that the passed data array and the pointed data blocks have been allocated as shared memory. If you pass a locally-allocated array or block to this function (e.g., a new'ed block), you may cause severe heap corruption in the PixInsight core application. Similarly, if the image is local, only locally-allocated arrays and blocks must be used. In other words: shared and local pixel data and images cannot be mixed.
Never use the new and delete operators with pixel data memory blocks. Always call the Allocator() member function of GenericImage to get a reference to its PixelAllocator object, then use its public member functions for all allocations and deallocations of pixel data.

Definition at line 6597 of file Image.h.

◆ Invert() [1/2]

template<class P >
GenericImage& pcl::GenericImage< P >::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 convenience shortcut for:

Invert( P::MaxSampleValue(), rect, firstChannel, lastChannel );
GenericImage & Invert(T scalar, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
Definition: Image.h:8089

For information on the parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 8161 of file Image.h.

◆ Invert() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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.

The inverse of a pixel sample v with respect to a scalar r is equal to r - v. Normally (but not necessarily) the reference scalar used is the maximum sample value in the native range of the image.

For information on the rest of parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 8089 of file Image.h.

Referenced by pcl::GenericImage< P >::operator~().

◆ Inverted() [1/2]

template<class P >
GenericImage pcl::GenericImage< P >::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.

For information on the parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 8177 of file Image.h.

◆ Inverted() [2/2]

template<class P >
template<typename T >
GenericImage pcl::GenericImage< P >::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.

For information on the rest of parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 8137 of file Image.h.

◆ IsComplexSample()

template<class P >
static bool pcl::GenericImage< P >::IsComplexSample ( )
inlinestaticnoexcept

Returns true iff this GenericImage template instantiation uses complex pixel samples; returns false if it uses real samples.

Definition at line 6006 of file Image.h.

◆ IsFloatSample()

template<class P >
static bool pcl::GenericImage< P >::IsFloatSample ( )
inlinestaticnoexcept

Returns true iff this GenericImage template instantiation uses floating point pixel samples; returns false if it uses integer samples.

Definition at line 5997 of file Image.h.

◆ IsShared()

template<class P >
bool pcl::GenericImage< P >::IsShared ( ) const
inlinenoexcept

Returns true iff this object is a shared image. Returns false if this is a local image.

Shared images are alias objects referencing actual images living within the PixInsight core application. Shared images allocate pixel data in the core application's heap, which we call shared memory.

Local images exist within the user module's local heap, including all of their pixel data.

PCL implements an abstraction mechanism that allows you to handle local and shared images transparently. Except in very few and special cases, you don't have to know whether you're working with a shared or a local image; your code will be exactly the same under both situations.

Definition at line 6333 of file Image.h.

Referenced by pcl::GenericImage< P >::GenericImage(), and pcl::GenericImage< P >::ReleaseAlphaChannel().

◆ IsUnique()

template<class P >
bool pcl::GenericImage< P >::IsUnique ( ) const
inlinenoexcept

Returns true iff this object uniquely references its pixel data. Returns false if this object is sharing its pixel data with other GenericImage instances.

Note
Don't confuse uniqueness of reference with local or shared storage of images. A GenericImage can share its data with other instances living in the local heap of the calling module, irrespective of whether the pixel data is local or shared.

Definition at line 6348 of file Image.h.

◆ LineSize()

template<class P >
size_type pcl::GenericImage< P >::LineSize ( ) const
inlinenoexcept

Returns the size in bytes of a row of pixels in this image (also known as a scan line).

Definition at line 6662 of file Image.h.

◆ LocateExtremeSampleValues() [1/2]

template<class P >
template<typename T >
void pcl::GenericImage< P >::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.

Parameters
[out]xminHorizontal coordinate of the first occurrence of the minimum pixel sample value.
[out]yminVertical coordinate of the first occurrence of the minimum pixel sample value.
[out]minMinimum pixel sample value in the selected subset.
[out]xmaxHorizontal coordinate of the first occurrence of the maximum pixel sample value.
[out]ymaxVertical coordinate of the first occurrence of the maximum pixel sample value.
[out]maxMaximum pixel sample value in the selected subset.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account to search for the extreme sample values.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 11355 of file Image.h.

◆ LocateExtremeSampleValues() [2/2]

template<class P >
template<typename T >
void pcl::GenericImage< P >::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.

Parameters
[out]pminCoordinates of the first occurrence of the minimum pixel sample value.
[out]minMinimum pixel sample value in the selected subset.
[out]pmaxCoordinates of the first occurrence of the maximum pixel sample value.
[out]maxMaximum pixel sample value in the selected subset.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account to search for the extreme sample values.

Definition at line 11455 of file Image.h.

◆ LocateMaximumPixelValue() [1/2]

template<class P >
sample pcl::GenericImage< P >::LocateMaximumPixelValue ( int &  xmax,
int &  ymax,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline
Deprecated:
This member function has been deprecated. It is still part of PCL only to keep existing code alive. In newly produced code, use LocateMaximumSampleValue() instead.

Definition at line 11299 of file Image.h.

◆ LocateMaximumPixelValue() [2/2]

template<class P >
sample pcl::GenericImage< P >::LocateMaximumPixelValue ( Point pmax,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline
Deprecated:
This member function has been deprecated. It is still part of PCL only to keep existing code alive. In newly produced code, use LocateMaximumSampleValue() instead.

Definition at line 11311 of file Image.h.

◆ LocateMaximumSampleValue() [1/2]

template<class P >
sample pcl::GenericImage< P >::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.

Parameters
[out]xmaxHorizontal coordinate of the first occurrence of the returned maximum pixel sample value.
[out]ymaxVertical coordinate of the first occurrence of the returned maximum pixel sample value.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account to search for the maximum sample value.

For information on the rest of parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 11209 of file Image.h.

◆ LocateMaximumSampleValue() [2/2]

template<class P >
sample pcl::GenericImage< P >::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.

Parameters
[out]pmaxCoordinates of the first occurrence of the returned maximum pixel sample value.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the parameters of this member function, see the documentation for Fill().

This member function is equivalent to:

LocateMaximumSampleValue( pmax.x, pmax.y, rect, firstChannel, lastChannel );
sample LocateMaximumSampleValue(int &xmax, int &ymax, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
Definition: Image.h:11209

Definition at line 11287 of file Image.h.

◆ LocateMinimumPixelValue() [1/2]

template<class P >
sample pcl::GenericImage< P >::LocateMinimumPixelValue ( int &  xmin,
int &  ymin,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline
Deprecated:
This member function has been deprecated. It is still part of PCL only to keep existing code alive. In newly produced code, use LocateMinimumSampleValue() instead.

Definition at line 11164 of file Image.h.

◆ LocateMinimumPixelValue() [2/2]

template<class P >
sample pcl::GenericImage< P >::LocateMinimumPixelValue ( Point pmin,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline
Deprecated:
This member function has been deprecated. It is still part of PCL only to keep existing code alive. In newly produced code, use LocateMinimumSampleValue() instead.

Definition at line 11176 of file Image.h.

◆ LocateMinimumSampleValue() [1/2]

template<class P >
sample pcl::GenericImage< P >::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.

Parameters
[out]xminHorizontal coordinate of the first occurrence of the returned minimum pixel sample value.
[out]yminVertical coordinate of the first occurrence of the returned minimum pixel sample value.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account to search for the minimum sample value.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 11074 of file Image.h.

◆ LocateMinimumSampleValue() [2/2]

template<class P >
sample pcl::GenericImage< P >::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.

Parameters
[out]pminCoordinates of the first occurrence of the returned minimum pixel sample value.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the parameters of this member function, see the documentation for Fill().

This member function is equivalent to:

LocateMinimumSampleValue( pmin.x, pmin.y, rect, firstChannel, lastChannel );
sample LocateMinimumSampleValue(int &xmin, int &ymin, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1, int maxProcessors=0) const
Definition: Image.h:11074

Definition at line 11152 of file Image.h.

◆ MAD()

template<class P >
double pcl::GenericImage< P >::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.

Parameters
centerReference central value for computation of MAD in the normalized range [0,1]. Normally, this value should be the median of the selected pixel samples, or the median of the whole image.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

This member function returns MAD in the normalized range [0,1] with respect to center, irrespective of the sample data type of the image.

For complex-valued images, this function returns the MAD of the magnitudes (or absolute values) of all selected samples.

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account for calculation of the median absolute deviation.

Note
To make the MAD estimator consistent with the standard deviation of a normal distribution, it must be multiplied by the constant 1.4826.
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 12286 of file Image.h.

◆ Max() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Max ( const GenericImage< P1 > &  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 10551 of file Image.h.

◆ Max() [2/2]

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

A synonym for SetMaximum().

Definition at line 10127 of file Image.h.

◆ Maximum()

template<class P >
template<typename T >
GenericImage pcl::GenericImage< P >::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.

For information on the parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 10144 of file Image.h.

◆ MaximumPixelValue()

template<class P >
sample pcl::GenericImage< P >::MaximumPixelValue ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline
Deprecated:
This member function has been deprecated. It is still part of PCL only to keep existing code alive. In newly produced code, use MaximumSampleValue() instead.

Definition at line 10946 of file Image.h.

◆ MaximumSampleValue()

template<class P >
sample pcl::GenericImage< P >::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.

Parameters
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account to search for the maximum sample value.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 10897 of file Image.h.

◆ Mean()

template<class P >
double pcl::GenericImage< P >::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.

Parameters
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

This member function returns the mean in the normalized range [0,1], irrespective of the sample data type of the image.

For complex-valued images, this function returns the mean of the magnitudes (or absolute values) of all selected samples.

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account for calculation of the mean.

This function implements a numerically stable summation algorithm to reduce roundoff errors to the machine's floating point precision.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 11560 of file Image.h.

◆ MeanOfSquares()

template<class P >
double pcl::GenericImage< P >::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.

Parameters
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

This member function returns the mean of squares in the normalized range [0,1], irrespective of the sample data type of the image.

For complex-valued images, this function returns the mean of the squares of the magnitudes (or absolute values) of all selected samples.

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account for calculation of the mean of squares.

This function implements a numerically stable summation algorithm to reduce roundoff errors to the machine's floating point precision.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 13313 of file Image.h.

◆ Median()

template<class P >
double pcl::GenericImage< P >::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.

Parameters
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

This member function returns the median in the normalized range [0,1], irrespective of the sample data type of the image.

For complex-valued images, this function returns the median of the magnitudes (or absolute values) of all selected samples.

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account for calculation of the median.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 11633 of file Image.h.

◆ Min() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Min ( const GenericImage< P1 > &  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 10521 of file Image.h.

◆ Min() [2/2]

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

A synonym for SetMinimum().

Definition at line 10083 of file Image.h.

◆ Minimum()

template<class P >
template<typename T >
GenericImage pcl::GenericImage< P >::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.

For information on the parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 10100 of file Image.h.

◆ MinimumPixelValue()

template<class P >
sample pcl::GenericImage< P >::MinimumPixelValue ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline
Deprecated:
This member function has been deprecated. It is still part of PCL only to keep existing code alive. In newly produced code, use MinimumSampleValue() instead.

Definition at line 10872 of file Image.h.

◆ MinimumSampleValue()

template<class P >
sample pcl::GenericImage< P >::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.

Parameters
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account to search for the minimum sample value.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 10823 of file Image.h.

◆ Modulus()

template<class P >
double pcl::GenericImage< P >::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.

Parameters
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

The modulus is the sum of the absolute values of all selected pixel sample values. This member function returns the modulus in the normalized range [0,1], irrespective of the sample data type of the image.

This member function only makes sense for real-valued floating point images. For the rest of image types, including unsigned integer and complex valued images, this function is always equivalent to Norm().

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account for calculation of the modulus.

This function implements a numerically stable summation algorithm to reduce roundoff errors to the machine's floating point precision.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 13173 of file Image.h.

◆ Mov() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Mov ( const GenericImage< P1 > &  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 Move().

Definition at line 10277 of file Image.h.

◆ Mov() [2/2]

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

A synonym for Move().

Definition at line 9756 of file Image.h.

◆ Move() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Move ( const GenericImage< P1 > &  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 equivalent to:

Apply( image, ImageOp::Mov, point, channel, rect, firstChannel, lastChannel );

Definition at line 10266 of file Image.h.

◆ Move() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

Apply( scalar, ImageOp::Mov, rect, firstChannel, lastChannel );

Definition at line 9747 of file Image.h.

◆ Mul() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Mul ( const GenericImage< P1 > &  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 10371 of file Image.h.

◆ Mul() [2/2]

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

A synonym for Multiply().

Definition at line 9876 of file Image.h.

◆ Multiplied()

template<class P >
template<typename T >
GenericImage pcl::GenericImage< P >::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.

For information on the parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 9901 of file Image.h.

◆ Multiply() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Multiply ( const GenericImage< P1 > &  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 equivalent to:

Apply( image, ImageOp::Mul, point, channel, rect, firstChannel, lastChannel );

Definition at line 10360 of file Image.h.

◆ Multiply() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

Apply( scalar, ImageOp::Mul, rect, firstChannel, lastChannel );

Definition at line 9867 of file Image.h.

◆ Nand() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Nand ( const GenericImage< P1 > &  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 equivalent to:

Apply( image, ImageOp::Nand, point, channel, rect, firstChannel, lastChannel );

Definition at line 10646 of file Image.h.

◆ Nand() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

Apply( scalar, ImageOp::Nand, rect, firstChannel, lastChannel );

Definition at line 10231 of file Image.h.

◆ NominalSize()

template<class P >
size_type pcl::GenericImage< P >::NominalSize ( ) const
inlinenoexcept

Returns the size in bytes of all memory blocks required to store the pixel data in the nominal channels of this image (i.e., excluding alpha channels).

Definition at line 6692 of file Image.h.

References pcl::ColorSpace::NumberOfNominalChannels().

◆ Nor() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Nor ( const GenericImage< P1 > &  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 equivalent to:

Apply( image, ImageOp::Nor, point, channel, rect, firstChannel, lastChannel );

Definition at line 10627 of file Image.h.

◆ Nor() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

Apply( scalar, ImageOp::Nor, rect, firstChannel, lastChannel );

Definition at line 10214 of file Image.h.

◆ Norm()

template<class P >
double pcl::GenericImage< P >::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.

Parameters
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

The norm is the sum of all selected pixel sample values. This member function returns the norm in the normalized range [0,1], irrespective of the sample data type of the image.

For real-valued integer images, this function returns the sum of all selected samples converted to the normalized range [0,1].

For floating-point real images, this function simply sums all selected samples, assuming that no selected samples have negative values. If there are some negative values, the returned value may make not sense, depending on the application.

For complex-valued images, this function returns the sum of the magnitudes (or absolute values) of all selected samples.

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account for calculation of the norm.

This function implements a numerically stable summation algorithm to reduce roundoff errors to the machine's floating point precision.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 13101 of file Image.h.

◆ Normalize() [1/2]

template<class P >
GenericImage& pcl::GenericImage< P >::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 convenience shortcut for:

Normalize( P::MinSampleValue(), P::MaxSampleValue(), rect, firstChannel, lastChannel );
GenericImage & Normalize(T lowerBound, T upperBound, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
Definition: Image.h:8608

For information on the parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 8756 of file Image.h.

◆ Normalize() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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.

Parameters
lowerBoundLower bound of the normalizing range.
upperBoundUpper bound of the normalizing range.

The specified normalizing bounds are converted to the sample data type of this image, using pixel traits primitives.

For information on the rest of parameters of this member function, see the documentation for Fill().

Normalization is a conditional rescaling operation: Pixel sample values are rescaled to the specified normalizing range only if the existing extreme sample values exceed that range. Given the following two ranges:

  • m, M : The range of existing sample values in the selected set of pixel samples,
  • n0, n1 : The normalizing range,

the normalized value n for a given sample s is:

if m < n0 or M > n1
   n = n0 + (s - m)*(n1 - n0)/(M - m)
else
   n = s
endif
Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 8608 of file Image.h.

◆ Normalized() [1/2]

template<class P >
GenericImage pcl::GenericImage< P >::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.

For information on the parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 8771 of file Image.h.

◆ Normalized() [2/2]

template<class P >
template<typename T >
GenericImage pcl::GenericImage< P >::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.

Parameters
lowerBoundLower bound of the normalizing range.
upperBoundUpper bound of the normalizing range.

For information on the rest of parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 8732 of file Image.h.

◆ Norms()

template<class P >
Vector pcl::GenericImage< P >::Norms ( int  maxDegree = 2,
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.

Parameters
maxDegreeMaximum degree ≥ 1 of the computed vector of norms. The default value is 2, hence the L1 and L2 norms are computed if this parameter is not specified.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

This function computes a series of image norms, up to maxDegree, in a single multithreaded operation for improved efficiency. The norms are returned as a vector. The first vector component is the L1 norm, which is the sum of all selected pixel sample values. The second vector component is the L2 norm, or the sum of squared pixel sample values, and so on.

For the sake of performance, this function assumes that no negative values exist in the selected subset of pixel samples; otherwise, odd norms will provide meaningless results. All norms are returned expressed in the normalized range [0,1], irrespective of the sample data type of the image.

This function implements a numerically stable summation algorithm to reduce roundoff errors to the machine's floating point precision.

See the Norm() and SumOfSquares() member functions for more information and important implementation details.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 13398 of file Image.h.

◆ Not()

template<class P >
GenericImage& pcl::GenericImage< P >::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.

For information on the parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 8209 of file Image.h.

◆ One()

template<class P >
GenericImage& pcl::GenericImage< P >::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 floating point scalar one (1.0) to the sample data type of the image. Returns a reference to this image.

This member function is a convenience shortcut for:

Fill( P::ToSample( 1.0 ), rect, firstChannel, lastChannel );
Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 8031 of file Image.h.

◆ operator bool()

template<class P >
pcl::GenericImage< P >::operator bool ( ) const
inlinenoexcept

Returns true only is this is a valid, nonempty image.

Definition at line 6743 of file Image.h.

◆ operator()() [1/4]

template<class P >
sample& pcl::GenericImage< P >::operator() ( const Point p,
int  channel = 0 
)
inline

Returns a reference to a pixel sample in this image, given by its pixel position and channel index.

Parameters
pPosition of the desired pixel in image coordinates. The specified point must be included in the image bounds rectangle, that is, its coordinates must refer to an existing pixel in 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.

If this image is aliased, it is made unique before returning from this member function. This involves making a local duplicate of the previously referenced pixel data.

Definition at line 6987 of file Image.h.

◆ operator()() [2/4]

template<class P >
sample pcl::GenericImage< P >::operator() ( const Point p,
int  channel = 0 
) const
inlinenoexcept

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

Parameters
pPosition of the desired pixel in image coordinates. The specified point must be included in the image bounds rectangle, that is, its coordinates must refer to an existing pixel in 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.

Definition at line 7005 of file Image.h.

◆ operator()() [3/4]

template<class P >
sample& pcl::GenericImage< P >::operator() ( int  x,
int  y,
int  channel = 0 
)
inline

Returns a reference to a pixel sample in this image, 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.

If this image is aliased, it is made unique before returning from this member function. This involves making a local duplicate of the previously referenced pixel data.

Definition at line 6944 of file Image.h.

◆ operator()() [4/4]

template<class P >
sample pcl::GenericImage< P >::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.

Definition at line 6965 of file Image.h.

◆ operator*() [1/2]

template<class P >
sample* pcl::GenericImage< P >::operator* ( )
inline

Returns a pointer to the first pixel sample in the first channel of this image.

For grayscale images, this function can be more readable and elegant than operator []( int ).

Definition at line 6783 of file Image.h.

◆ operator*() [2/2]

template<class P >
const sample* pcl::GenericImage< P >::operator* ( ) const
inlinenoexcept

Returns a pointer to the constant first pixel sample in the first channel of this image.

This operator function is the immutable counterpart of operator *().

Definition at line 6795 of file Image.h.

◆ operator*=() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::operator*= ( const GenericImage< P1 > &  image)
inline

A synonym for Multiply().

Definition at line 10382 of file Image.h.

◆ operator*=() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::operator*= ( scalar)
inline

A synonym for Multiply().

Definition at line 9885 of file Image.h.

◆ operator+=() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::operator+= ( const GenericImage< P1 > &  image)
inline

A synonym for Add().

Definition at line 10306 of file Image.h.

◆ operator+=() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::operator+= ( scalar)
inline

A synonym for Add().

Definition at line 9781 of file Image.h.

◆ operator-=() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::operator-= ( const GenericImage< P1 > &  image)
inline

A synonym for Subtract().

Definition at line 10344 of file Image.h.

◆ operator-=() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::operator-= ( scalar)
inline

A synonym for Subtract().

Definition at line 9833 of file Image.h.

◆ operator/=() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::operator/= ( const GenericImage< P1 > &  image)
inline

A synonym for Divide().

Definition at line 10424 of file Image.h.

◆ operator/=() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::operator/= ( scalar)
inline

A synonym for Divide().

Definition at line 9940 of file Image.h.

◆ operator=() [1/4]

template<class P >
GenericImage& pcl::GenericImage< P >::operator= ( const GenericImage< P > &  image)
inline

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

This operator is a synonym for Assign(), where both this object and the source image are instances of the same template instantiation of GenericImage. The declaration of this operator is necessary for optimization purposes. It also provides a pure copy assignment operator for the GenericImage template class.

Definition at line 7273 of file Image.h.

◆ operator=() [2/4]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::operator= ( const GenericImage< P1 > &  image)
inline

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

This operator is a convenience synonym for Assign().

Definition at line 7258 of file Image.h.

◆ operator=() [3/4]

template<class P >
GenericImage& pcl::GenericImage< P >::operator= ( GenericImage< P > &&  image)
inline

Move assignment operator. Returns a reference to this image.

This operator is equivalent to Transfer( GenericImage& ).

Definition at line 7327 of file Image.h.

◆ operator=() [4/4]

template<class P >
GenericImage& pcl::GenericImage< P >::operator= ( sample  scalar)
inline

Fills the current selection (selection rectangle and channel range) with a scalar. Returns a reference to this image.

This operator is a convenience synonym for Fill().

Definition at line 7338 of file Image.h.

◆ operator[]() [1/2]

template<class P >
sample* pcl::GenericImage< P >::operator[] ( int  channel)
inline

Returns a pointer to the first pixel sample in the specified channel.

Parameters
channelChannel index, 0 ≤ channel < n, where n is the number of channels in this image, including nominal and alpha channels.

This operator is a convenience synonym for the PixelData( int ) member function.

Definition at line 6758 of file Image.h.

◆ operator[]() [2/2]

template<class P >
const sample* pcl::GenericImage< P >::operator[] ( int  channel) const
inlinenoexcept

Returns a pointer to the constant first pixel sample in the specified channel.

This operator function is the immutable counterpart of operator []( int ).

Definition at line 6770 of file Image.h.

◆ operator^=() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::operator^= ( const GenericImage< P1 > &  image)
inline

A synonym for Raise().

Definition at line 10463 of file Image.h.

◆ operator^=() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::operator^= ( scalar)
inline

A synonym for Raise().

Definition at line 9995 of file Image.h.

◆ operator~()

template<class P >
GenericImage pcl::GenericImage< P >::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.

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 8192 of file Image.h.

References pcl::GenericImage< P >::Invert().

◆ Or() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Or ( const GenericImage< P1 > &  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 equivalent to:

Apply( image, ImageOp::Or, point, channel, rect, firstChannel, lastChannel );

Definition at line 10570 of file Image.h.

◆ Or() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

Apply( scalar, ImageOp::Or, rect, firstChannel, lastChannel );

Definition at line 10163 of file Image.h.

◆ OrderStatistic()

template<class P >
double pcl::GenericImage< P >::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.

Parameters
kSelection point in the [0,1] range, where 0 corresponds to the minimum value in the ordered subset of selected pixel samples and 1 corresponds to the maximum value. If the value of this parameter is outside the [0,1] range, this function returns zero conventionally.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

This function returns the requested order statistic in the normalized range [0,1], irrespective of the sample data type of the image.

For complex-valued images, this function returns the requested order statistic for the set of magnitudes (or absolute values) of all selected samples.

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 11821 of file Image.h.

◆ Pixel() [1/4]

template<class P >
sample& pcl::GenericImage< P >::Pixel ( const Point p,
int  channel = 0 
)
inline

Returns a reference to a pixel sample in this image, given by its pixel position and channel index.

Deprecated:
This member function has been deprecated. Use GenericImage::operator()( const Point&, int ) in newly produced code.

Definition at line 7041 of file Image.h.

◆ Pixel() [2/4]

template<class P >
sample pcl::GenericImage< P >::Pixel ( const Point p,
int  channel = 0 
) const
inlinenoexcept

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

Deprecated:
This member function has been deprecated. Use GenericImage::operator()( const Point&, int ) const in newly produced code.

Definition at line 7054 of file Image.h.

◆ Pixel() [3/4]

template<class P >
sample& pcl::GenericImage< P >::Pixel ( int  x,
int  y,
int  channel = 0 
)
inline

Returns a reference to a pixel sample in this image, given by its pixel coordinates and channel index.

Deprecated:
This member function has been deprecated. Use GenericImage::operator()( int, int, int ) in newly produced code.

Definition at line 7017 of file Image.h.

◆ Pixel() [4/4]

template<class P >
sample pcl::GenericImage< P >::Pixel ( int  x,
int  y,
int  channel = 0 
) const
inlinenoexcept

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

Deprecated:
This member function has been deprecated. Use GenericImage::operator()( int, int, int ) const in newly produced code.

Definition at line 7029 of file Image.h.

◆ PixelAddress() [1/4]

template<class P >
sample* pcl::GenericImage< P >::PixelAddress ( const Point p,
int  channel = 0 
)
inline

Returns the address of a pixel sample in this image, given by its pixel position and channel index.

Parameters
pPosition of the desired pixel in image coordinates. The specified point must be included in the image bounds rectangle, that is, its coordinates must refer to an existing pixel in 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.

The returned value is a pointer to the sample at coordinates (p.x,p.y) in the specified channel.

If this image is aliased, it is made unique before returning from this member function. This involves making a local duplicate of the previously referenced pixel data.

Definition at line 6907 of file Image.h.

References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ PixelAddress() [2/4]

template<class P >
const sample* pcl::GenericImage< P >::PixelAddress ( const Point p,
int  channel = 0 
) const
inlinenoexcept

Returns the address of a constant pixel sample in this image, given by its pixel position and channel index.

This member function is the immutable counterpart of PixelAddress( const Point&, int ).

Definition at line 6919 of file Image.h.

References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ PixelAddress() [3/4]

template<class P >
sample* pcl::GenericImage< P >::PixelAddress ( int  x,
int  y,
int  channel = 0 
)
inline

Returns the address of a pixel sample in this image, 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.

The returned value is a pointer to the sample at coordinates (x,y) in the specified channel.

If this image is aliased, it is made unique before returning from this member function. This involves making a local duplicate of the previously referenced pixel data.

Definition at line 6864 of file Image.h.

◆ PixelAddress() [4/4]

template<class P >
const sample* pcl::GenericImage< P >::PixelAddress ( int  x,
int  y,
int  channel = 0 
) const
inlinenoexcept

Returns the address of a constant pixel sample in this image, given by its pixel coordinates and channel index.

This member function is the immutable counterpart of PixelAddress( int, int, int ).

Definition at line 6879 of file Image.h.

◆ PixelData() [1/2]

template<class P >
sample* pcl::GenericImage< P >::PixelData ( int  channel = 0)
inline

Returns a pointer to the first pixel sample in the specified channel.

Parameters
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.

The returned value is the address of the pixel at coordinates x=y=0 in the specified channel.

If this image is aliased, it is made unique before returning from this member function. This involves making a local duplicate of the previously referenced pixel data.

Definition at line 6721 of file Image.h.

◆ PixelData() [2/2]

template<class P >
const sample* pcl::GenericImage< P >::PixelData ( int  channel = 0) const
inlinenoexcept

Returns a pointer to the constant first pixel sample in the specified channel.

This member function is the immutable counterpart of PixelData( int ).

Definition at line 6734 of file Image.h.

◆ Pow() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Pow ( const GenericImage< P1 > &  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 10452 of file Image.h.

◆ Pow() [2/2]

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

A synonym for Raise().

Definition at line 9986 of file Image.h.

◆ Qn()

template<class P >
double pcl::GenericImage< P >::Qn ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

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

Parameters
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

For a sample {x0,...,x_n-1}, the Qn estimator is given by:

Qn = c * first_quartile( |x_i - x_j| : i < j )

where first_quartile() is the order statistic of rank (n + 1)/4.

This member function returns Qn in the normalized range [0,1], irrespective of the sample data type of the image.

For complex-valued images, this function returns the Qn estimator of the magnitudes (or absolute values) of all selected samples.

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account for calculation of the Qn estimator.

The constant c = 2.2219 must be used to make the Qn estimator converge to the standard deviation of a pure normal distribution. However, this implementation does not apply it (it uses c=1 implicitly), for consistency with other implementations of scale estimators.

References

P.J. Rousseeuw and C. Croux (1993), Alternatives to the Median Absolute Deviation, Journal of the American Statistical Association, Vol. 88, pp. 1273-1283.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 13023 of file Image.h.

◆ Raise() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Raise ( const GenericImage< P1 > &  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 equivalent to:

Apply( image, ImageOp::Pow, point, channel, rect, firstChannel, lastChannel );

Definition at line 10441 of file Image.h.

◆ Raise() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

Apply( scalar, ImageOp::Pow, rect, firstChannel, lastChannel );

Definition at line 9977 of file Image.h.

◆ Raised()

template<class P >
template<typename T >
GenericImage pcl::GenericImage< P >::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.

For information on the parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 10011 of file Image.h.

◆ Read() [1/2]

template<class P >
GenericImage& pcl::GenericImage< P >::Read ( const String filePath)
inline

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

Parameters
filePathPath to an existing file from which new pixel data will be read. The contents of the existing file will not be modified in any way.

This member function is just a wrapper to the more general version: Read( File& ).

Definition at line 13636 of file Image.h.

◆ Read() [2/2]

template<class P >
GenericImage& pcl::GenericImage< P >::Read ( File file)
inline

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

Parameters
fileInput stream to read from.

If this object uniquely references its pixel data, then the previously existing pixel data are destroyed, deallocated, and replaced with a newly allocated local or shared image, preserving the storage space of this instance.

The input stream must provide pixel sample values in the sample data type of this image. The sample data type of an image is invariantly defined by its template instantiation, and thus cannot be changed. If the image stored in the input stream uses a different sample data type than this image, this function will lead to unpredictable results, most likely an exception being thrown by the stream I/O routines.

If this object is not unique, then the previously referenced pixel data are dereferenced, and a newly created local image is uniquely referenced by this object.

All image selections are reset to the default full selection after calling this function.

The data read from the specified file should have been generated by a previous call to Write().

Note
Increments the status monitoring object by the number of pixel samples read from the specified file.
This function, together with the Write() function, implements a lightweight image reading/writing system with limited error detection and handling capabilities. For more powerful and sophisticated ways to serialize image data, see the ImageVariant class.

Definition at line 13601 of file Image.h.

References pcl::File::ReadUI32().

◆ ReleaseAlphaChannel()

template<class P >
GenericImage& pcl::GenericImage< P >::ReleaseAlphaChannel ( GenericImage< P > &  image,
int  channel 
)
inline

Releases an alpha channel into another image. Returns a reference to this image.

Parameters
imageImage that will receive the data from the released alpha channel. Its previous contents will be dereferenced and eventually destroyed.
channelZero-based index of the alpha channel to be released, 0 ≤ channel < n, where n is the number of existing alpha channels before calling this function.
Note
The specified channel index is an alpha channel index, not a normal channel index comprising nominal channels. That is, the first alpha channel is indexed as zero by this function.
Warning
If this image is a shared instance, then the specified target image must also be a reference to a shared image. Correspondingly, if this is a local image, the target image must also be local. Pixel data blocks cannot be transferred between local and shared images. If this rule is violated, this member function will throw an Error exception.

Definition at line 7679 of file Image.h.

References pcl::GenericImage< P >::IsShared().

◆ ReleaseData()

template<class P >
sample** pcl::GenericImage< P >::ReleaseData ( )
inline

Releases ownership of the pixel data allocated by this image.

Returns an array of pointers to the channel data blocks that were owned by the image before calling this function. The returned array is a sequence of pointers p0, p1, ..., pn-1, where each pi is the starting address of a contiguous block containing the sample data of an image channel, and n is the number of channels in the image, including all nominal and alpha channels.

After calling this function the image will be empty, but the returned data will not be deallocated; the caller will be responsible for deallocating it when it is no longer needed.

If this member function is called for an aliased image, it throws an Error exception with the appropriate error message: Pixel data cannot be released if two or more GenericImage instances are referencing them. The reason for this limitation is that if the data of a non-unique image were released, either all instances sharing the same data would be affected, which violates the implicit data sharing paradigm, or the newly allocated data of a unique clone would be released, which makes no sense.

Warning
When calling ReleaseData() for a shared image, always be aware that the returned sample** value points to a shared memory block. If you handle such a block as if it was a block within your local heap (e.g., if you call the delete operator to deallocate it), you may cause severe heap corruption.
Never use the new and delete operators with pixel data memory blocks. Always call the Allocator() member function of GenericImage to get a reference to its PixelAllocator object, then use its public member functions for all allocations and deallocations of pixel data.

Definition at line 6647 of file Image.h.

◆ Rescale() [1/2]

template<class P >
GenericImage& pcl::GenericImage< P >::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 convenience shortcut for:

Rescale( P::MinSampleValue(), P::MaxSampleValue(), rect, firstChannel, lastChannel );
GenericImage & Rescale(T lowerBound, T upperBound, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
Definition: Image.h:8404

For information on the parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 8551 of file Image.h.

◆ Rescale() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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.

Parameters
lowerBoundLower bound of the rescaling range.
upperBoundUpper bound of the rescaling range.

The specified rescaling bounds are converted to the sample data type of this image, using pixel traits primitives.

For information on the rest of parameters of this member function, see the documentation for Fill().

The rescaling operation is as follows. Given the following two ranges:

  • m, M : The range of existing sample values in the selected set of pixel samples,
  • r0, r1 : The rescaling range,

the rescaled value r for a given sample s is:

r = r0 + (s - m)*(r1 - r0)/(M - m)
Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 8404 of file Image.h.

◆ Rescaled() [1/2]

template<class P >
GenericImage pcl::GenericImage< P >::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.

For information on the parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 8566 of file Image.h.

◆ Rescaled() [2/2]

template<class P >
template<typename T >
GenericImage pcl::GenericImage< P >::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.

Parameters
lowerBoundLower bound of the rescaling range.
upperBoundUpper bound of the rescaling range.

For information on the rest of parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 8527 of file Image.h.

◆ RowVector()

template<class P >
sample_vector pcl::GenericImage< P >::RowVector ( int  y,
int  channel = -1 
) const
inline

Generates a vector of pixel samples from a row of this image.

Parameters
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. If this parameter is negative, the currently selected channel will be used. The default value is -1.

The number of components in the returned vector will be equal to the width in pixels of this image.

If this image is empty, if the specified vertical coordinate is out of range, or if a nonexistent channel is specified, this member function returns an empty vector.

Definition at line 7374 of file Image.h.

◆ SameSampleType() [1/2]

template<class P >
bool pcl::GenericImage< P >::SameSampleType ( const GenericImage< P > &  image) const
inlinenoexcept

Always returns true, indicating that this object and the specified image, both of the same template instantiation, use the same pixel sample type.

Definition at line 6049 of file Image.h.

◆ SameSampleType() [2/2]

template<class P >
template<class P1 >
bool pcl::GenericImage< P >::SameSampleType ( const GenericImage< P1 > &  image) const
inlinenoexcept

Returns true iff this object and another image use the same pixel sample type:

  • Same sample size in bits.
  • Both images using integer, floating point real, or complex samples.

Definition at line 6037 of file Image.h.

◆ ScanLine() [1/2]

template<class P >
sample* pcl::GenericImage< P >::ScanLine ( int  y,
int  channel = 0 
)
inline

Returns the starting address of a scan line (i.e., a row of pixels) in this image.

Parameters
yVertical coordinate (or row index) of the desired scan line, such that 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.

The returned value is a pointer to the sample at coordinates (x=0,y) in the specified channel.

If this image is aliased, it is made unique before returning from this member function. This involves making a local duplicate of the previously referenced pixel data.

Definition at line 6820 of file Image.h.

◆ ScanLine() [2/2]

template<class P >
const sample* pcl::GenericImage< P >::ScanLine ( int  y,
int  channel = 0 
) const
inlinenoexcept

Returns the starting address of a constant scan line (i.e., a row of pixels) in this image.

This member function is the immutable counterpart of ScanLine( int, int ).

Definition at line 6834 of file Image.h.

◆ SetAbsoluteDifference() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::SetAbsoluteDifference ( const GenericImage< P1 > &  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 equivalent to:

Apply( image, ImageOp::Dif, point, channel, rect, firstChannel, lastChannel );

Definition at line 10480 of file Image.h.

◆ SetAbsoluteDifference() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

Apply( scalar, ImageOp::Dif, rect, firstChannel, lastChannel );

Definition at line 10030 of file Image.h.

◆ SetAbsoluteValue()

template<class P >
GenericImage& pcl::GenericImage< P >::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.

For information on the parameters of this member function, see the documentation for Fill().

Note
Note that this member function is a no-op for unsigned integer images (e.g., UInt8Image, UInt16Image and UInt32Image).
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 8918 of file Image.h.

◆ SetColorSpace()

template<class P >
GenericImage& pcl::GenericImage< P >::SetColorSpace ( color_space  colorSpace,
int  maxProcessors = 0 
)
inline

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

Parameters
colorSpaceSpecifies a color space to convert the image to. See the ColorSpace namespace for symbolic constants corresponding to all supported color spaces in this version of PCL.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

Color space conversion is performed in the current RGB working space (RGBWS) associated with this image.

This function operates on the entire image; current selections are neither used nor modified (except the channel range selection, which is reset to defaults when the color space conversion involves a change in the number of nominal channels). Existing alpha channels are never modified by this member function.

Before performing the requested color space conversion, this function ensures that the image data is uniquely referenced by this object. If necessary, the previously referenced data are dereferenced (and destroyed immediately if they become unreferenced), and a new local image is allocated and referenced.

Note
Increments the status monitoring object by the number of pixels (not samples) in the image.

Definition at line 14210 of file Image.h.

◆ SetColumn()

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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.

Parameters
bufferStarting address of a contiguous block with source values that will be converted and copied to the target column in this image. The length of this block must be at least equal to the height in pixels of this image.
xHorizontal coordinate (or column index) of the desired column, 0 ≤ x < w, where w is the width in pixels of this image.
channelChannel index. If this parameter is negative, the currently selected channel will be used. The default value is -1.

If this image is empty, if the specified horizontal coordinate is out of range, or if a nonexistent channel is specified, this member function does nothing.

Definition at line 7546 of file Image.h.

◆ SetLightness() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::SetLightness ( const GenericImage< P1 > &  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.

Parameters
LReference to a source image, from which the CIE L* components will be obtained. This image can be in any supported color space, and can be an instance of any supported template instantiation of GenericImage; all the necessary color space and data type conversions are carried out transparently.
pointTarget point in image coordinates. This is the upper left corner of the target rectangular region in this image where CIE L* components will be replaced with source values. If one or both point coordinates are equal to int_max (the maximum possible value of type int), then the current anchor point selection will be used. The default value is Point( int_max ).
rectSource rectangular region. If this parameter defines an empty rectangle, the current rectangular selection in the source image will be used. If the specified rectangle is not empty and extends beyond source image boundaries, only the intersection with the source image will be used. If that intersection does not exist, then this member function has no effect. The default value is an empty rectangle.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

This member function computes and replaces the L* component of the CIE L*a*b* color space. Source CIE L* component values are calculated in the RGB working space (RGBWS) associated with the source image L. Replacement of CIE L* components in this (target) image is performed by transformations in the RGBWS associated with this image. This ensures that only pure illumination data is transferred between both images, without any chrominance contamination.

If the source image is in the grayscale, CIE L*a*b* or CIE L*c*h* color spaces, samples from its first channel are directly taken as source values, requiring no additional conversion.

Once a source CIE L* value is available, either by direct extraction or through the simplest possible intermediate transformation (usually to the CIE L*a*b* or CIE XYZ spaces), it is inserted in the corresponding destination pixel by means of a series of transformations in the target RGBWS, whose number and complexity depend on the destination color space. Additional sample data type conversions may take place using pixel traits primitives, if the source and destination data types differ. Roundoff errors are minimized during the whole process.

Note
Increments the status monitoring object by the number of modified pixels (not samples).

Definition at line 14940 of file Image.h.

◆ SetLightness() [2/2]

template<class P >
GenericImage< P > & pcl::GenericImage< P >::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, transported by an ImageVariant object.

If the specified ImageVariant 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).

Definition at line 7281 of file ImageVariant.h.

◆ SetLuminance() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::SetLuminance ( const GenericImage< P1 > &  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.

Parameters
YReference to a source image, from which the CIE Y components will be obtained. This image can be in any supported color space, and can be an instance of any supported template instantiation of GenericImage; all the necessary color space and data type conversions are carried out transparently.
pointTarget point in image coordinates. This is the upper left corner of the target rectangular region in this image where CIE Y components will be replaced with source values. If one or both point coordinates are equal to int_max (the maximum possible value of type int), then the current anchor point selection will be used. The default value is Point( int_max ).
rectSource rectangular region. If this parameter defines an empty rectangle, the current rectangular selection in the source image will be used. If the specified rectangle is not empty and extends beyond source image boundaries, only the intersection with the source image will be used. If that intersection does not exist, then this member function has no effect. The default value is an empty rectangle.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

This member function computes and replaces the Y component of the CIE XYZ color space. Source CIE Y component values are calculated in the RGB working space (RGBWS) associated with the source image Y. Replacement of CIE Y components in this (target) image is performed by transformations in the RGBWS associated with this image. This ensures that only pure illumination data is transferred between both images, without any chrominance contamination.

If the source image is in the grayscale or CIE XYZ color spaces, samples from its first or second channel, respectively, are directly taken as source values, requiring no additional conversion.

Once a source CIE Y value is available, either by direct extraction or through the simplest possible intermediate transformation (usually to the CIE L*a*b* or CIE XYZ spaces), it is inserted in the corresponding destination pixel by means of a series of transformations in the target RGBWS, whose number and complexity depend on the destination color space. Additional sample data type conversions may take place using pixel traits primitives, if the source and destination data types differ. Roundoff errors are minimized during the whole process.

Note
Increments the status monitoring object by the number of modified pixels (not samples).

Definition at line 14799 of file Image.h.

◆ SetLuminance() [2/2]

template<class P >
GenericImage< P > & pcl::GenericImage< P >::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, transported by an ImageVariant object.

If the specified ImageVariant 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).

Definition at line 7274 of file ImageVariant.h.

◆ SetMaximum() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::SetMaximum ( const GenericImage< P1 > &  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 equivalent to:

Apply( image, ImageOp::Min, point, channel, rect, firstChannel, lastChannel );

Definition at line 10540 of file Image.h.

◆ SetMaximum() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

Apply( scalar, ImageOp::Max, rect, firstChannel, lastChannel );

Definition at line 10118 of file Image.h.

◆ SetMinimum() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::SetMinimum ( const GenericImage< P1 > &  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 equivalent to:

Apply( image, ImageOp::Min, point, channel, rect, firstChannel, lastChannel );

Definition at line 10510 of file Image.h.

◆ SetMinimum() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

Apply( scalar, ImageOp::Min, rect, firstChannel, lastChannel );

Definition at line 10074 of file Image.h.

◆ SetRGBWorkingSpace()

template<class P >
void pcl::GenericImage< P >::SetRGBWorkingSpace ( const RGBColorSystem RGBWS)
inlineoverridevirtual

Associates an RGB working space RGBWS with this image.

Note
For shared images (i.e. images living in the PixInsight core application), the RGB working space cannot be changed by calling this member function.

Reimplemented from pcl::ImageColor.

Definition at line 7068 of file Image.h.

◆ SetRow()

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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.

Parameters
bufferStarting address of a contiguous block with source values that will be converted and copied to the target row in this image. The length of this block must be at least equal to 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. If this parameter is negative, the currently selected channel will be used. The default value is -1.

If this image is empty, if the specified vertical coordinate is out of range, or if a nonexistent channel is specified, this member function does nothing.

Definition at line 7514 of file Image.h.

◆ Shift() [1/2]

template<class P >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

GenericImage & Shift()
Definition: Image.h:14170

Definition at line 14170 of file Image.h.

◆ Shift() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

ShiftTo( SelectedPoint(), fillValues );
const Point & SelectedPoint() const noexcept
GenericImage & ShiftTo(int x, int y, const GenericVector< T > &fillValues)
Definition: Image.h:13945

Definition at line 14154 of file Image.h.

◆ ShiftBy() [1/2]

template<class P >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

ShiftBy( dx, dy, sample_vector() );
GenericImage & ShiftBy(int dx, int dy, const GenericVector< T > &fillValues)
Definition: Image.h:13917

Definition at line 13933 of file Image.h.

◆ ShiftBy() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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.

Parameters
dxHorizontal displacement in pixels.
dyVertical displacement in pixels.
fillValuesVector of filling sample values for extended areas. See the documentation for CropBy() for more information.

Positive increment values shift the image toward the right and bottom sides. Negative increments shift toward the left and top sides.

This member function is equivalent to:

CropBy( dx, dy, -dx, -dy, fillValues );

Definition at line 13917 of file Image.h.

◆ ShiftTo() [1/4]

template<class P >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

Definition at line 13993 of file Image.h.

◆ ShiftTo() [2/4]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

ShiftBy( p.x, p.y, fillValues );

Definition at line 13977 of file Image.h.

References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ ShiftTo() [3/4]

template<class P >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

Definition at line 13961 of file Image.h.

◆ ShiftTo() [4/4]

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

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

A synonym for ShiftBy( int, int, sample ).

Definition at line 13945 of file Image.h.

◆ ShiftToBottomLeft() [1/2]

template<class P >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

ShiftToBottomLeft( width, height, sample_vector() );
GenericImage & ShiftToBottomLeft(int width, int height, const GenericVector< T > &fillValues)
Definition: Image.h:14090

Definition at line 14109 of file Image.h.

◆ ShiftToBottomLeft() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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.

Definition at line 14090 of file Image.h.

◆ ShiftToBottomRight() [1/2]

template<class P >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

ShiftToBottomRight( width, height, sample_vector() );
GenericImage & ShiftToBottomRight(int width, int height, const GenericVector< T > &fillValues)
Definition: Image.h:14119

Definition at line 14138 of file Image.h.

◆ ShiftToBottomRight() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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.

Definition at line 14119 of file Image.h.

◆ ShiftToCenter() [1/2]

template<class P >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

ShiftToCenter( width, height, sample_vector() );
GenericImage & ShiftToCenter(int width, int height, const GenericVector< T > &fillValues)
Definition: Image.h:14003

Definition at line 14022 of file Image.h.

◆ ShiftToCenter() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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.

Definition at line 14003 of file Image.h.

◆ ShiftToTopLeft() [1/2]

template<class P >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

ShiftToTopLeft( width, height, sample_vector() );
GenericImage & ShiftToTopLeft(int width, int height, const GenericVector< T > &fillValues)
Definition: Image.h:14032

Definition at line 14051 of file Image.h.

◆ ShiftToTopLeft() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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.

Definition at line 14032 of file Image.h.

◆ ShiftToTopRight() [1/2]

template<class P >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

ShiftToTopRight( width, height, sample_vector() );
GenericImage & ShiftToTopRight(int width, int height, const GenericVector< T > &fillValues)
Definition: Image.h:14061

Definition at line 14080 of file Image.h.

◆ ShiftToTopRight() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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.

Definition at line 14061 of file Image.h.

◆ Sn()

template<class P >
double pcl::GenericImage< P >::Sn ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Sn scale estimator of Rousseeuw and Croux for a subset of pixel samples.

Parameters
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

For a sample {x0,...,x_n-1}, the Sn estimator is given by:

Sn = c * low_median( high_median( |x_i - x_j| ) )

where low_median() is the order statistic of rank (n + 1)/2, and high_median() is the order statistic of rank n/2 + 1.

This member function returns Sn in the normalized range [0,1], irrespective of the sample data type of the image.

For complex-valued images, this function returns the Sn estimator of the magnitudes (or absolute values) of all selected samples.

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account for calculation of the Sn estimator.

The constant c = 1.1926 must be used to make the Sn estimator converge to the standard deviation of a pure normal distribution. However, this implementation does not apply it (it uses c=1 implicitly), for consistency with other implementations of scale estimators.

References

P.J. Rousseeuw and C. Croux (1993), Alternatives to the Median Absolute Deviation, Journal of the American Statistical Association, Vol. 88, pp. 1273-1283.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 12940 of file Image.h.

◆ StdDev()

template<class P >
double pcl::GenericImage< P >::StdDev ( const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1,
int  maxProcessors = 0 
) const
inline

Returns the standard deviation from the mean of a subset of pixel samples.

Parameters
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

This member function returns the standard deviation in the normalized range [0,1], irrespective of the sample data type of the image.

For complex-valued images, this function returns the standard deviation of the magnitudes (or absolute values) of all selected samples.

This implementation uses a two-pass compensated summation algorithm to minimize roundoff errors (see References).

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account for calculation of the variance.

References

William H. Press et al., Numerical Recipes in C: The Art of Scientific Computing, Second Edition (1997 reprint) Cambridge University Press, page 613.

Definition at line 12085 of file Image.h.

◆ Sub() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Sub ( const GenericImage< P1 > &  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 10333 of file Image.h.

◆ Sub() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::Sub ( scalar,
const Rect rect = Rect( 0 ),
int  firstChannel = -1,
int  lastChannel = -1 
)
inline

A synonym for Subtract().

Definition at line 9824 of file Image.h.

◆ Subtract() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Subtract ( const GenericImage< P1 > &  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 equivalent to:

Apply( image, ImageOp::Sub, point, channel, rect, firstChannel, lastChannel );

Definition at line 10322 of file Image.h.

◆ Subtract() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

Apply( scalar, ImageOp::Sub, rect, firstChannel, lastChannel );

Definition at line 9815 of file Image.h.

◆ Subtracted()

template<class P >
template<typename T >
GenericImage pcl::GenericImage< P >::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.

For information on the parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 9849 of file Image.h.

◆ SumOfSquares()

template<class P >
double pcl::GenericImage< P >::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.

Parameters
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

This member function returns the sum of squares in the normalized range [0,1], irrespective of the sample data type of the image.

For complex-valued images, this function returns the sum of the squares of the magnitudes (or absolute values) of all selected samples.

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account for calculation of the sum of squares.

This function implements a numerically stable summation algorithm to reduce roundoff errors to the machine's floating point precision.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 13243 of file Image.h.

◆ Transfer() [1/2]

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

Transfers data from another image to this object. Returns a reference to this image.

Decrements the reference counter of the current image data, and destroys it if it becomes unreferenced.

Transfers the source image to this object, leaving empty and invalid the source image, which cannot be used and must be destroyed immediately after calling this function.

Definition at line 7315 of file Image.h.

◆ Transfer() [2/2]

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

Transfers data from another image to this object. Returns a reference to this image.

Decrements the reference counter of the current image data, and destroys it if it becomes unreferenced.

Transfers the source image to this object, leaving empty and invalid the source image, which cannot be used and must be destroyed immediately after calling this function.

Definition at line 7299 of file Image.h.

◆ Transform()

template<class P >
void pcl::GenericImage< P >::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.

Parameters
transformA bidirectional image transformation that will be applied to the selected subset of pixel samples.

For information on the rest of parameters of this member function, see the documentation for Fill().

Note
In general, the applied transformation increments the status monitoring object proportionally to the number of selected pixel samples. However, the specific increments depend on the applied transformations.
Warning
This member function is not thread safe, even if the subset of pixel samples is selected directly with the rect, firstChannel and lastChannel parameters. This is because image transformations always use the current image selection, which this function changes temporarily.
See also
ImageTransformation

Definition at line 406 of file ImageTransformation.h.

◆ Truncate() [1/2]

template<class P >
GenericImage& pcl::GenericImage< P >::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 convenience shortcut for:

Truncate( P::MinSampleValue(), P::MaxSampleValue(), rect, firstChannel, lastChannel );
GenericImage & Truncate(T lowerBound, T upperBound, const Rect &rect=Rect(0), int firstChannel=-1, int lastChannel=-1)
Definition: Image.h:8262

For information on the parameters of this member function, see the documentation for Fill().

Note that this function only makes sense for floating point real or complex images, where pixel samples can take arbitrary values. Integer pixel samples are constrained to their native range by nature, so calling this function for integer images has no effect.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 8353 of file Image.h.

◆ Truncate() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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.

Parameters
lowerBoundLower bound of the truncation range.
upperBoundUpper bound of the truncation range.

The specified truncation bounds are converted to the sample data type of this image, using pixel traits primitives.

For information on the rest of parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 8262 of file Image.h.

◆ Truncated() [1/2]

template<class P >
GenericImage pcl::GenericImage< P >::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.

For information on the parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 8368 of file Image.h.

◆ Truncated() [2/2]

template<class P >
template<typename T >
GenericImage pcl::GenericImage< P >::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.

Parameters
lowerBoundLower bound of the truncation range.
upperBoundUpper bound of the truncation range.

For information on the rest of parameters of this member function, see the documentation for Fill().

Note
Increments the status monitoring object of the returned image by the number of selected pixel samples.

Definition at line 8324 of file Image.h.

◆ TwoSidedAvgDev()

template<class P >
TwoSidedEstimate pcl::GenericImage< P >::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.

Parameters
centerReference central value for computation of the mean absolute deviation in the normalized range [0,1]. Typically, the value of this parameter is the median of the set of pixel samples used for calculation.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

See AvgDev() for complete information and references.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 12199 of file Image.h.

◆ TwoSidedBiweightMidvariance()

template<class P >
TwoSidedEstimate pcl::GenericImage< P >::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.

Parameters
centerReference center value in the [0,1] range. Normally, the median of the selected pixel samples should be used.
sigmaReference estimates of dispersion in the [0,1] range, respectively for samples below and above the reference center value (low and high members of the TwoSidedEstimate structure, respectively). Normally, a two-sided median absolute deviation from the median (two-sided MAD) for the selected pixel samples should be specified.
kRejection limit in sigma units. The default value is k=9.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

See the BiweightMidvariance() member function for more information and references.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 12751 of file Image.h.

◆ TwoSidedMAD()

template<class P >
TwoSidedEstimate pcl::GenericImage< P >::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.

Parameters
centerReference central value for computation of MAD in the normalized range [0,1]. Normally, this value should be the median of the selected pixel samples, or the median of the whole image.
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

See MAD() for more information and references.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 12453 of file Image.h.

◆ Variance()

template<class P >
double pcl::GenericImage< P >::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.

Parameters
maxProcessorsIf a value greater than zero is specified, it is the maximum number of concurrent threads that this function can execute. If zero or a negative value is specified, the current thread limit for this image will be used instead (see AbstractImage::SetMaxProcessors()). The default value is zero.

For information on the rest of parameters of this member function, see the documentation for Fill().

This member function returns the variance in the normalized range [0,1], irrespective of the sample data type of the image.

For complex-valued images, this function returns the variance of the magnitudes (or absolute values) of all selected samples.

This implementation uses a two-pass compensated summation algorithm to minimize roundoff errors (see References).

If range clipping is enabled for this image, only pixel samples within the current clipping range will be taken into account for calculation of the variance.

References

William H. Press et al., Numerical Recipes in C: The Art of Scientific Computing, Second Edition (1997 reprint) Cambridge University Press, page 613.

Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 11985 of file Image.h.

◆ White()

template<class P >
GenericImage& pcl::GenericImage< P >::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 convenience shortcut for:

Fill( P::MaxSampleValue(), rect, firstChannel, lastChannel );
Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 8067 of file Image.h.

◆ Write() [1/2]

template<class P >
GenericImage& pcl::GenericImage< P >::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 file. Returns a reference to this image.

Parameters
filePathFile path where a new file will be created with pixel data from this image.

This member function is just a wrapper to the more general version: Write( File&, const Rect&, int, int ).

Definition at line 13558 of file Image.h.

◆ Write() [2/2]

template<class P >
GenericImage& pcl::GenericImage< P >::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.

Parameters
fileOutput stream to write to.

The generated raw-storage can be used to generate a new image with the Read() member function.

Note
Increments the status monitoring object by the number of pixel samples written to the specified file.
This member function, together with the Read() function, implements a lightweight image reading/writing system with limited error detection and handling capabilities. For more powerful and sophisticated ways to serialize image data, see the ImageVariant class.

Definition at line 13513 of file Image.h.

◆ Xchg()

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Xchg ( GenericImage< P1 > &  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 10795 of file Image.h.

◆ Xnor() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Xnor ( const GenericImage< P1 > &  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 equivalent to:

Apply( image, ImageOp::Xnor, point, channel, rect, firstChannel, lastChannel );

Definition at line 10665 of file Image.h.

◆ Xnor() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

Apply( scalar, ImageOp::Xnor, rect, firstChannel, lastChannel );

Definition at line 10248 of file Image.h.

◆ Xor() [1/2]

template<class P >
template<class P1 >
GenericImage& pcl::GenericImage< P >::Xor ( const GenericImage< P1 > &  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 equivalent to:

Apply( image, ImageOp::Xor, point, channel, rect, firstChannel, lastChannel );

Definition at line 10608 of file Image.h.

◆ Xor() [2/2]

template<class P >
template<typename T >
GenericImage& pcl::GenericImage< P >::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 equivalent to:

Apply( scalar, ImageOp::Or, rect, firstChannel, lastChannel );

Definition at line 10197 of file Image.h.

◆ Zero()

template<class P >
GenericImage& pcl::GenericImage< P >::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 floating point scalar zero (0.0) to the sample data type of the image. Returns a reference to this image.

This member function is a convenience shortcut for:

Fill( P::ToSample( 0.0 ), rect, firstChannel, lastChannel );
Note
Increments the status monitoring object by the number of selected pixel samples.

Definition at line 8012 of file Image.h.

Friends And Related Function Documentation

◆ Swap

template<class P >
void Swap ( GenericImage< P > &  x1,
GenericImage< P > &  x2 
)
friend

Exchanges two images x1 and x2 of the same template instantiation.

Definition at line 7346 of file Image.h.


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