PCL
pcl::ImageInfo Class Reference

A simple structure to hold basic information about images. More...

#include <ImageInfo.h>

Public Types

using color_space = ColorSpace::value_type
 

Public Member Functions

 ImageInfo ()
 
 ImageInfo (const AbstractImage &image)
 
 ImageInfo (const ImageInfo &)=default
 
bool IsValid () const
 
size_type NumberOfPixels () const
 
size_type NumberOfSamples () const
 
ImageInfooperator= (const ImageInfo &)=default
 
bool operator== (const ImageInfo &x) const
 
void Reset ()
 

Public Attributes

color_space colorSpace
 Color space, compatible with ImageColor::color_space
 
int height
 Image height in pixels
 
int numberOfChannels
 Number of channels, including alpha channels.
 
bool supported
 Whether we support this image.
 
int width
 Image width in pixels
 

Detailed Description

Definition at line 71 of file ImageInfo.h.

Member Typedef Documentation

◆ color_space

using pcl::ImageInfo::color_space = ColorSpace::value_type

Represents a color space. See the ColorSpace namespace for supported values.

Definition at line 79 of file ImageInfo.h.

Constructor & Destructor Documentation

◆ ImageInfo() [1/3]

pcl::ImageInfo::ImageInfo ( )
inline

Constructs an ImageInfo object with default values.

Definition at line 90 of file ImageInfo.h.

◆ ImageInfo() [2/3]

pcl::ImageInfo::ImageInfo ( const ImageInfo )
default

Copy constructor.

◆ ImageInfo() [3/3]

pcl::ImageInfo::ImageInfo ( const AbstractImage image)
inline

Constructs an ImageInfo object with data obtained from the specified image.

The width, height and numberOfChannels data members are set to the dimensions of the selected rectangle and the number of selected channels in image, respectively.

Definition at line 113 of file ImageInfo.h.

References pcl::ImageColor::ColorSpace(), pcl::GenericRectangle< T >::Height(), pcl::AbstractImage::NumberOfSelectedChannels(), pcl::AbstractImage::SelectedRectangle(), and pcl::GenericRectangle< T >::Width().

Member Function Documentation

◆ IsValid()

bool pcl::ImageInfo::IsValid ( ) const
inline

Returns true iff this object describes a valid nonempty image.

Definition at line 153 of file ImageInfo.h.

◆ NumberOfPixels()

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

Returns the number of pixels in the image, or width*height.

Definition at line 125 of file ImageInfo.h.

◆ NumberOfSamples()

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

Returns the number of samples in the image, or width*height*numberOfChannels.

Definition at line 134 of file ImageInfo.h.

◆ operator=()

ImageInfo& pcl::ImageInfo::operator= ( const ImageInfo )
default

Copy assignment operator. Returns a reference to this object.

◆ operator==()

bool pcl::ImageInfo::operator== ( const ImageInfo x) const
inline

Returns true iff this object is equal to another instance x.

Definition at line 164 of file ImageInfo.h.

References colorSpace, height, numberOfChannels, and width.

◆ Reset()

void pcl::ImageInfo::Reset ( )
inline

Initializes this ImageInfo structure with default values, corresponding to an empty image.

Definition at line 143 of file ImageInfo.h.


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