Celartem::PixelAttributes Struct Reference

#include <pxl_pixeltypes.h>

List of all members.

Public Member Functions

Photometric getPhotometric () const
ColorSpace getColorSpace () const
size_t getChannels () const
size_t getStdChannels () const
size_t getExtraChannels () const
ElementType getElementType () const
ChannelLayout getLayout () const
size_t getChannelPos (size_t nCh) const
size_t getAlphaPos () const
size_t getBytesPerChannel () const
size_t getBytesPerPixel () const
size_t estimateByteSize (size_t inPixels) const
size_t estimateBufferSize (const Size &inDim, ssize_t *outRowStride) const
bool isAssociatedAlpha () const
bool hasAlpha () const
AlphaType getAlphaType () const
bool isIntegralType () const
bool canPreserveOutOfRangeValues () const
bool isValid () const
String getNotation ()


Detailed Description

PixelAttributes determines the pixel's attributes runtimely.

Definition at line 461 of file pxl_pixeltypes.h.


Member Function Documentation

Photometric Celartem::PixelAttributes::getPhotometric (  )  const [inline]

This function return the Photometric of the this instance.

Returns:
The Photometric.

Definition at line 472 of file pxl_pixeltypes.h.

ColorSpace Celartem::PixelAttributes::getColorSpace (  )  const [inline]

This function returns the colorspace of the specified photometric.

Returns:
The colorspace.

Definition at line 482 of file pxl_pixeltypes.h.

Referenced by getStdChannels(), and Celartem::PhotometricComponents::setPhotometric().

size_t Celartem::PixelAttributes::getChannels (  )  const [inline]

This function returns the number of channels in the specified photometric.

Returns:
The number of channels.

Definition at line 493 of file pxl_pixeltypes.h.

Referenced by getBytesPerPixel(), getExtraChannels(), isValid(), and Celartem::PhotometricComponents::setPhotometric().

size_t Celartem::PixelAttributes::getStdChannels (  )  const [inline]

This function returns the number of standard channels.
The number of standard channels for RGB is 3, for CMYK is 4. It does not contain alpha channel.

Returns:
The number of standard channels.

Definition at line 505 of file pxl_pixeltypes.h.

Referenced by getAlphaPos(), getExtraChannels(), and isValid().

size_t Celartem::PixelAttributes::getExtraChannels (  )  const [inline]

This function return the number of extra channels.

Returns:
The number of extra channels.

Definition at line 515 of file pxl_pixeltypes.h.

ElementType Celartem::PixelAttributes::getElementType (  )  const [inline]

This function returns the element type of the specified photometric.

Returns:
The element type of the channels.

Definition at line 526 of file pxl_pixeltypes.h.

Referenced by getBytesPerChannel(), isIntegralType(), and Celartem::PhotometricComponents::setPhotometric().

ChannelLayout Celartem::PixelAttributes::getLayout (  )  const [inline]

This function returns the channel layout of the specified photometric.

Returns:
The layout of the channels.

Definition at line 537 of file pxl_pixeltypes.h.

Referenced by getChannelPos(), and Celartem::PhotometricComponents::setPhotometric().

size_t Celartem::PixelAttributes::getChannelPos ( size_t  nCh  )  const [inline]

This function returns the actual position of the channel that is placed to the specified position in the layout0123 layout.

Parameters:
nCh The position of the channel in the layout0123 layout. In RGBA images, 0 stands for R(Red), 1 for G(Green), 2 for B(Blue) and 3 for Alpha.
Returns:
The current position.

Definition at line 553 of file pxl_pixeltypes.h.

Referenced by getAlphaPos(), and isValid().

size_t Celartem::PixelAttributes::getAlphaPos (  )  const [inline]

This function returns the position of the first extra channel. The first extra channel is the alpha-channel if the AlphaType value returned by getAlphaType is not atNone.

Returns:
The alpha-channel position.

Definition at line 570 of file pxl_pixeltypes.h.

size_t Celartem::PixelAttributes::getBytesPerChannel (  )  const [inline]

This function returns the bytes per channel of the specified photometric.

Returns:
The bytes per channel.

Definition at line 581 of file pxl_pixeltypes.h.

Referenced by getBytesPerPixel().

size_t Celartem::PixelAttributes::getBytesPerPixel (  )  const [inline]

This function returns the bytes per pixel of the specified photometric.

Returns:
The bytes per pixel.

Definition at line 600 of file pxl_pixeltypes.h.

Referenced by estimateByteSize().

size_t Celartem::PixelAttributes::estimateByteSize ( size_t  inPixels  )  const [inline]

This function returns the number of bytes used by the specified number of the pixels.

Parameters:
inPixels The number of pixels.
Returns:
The size in bytes.

Definition at line 613 of file pxl_pixeltypes.h.

Referenced by estimateBufferSize().

size_t Celartem::PixelAttributes::estimateBufferSize ( const Size inDim,
ssize_t *  outRowStride 
) const [inline]

This function calculates the size of the buffer that receives raw data of a portion of the specified dimensions and also returns the row stride of the inDim.width pixels. The row-stride value returned by the function is 8-byte aligned.

Parameters:
inDim The dimensions of the area to receive.
outRowStride The buffer that receives the row stride. It cound not be NULL.
Returns:
The size needed for the buffer.
See also:
ImageLock::read, Image::estimateBufferSize

Definition at line 633 of file pxl_pixeltypes.h.

bool Celartem::PixelAttributes::isAssociatedAlpha (  )  const [inline]

This function determines whether the alpha-channel of the pixel is associated or not.

Returns:
true if the pixel has associated alpha channel, otherwise false .

Definition at line 649 of file pxl_pixeltypes.h.

bool Celartem::PixelAttributes::hasAlpha (  )  const [inline]

This function determines whether the alpha-channel exists or not.

Returns:
true if the alpha-channel exists, otherwise false .

Definition at line 660 of file pxl_pixeltypes.h.

Referenced by isValid().

AlphaType Celartem::PixelAttributes::getAlphaType (  )  const [inline]

This function returns the type of alpha-channel.

Returns:
The type of alpha-channel in AlphaType.

Definition at line 670 of file pxl_pixeltypes.h.

Referenced by Celartem::PhotometricComponents::setPhotometric().

bool Celartem::PixelAttributes::isIntegralType (  )  const [inline]

This function determines whether it is an integral type or not.

Returns:
true if the type is integral type, otherwise false.

Definition at line 681 of file pxl_pixeltypes.h.

Referenced by canPreserveOutOfRangeValues().

bool Celartem::PixelAttributes::canPreserveOutOfRangeValues (  )  const [inline]

This function determines whether this type can preserve out of range values or not.

Returns:
true if it can preserve out of range values, otherwise false.

Definition at line 695 of file pxl_pixeltypes.h.

bool Celartem::PixelAttributes::isValid (  )  const [inline]

This function determines whether the photometric is valid or not.

Returns:
true if valid, otherwise false.
See also:
Photometric, PhotometricComponents, PhotometricComponents::isValid

Definition at line 706 of file pxl_pixeltypes.h.

String Celartem::PixelAttributes::getNotation (  ) 

This function returns the string that describes the photometric in human readable format.

Returns:
The string describing the photometric.


The documentation for this struct was generated from the following file:
This document is automatically generated using doxygen 1.5.4 at Fri Jun 27 18:23:13 2008.