HDK_Sample::IMG_RawFormat Class Reference

Inheritance diagram for HDK_Sample::IMG_RawFormat:

IMG_Format

List of all members.

Public Member Functions

 IMG_RawFormat ()
virtual ~IMG_RawFormat ()
virtual const char * getFormatName () const
virtual const char * getFormatLabel () const
virtual const char * getFormatDescription () const
virtual const char * getDefaultExtension () const
virtual IMG_FilecreateFile () const
virtual int checkExtension (const char *filename) const
virtual int checkMagic (unsigned int) const
virtual IMG_DataType getSupportedTypes () const
 Returns a bitfield of data types supported by this format.
virtual IMG_ColorModel getSupportedColorModels () const
virtual void getMaxResolution (unsigned &x, unsigned &y) const
virtual int isReadRandomAccess () const
virtual int isWriteRandomAccess () const


Detailed Description

Custom image file format definition. This class defines the properties of the custom image format.
See also:
IMG_Raw
Examples:

IMG/IMG_Raw.C.

Definition at line 55 of file IMG_Raw.C.


Constructor & Destructor Documentation

HDK_Sample::IMG_RawFormat::IMG_RawFormat (  )  [inline]

Examples:
IMG/IMG_Raw.C.

Definition at line 57 of file IMG_Raw.C.

virtual HDK_Sample::IMG_RawFormat::~IMG_RawFormat (  )  [inline, virtual]

Examples:
IMG/IMG_Raw.C.

Definition at line 58 of file IMG_Raw.C.


Member Function Documentation

int IMG_RawFormat::checkExtension ( const char *  filename  )  const [virtual]

Methods to determine if this is one of our recognized files. The extension is the first try. If there are multiple matches, then we resort to the magic number (when reading)

Implements IMG_Format.

Examples:
IMG/IMG_Raw.C.

Definition at line 125 of file IMG_Raw.C.

int IMG_RawFormat::checkMagic ( unsigned  int  )  const [virtual]

If possible, this magic numver checker will be called. This is used if the file is "seekable" (i.e. that we can rewind after checking)

Reimplemented from IMG_Format.

Examples:
IMG/IMG_Raw.C.

Definition at line 132 of file IMG_Raw.C.

IMG_File * IMG_RawFormat::createFile (  )  const [virtual]

Specifies if this format can read an image file. One of isReadable() or isWritable() (or both) must return true.

Implements IMG_Format.

Examples:
IMG/IMG_Raw.C.

Definition at line 119 of file IMG_Raw.C.

const char * IMG_RawFormat::getDefaultExtension (  )  const [virtual]

The default extension is used to determine whether the format should appear in the device/format menus. It should not contain the '.' (i.e. "tif" not ".tif")

Reimplemented from IMG_Format.

Examples:
IMG/IMG_Raw.C.

Definition at line 110 of file IMG_Raw.C.

const char * IMG_RawFormat::getFormatDescription (  )  const [virtual]

This can be optionally overridden to return a short description of the format. By default, no description is given.

Reimplemented from IMG_Format.

Examples:
IMG/IMG_Raw.C.

Definition at line 102 of file IMG_Raw.C.

const char * IMG_RawFormat::getFormatLabel (  )  const [virtual]

If getFormatLabel() is not overridden, the label will be the same as the name.

Reimplemented from IMG_Format.

Examples:
IMG/IMG_Raw.C.

Definition at line 95 of file IMG_Raw.C.

const char * IMG_RawFormat::getFormatName (  )  const [virtual]

All formats must have a unique name (like "JPEG").

Implements IMG_Format.

Examples:
IMG/IMG_Raw.C.

Definition at line 88 of file IMG_Raw.C.

void IMG_RawFormat::getMaxResolution ( unsigned &  x,
unsigned &  y 
) const [virtual]

Maximum allowable resolution for the file. If a user attempts to write an image larger than this, the image will be scaled to this resolution.

Implements IMG_Format.

Examples:
IMG/IMG_Raw.C.

Definition at line 139 of file IMG_Raw.C.

virtual IMG_ColorModel HDK_Sample::IMG_RawFormat::getSupportedColorModels (  )  const [inline, virtual]

Returns a bitfield of supported color models. If IMG_CM_REVERSED is set, this format stores data in BGR/ABGR format.

Implements IMG_Format.

Examples:
IMG/IMG_Raw.C.

Definition at line 73 of file IMG_Raw.C.

virtual IMG_DataType HDK_Sample::IMG_RawFormat::getSupportedTypes (  )  const [inline, virtual]

Returns a bitfield of data types supported by this format.

Implements IMG_Format.

Examples:
IMG/IMG_Raw.C.

Definition at line 71 of file IMG_Raw.C.

virtual int HDK_Sample::IMG_RawFormat::isReadRandomAccess (  )  const [inline, virtual]

Some formats can be read and written in random order. Others require strict sequential order. If these methods return false, you should read and write scanlines in ascending order. When writing, they will be cached until they can be written sequentially.

Reimplemented from IMG_Format.

Examples:
IMG/IMG_Raw.C.

Definition at line 80 of file IMG_Raw.C.

virtual int HDK_Sample::IMG_RawFormat::isWriteRandomAccess (  )  const [inline, virtual]

If 0 is returned, the scanlines must be written in sequential order or they will be cached until all scanlines can be written sequentially.

Reimplemented from IMG_Format.

Examples:
IMG/IMG_Raw.C.

Definition at line 81 of file IMG_Raw.C.


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

Generated on Mon Jan 28 00:30:25 2013 for HDK by  doxygen 1.5.9