iflPixel(3)
iflPixel - class for pixel abstraction
As shipped in IRIX 6.5.7. Unchanged since IRIX 6.5.
NAME iflPixel - class for pixel abstraction INHERITS FROM This is a base class and therefore has no inheritance. HEADER FILE #include <ifl/iflPixel.h> CLASS DESCRIPTION This class abstracts the concept of a pixel of image data. It contains the data type, the number of channels, and a list of component values. Pixels are used as arguments on an iflConverter constructor. CLASS MEMBER FUNCTION SUMMARY Constructor iflPixel(iflDataType type=iflDataType(0), int nc=0, void* data=NULL) iflPixel(const iflPixel &pix) Initializing void convert(const iflPixel& pix, iflDataType toType, int nc=0, int* chanList=NULL) void operator=(const iflPixel &pix) void set(iflDataType type, int nc=0, void* data = NULL) Member access void* getData() const iflDataType getDataType() const double getElem(int index) const int getNumChans() const void setElem(double elemValue, int index=0) double min() const double max() const Convenience operators double operator[](int index) const int operator==(const iflPixel &p) int operator!=(const iflPixel &p) FUNCTION DESCRIPTIONS iflPixel() iflPixel(iflDataType type=iflDataType(0), int nc=0, void* data=NULL) iflPixel(const iflPixel &pix) The first constructor creates a pixel of data type, type, with nc channels, and with the component values pointed to by data. The data values are copied into the iflPixel constructed. The second constructor copies the attributes and data from the iflPixel specified by pix. By default, a pixel of undefined type with no components is constructed. convert() void convert(const iflPixel& pix, iflDataType toType, int nc=0, int* chanList=NULL) This function copies the pixel specified by pix, converting to the new data type, toType. A subset of the channels can be selected by listing the channels to copy from the source pixel in chanList. The length of the channel list is given by nc. getData() void* getData() const This function returns a pointer to the pixel component array. This is identical in function to the (void*) cast operation. getDataType() iflDataType getDataType() const This function returns the data type of the pixel. getElem() double getElem(int index) const This function returns the pixel component selected by index. The first component is at index zero. This is identical in function to the [] subscript operation. getNumChans() int getNumChans() const This function returns the number of channels in the pixel. min() double min() const This function returns the minimum value of the pixel component array. max() double max() const This function returns the maximum value of the pixel component array. operator[] double operator[](int index) const This function returns the pixel component selected by index. The first component is at index zero. This is identical in function to the getElem() function. operator=() void operator=(const iflPixel &pix) The assignment operator makes a copy of the right hand pixel, pix, in the left hand pixel. The new copy retains the same data type, number of channels, and data values. operator==() int operator==(const iflPixel &p) This operator returns TRUE if 'this' iflPixel is the same as p ( i.e. both have the same data type, number of channels and values ); FALSE otherwise. operator!=() int operator!=(const iflPixel &p) This operator returns TRUE if 'this' iflPixel is not the same as p ( i.e. they differ in the data type, number of channels or values ); FALSE otherwise. set() void set(iflDataType type, int nc=0, void* data = NULL) This function initializes the pixel's data type to type, sets the channel count to nc, and copies the component values from data. setElem() void setElem(double elemValue, int index=0) This function sets the pixel component selected by index. The first component is at index zero. SEE ALSO iflConverter