Synergy Color Management Component - SDK -  2018.0.80
SYNCOLOR::ROI Class Reference

Region of interest class. More...

Public Member Functions

 ROI (unsigned x, unsigned y, unsigned width, unsigned height, unsigned imageWidth, unsigned imageHeight)
 Detailed ROI constructor. More...
 
 ROI (unsigned imageWidth, unsigned imageHeight)
 Constructor of an ROI that corresponds to the entire image. More...
 
 ~ROI ()
 Destructor. More...
 
unsigned getNumROIPixels () const
 Number of pixels in the ROI. More...
 
unsigned getX () const
 Bottom left corner x offset. More...
 
unsigned getY () const
 Bottom left corner y offset. More...
 
unsigned getActiveWidth () const
 ROI width. More...
 
unsigned getActiveHeight () const
 ROI height. More...
 
unsigned getImageWidth () const
 Image width. More...
 
unsigned getImageHeight () const
 Image height. More...
 

Private Attributes

unsigned _x
 Bottom left corner x offset. More...
 
unsigned _y
 Bottom left corner y offset. More...
 
unsigned _width
 ROI width. More...
 
unsigned _height
 ROI height. More...
 
unsigned _imageWidth
 Width of the image containing the ROI. More...
 
unsigned _imageHeight
 Height of the image containing the ROI. More...
 

Detailed Description

Region of interest class.

The ROI class describes the region of interest within an image onto which to apply a color transformation. It defines a rectangle with bottom left at (x,y) of size (width, height) within a rectangle with bottom left at (0,0) of size (imageWidth, imageHeight).

Constructor & Destructor Documentation

SYNCOLOR::ROI::ROI ( unsigned  x,
unsigned  y,
unsigned  width,
unsigned  height,
unsigned  imageWidth,
unsigned  imageHeight 
)

Detailed ROI constructor.

This constructor assumes that x+width <= imageWidth and y+height <= imageHeight. No validation is performed.

Parameters
xBottom left corner x offset.
yBottom left corner y offset.
widthROI width.
heightROI height.
imageWidthImage width.
imageHeightImage height.
SYNCOLOR::ROI::ROI ( unsigned  imageWidth,
unsigned  imageHeight 
)

Constructor of an ROI that corresponds to the entire image.

This constructor sets x=0, y=0, width = imageWidth and height = imageHeight.

Parameters
imageWidthROI and image width.
imageHeightROI and image height.
SYNCOLOR::ROI::~ROI ( )

Destructor.

Member Function Documentation

unsigned SYNCOLOR::ROI::getNumROIPixels ( ) const
inline

Number of pixels in the ROI.

Returns
the number of pixels within the region of interest.
unsigned SYNCOLOR::ROI::getX ( ) const
inline

Bottom left corner x offset.

Returns
the x offset.
unsigned SYNCOLOR::ROI::getY ( ) const
inline

Bottom left corner y offset.

Returns
the y offset.
unsigned SYNCOLOR::ROI::getActiveWidth ( ) const
inline

ROI width.

Returns
the ROI width.
unsigned SYNCOLOR::ROI::getActiveHeight ( ) const
inline

ROI height.

Returns
the ROI height.
unsigned SYNCOLOR::ROI::getImageWidth ( ) const
inline

Image width.

Returns
the width of the image containing the ROI.
unsigned SYNCOLOR::ROI::getImageHeight ( ) const
inline

Image height.

Returns
the height of the image containing the ROI.

Member Data Documentation

unsigned SYNCOLOR::ROI::_x
private

Bottom left corner x offset.

unsigned SYNCOLOR::ROI::_y
private

Bottom left corner y offset.

unsigned SYNCOLOR::ROI::_width
private

ROI width.

unsigned SYNCOLOR::ROI::_height
private

ROI height.

unsigned SYNCOLOR::ROI::_imageWidth
private

Width of the image containing the ROI.

unsigned SYNCOLOR::ROI::_imageHeight
private

Height of the image containing the ROI.