Celartem::Image Class Reference

#include <pxl_image.h>

Inheritance diagram for Celartem::Image:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ssize_t getWidth () const =0
virtual ssize_t getHeight () const =0
virtual Photometric getPhotometric () const =0
virtual ImageStatusFlags setParam (const ImageParam *inParam)=0
virtual AutoPtr< ImageLocklock ()=0
virtual AutoPtr< Imageduplicate () const =0
virtual AutoPtr< DataStoregetMetadata () const =0
virtual AutoPtr< DocgetDoc () const =0
virtual size_t getRevision () const =0
size_t estimateBufferSize (const Size &inDim, ssize_t *outRowStride) const
AutoPtr< ColorProfilegetColorProfile ()


Detailed Description

Image is one of the most important PixelLive classes; it defines the basic functions of Image derivative classes.
See also:
Factory Functions for Image Classes, ImageLock, Referable

Definition at line 239 of file pxl_image.h.


Member Function Documentation

virtual ssize_t Celartem::Image::getWidth (  )  const [pure virtual]

This function returns the width of this image in pixels.

Returns:
Width of the image.

virtual ssize_t Celartem::Image::getHeight (  )  const [pure virtual]

This function returns the height of this image in pixels.

Returns:
Height of the image.

virtual Photometric Celartem::Image::getPhotometric (  )  const [pure virtual]

This function return the photometric of the image. The photometric is a value that uniquely identify the traits of the image, such as color space, byte order (endianness), the basic element type, and so on. For more information about Photometric, see Photometric and PhotometricDefinition.

See also:
Photometric, PhotometricDefinition, ColorSpace, ByteOrder, ElementType, ChannelType

virtual ImageStatusFlags Celartem::Image::setParam ( const ImageParam inParam  )  [pure virtual]

This function sets parameters of one or more Image instances. The parameters passed to this function is usually passed to all the Image instances in the image chain unless some Image instances intentionally block them; in other words, the parameters are broadcasted to all Image instances.
You should check the return value from the function. If the width and/or height of the Image instance is changed by the parameter passed to this function, the return value contains ImageStatusFlags::SIZE_CHANGED bit and ImageStatusFlags::isSizeChanged function returns ture.
If the Photometric of the Image instance is changed by the parameter passed to this function, the return value contains ImageStatusFlags::PHOTOMETRIC_CHANGED bit and ImageStatusFlags::isPhotometricChanged function returns ture.
If the data of the Image instance is changed by the parameter passed to this function, the return value contains ImageStatusFlags::PICTURE_CHANGED bit and ImageStatusFlags::isPictureChanged function returns ture.
If any properties of the Image instance is changed, the return value contains some combination of the flags explained above and ImageStatusFlags::isChanged function returns ture.

Parameters:
inParam Pointer to an instance of a class/structure which derives ImageParam class.
Returns:
This function returns an ImageStatusFlags instance that notifies the status of the Image. In usual case, this value is used to notify the update of the Image.
See also:
ImageParam, Image Parameter Structures

virtual AutoPtr<ImageLock> Celartem::Image::lock (  )  [pure virtual]

This function locks a portion of the image for read access.

Returns:
Pointer to the newly created ImageLock instance.
See also:
ImageLock

virtual AutoPtr<Image> Celartem::Image::duplicate (  )  const [pure virtual]

This function duplicates the chain of the Images that starts from this Image instance.

Returns:
Pointer to the newly create Image chain.

virtual AutoPtr<DataStore> Celartem::Image::getMetadata (  )  const [pure virtual]

This function returns A COPY of the Metadata associated to this image; you could not modify the Metadata associated to an Image instance by this function. If you want to do so, use the DataStore instance as a parameter to export functions.
For more information about metadata handling, see Metadata Handling.

See also:
Doc::getMetadata

Metadata Handling

virtual AutoPtr<Doc> Celartem::Image::getDoc (  )  const [pure virtual]

This function returns the Doc instance that geneted this Image instance.
If you're planning to create your own Image class but it does not need any Doc class for its purpose, you can use Doc::createFakeDoc function to implement getDoc function.

Returns:
Pointer to the Doc instance.
See also:
Doc

virtual size_t Celartem::Image::getRevision (  )  const [pure virtual]

This function returns the revision of the instance. The revision is the total number of the calls to getWritableBufferPtr and write before the call to the method.
The user of Image class can check the updates by checking the revision like the following code:

// You should not use '>' for the revision check bacause revision may
// cause overflow.
if(m_rev != m_image->getRevision())
{
    // The image was updated after the previous check
    m_rev = m_image->getRevision();
}
Returns:
The current revision.

size_t Celartem::Image::estimateBufferSize ( const Size inDim,
ssize_t *  outRowStride 
) const

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 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, Accessing to Raster Image Data, PixelAttributes::estimateBufferSize

AutoPtr<ColorProfile> Celartem::Image::getColorProfile (  ) 

This function returns the associated color profile instance if available.

Returns:
Pointer to the color profile instance.
See also:
ColorProfile, PhotometricTransform

PhotometricTransformNoProfile


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