#include <IMG_Stat.h>
Public Member Functions | |
| IMG_Stat () | |
| IMG_Stat (unsigned xres, unsigned yres) | |
| IMG_Stat (unsigned xres, unsigned yres, IMG_DataType dt, IMG_ColorModel cm) | |
| ~IMG_Stat () | |
| IMG_Stat (const IMG_Stat &s) | |
| IMG_Stat & | operator= (const IMG_Stat &s) |
| void | copy (const IMG_Stat &src) |
| void | addEnvMapPlanes (IMG_DataType dt, IMG_ColorModel cm) |
| bool | isEnvMap () const |
| isEnvMap() will return true, only if the image is an environment map. | |
| bool | setEnvMap () |
| void | reorderPlane (IMG_Plane *plane, int beforeindex) |
| Alters the order of planes in the stat. | |
| int | getDataWidth () const |
| int | getDataHeight () const |
| int | getNumFrames () const |
| void | setNumFrames (int nf) |
| fpreal | getFPS () const |
| void | setFPS (fpreal fps) |
| int | bytesPerPixel () const |
| int | bytesPerImage () const |
| int | bytesPerScanline () const |
| int | bytesPerPlaneScan (const IMG_Plane &pi) const |
| int | bytesPerPlaneScan (int i) const |
| int | planeOffset (const IMG_Plane &pi) const |
| int | planeOffset (int i) const |
| void | setResolution (unsigned xres, unsigned yres) |
| unsigned | getXres () const |
| unsigned | getYres () const |
| void | setAspectRatio (fpreal aspect) |
| fpreal | getAspectRatio () const |
| void | setFilename (const char *name) |
| const UT_String & | getFilename () const |
| int | getNumPlanes () const |
| Returns the number of image planes in the image a plane contains the actual structure of the image data. An image needs at least one. Deep rasters can have multiple planes. | |
| IMG_Plane * | getPlane (int i=0) const |
| Get an image plane by index. | |
| IMG_Plane * | getPlaneName (const char *name) const |
| Get an image plane by name Returns the plane with name 'name', or NULL if no matching plane is found. | |
| int | getPlaneIndex (const char *name) const |
| Returns the index of the plane with 'name' Returns the index of the plane with name 'name', or -1 if not found. | |
| void | removePlane (int pindex) |
| void | removePlane (const char *name) |
| Remove a plane by index from the stat. Used only for writing files. | |
| void | removeAllPlanes () |
| Remove all planes from the stat. Used only for writing files. | |
| void | setDataWindow (const UT_DimRect &win) |
| Manipulate the data window of an image. The data window is constant across all planes. It may be smaller than the actual resolution (crop region) or larger. The data window is inclusive in that x2 and y2 are part of the region. You can also use the UT_DimRect versions for easier manipulations of the area. Image data is only defined for the area contained by the data window. By default, it is (0,0) - (xres-1, yres-1) (the entire image). | |
| void | setDataWindow (int x1, int y1, int x2, int y2) |
| Manipulate the data window of an image. The data window is constant across all planes. It may be smaller than the actual resolution (crop region) or larger. The data window is inclusive in that x2 and y2 are part of the region. You can also use the UT_DimRect versions for easier manipulations of the area. Image data is only defined for the area contained by the data window. By default, it is (0,0) - (xres-1, yres-1) (the entire image). | |
| void | clearDataWindow () |
| Manipulate the data window of an image. The data window is constant across all planes. It may be smaller than the actual resolution (crop region) or larger. The data window is inclusive in that x2 and y2 are part of the region. You can also use the UT_DimRect versions for easier manipulations of the area. Image data is only defined for the area contained by the data window. By default, it is (0,0) - (xres-1, yres-1) (the entire image). | |
| void | getDataWindow (UT_DimRect &r) const |
| Get the data window of an image. | |
| void | getDataWindow (int &x1, int &y1, int &x2, int &y2) const |
| Get the data window of an image. | |
| bool | hasDataWindow () const |
| Returns true if the image has a data window. | |
| void | setBackgroundColor (fpreal col[4]) |
| void | getBackgroundColor (fpreal col[4]) const |
| void | setBackgroundStreak (bool streak) |
| bool | getBackgroundStreak () const |
Static Public Member Functions | |
| static const char * | getColorModel (IMG_ColorModel cm) |
| static const char * | getDataType (IMG_DataType dt) |
| IMG_Plane * | addPlane (const char *name, IMG_DataType d, IMG_ColorModel cm, const char *c0name=0, const char *c1name=0, const char *c2name=0, const char *c3name=0) |
| Add a plane to an image file. Add a plane to the image file. This is only used when writing files. Plane names must be unique. To write a file, at least one plane must be present. | |
| IMG_Plane * | addDefaultPlane () |
| Add a default 8bit, RGBA plane to the image. | |
IMG/IMG_Raw.C, and IMG/IMG_Raw.h.
Definition at line 47 of file IMG_Stat.h.
| IMG_Stat::IMG_Stat | ( | ) |
| IMG_Stat::IMG_Stat | ( | unsigned | xres, | |
| unsigned | yres | |||
| ) |
Sets up the resolution of the image. addPlane() or addDefaultPlane() must be called to fill out the
| IMG_Stat::IMG_Stat | ( | unsigned | xres, | |
| unsigned | yres, | |||
| IMG_DataType | dt, | |||
| IMG_ColorModel | cm | |||
| ) |
sets up a single image plane format, without requiring addPlane(). Don't use this for deep raster images.
| IMG_Stat::~IMG_Stat | ( | ) |
| IMG_Stat::IMG_Stat | ( | const IMG_Stat & | s | ) | [inline] |
Definition at line 62 of file IMG_Stat.h.
| IMG_Plane* IMG_Stat::addDefaultPlane | ( | ) | [inline] |
Add a default 8bit, RGBA plane to the image.
Definition at line 133 of file IMG_Stat.h.
| void IMG_Stat::addEnvMapPlanes | ( | IMG_DataType | dt, | |
| IMG_ColorModel | cm | |||
| ) |
Adds 6 planes named Left, Right, Top, Bottom, Front and Back, all using the same image format.
| IMG_Plane* IMG_Stat::addPlane | ( | const char * | name, | |
| IMG_DataType | d, | |||
| IMG_ColorModel | cm, | |||
| const char * | c0name = 0, |
|||
| const char * | c1name = 0, |
|||
| const char * | c2name = 0, |
|||
| const char * | c3name = 0 | |||
| ) |
Add a plane to an image file. Add a plane to the image file. This is only used when writing files. Plane names must be unique. To write a file, at least one plane must be present.
| int IMG_Stat::bytesPerImage | ( | ) | const |
| int IMG_Stat::bytesPerPixel | ( | ) | const |
| int IMG_Stat::bytesPerPlaneScan | ( | int | i | ) | const |
| int IMG_Stat::bytesPerPlaneScan | ( | const IMG_Plane & | pi | ) | const |
| int IMG_Stat::bytesPerScanline | ( | ) | const |
| void IMG_Stat::clearDataWindow | ( | ) |
Manipulate the data window of an image. The data window is constant across all planes. It may be smaller than the actual resolution (crop region) or larger. The data window is inclusive in that x2 and y2 are part of the region. You can also use the UT_DimRect versions for easier manipulations of the area. Image data is only defined for the area contained by the data window. By default, it is (0,0) - (xres-1, yres-1) (the entire image).
| void IMG_Stat::copy | ( | const IMG_Stat & | src | ) |
| fpreal IMG_Stat::getAspectRatio | ( | ) | const [inline] |
Pixel aspect ratio of the file (X/Y). Square pixels are 1.0 (default).
Definition at line 89 of file IMG_Stat.h.
| void IMG_Stat::getBackgroundColor | ( | fpreal | col[4] | ) | const |
The image data outside the data window can be represented one of two ways: with a constant color, or by streaking the edges of the window.
| bool IMG_Stat::getBackgroundStreak | ( | ) | const [inline] |
The image data outside the data window can be represented one of two ways: with a constant color, or by streaking the edges of the window.
Definition at line 194 of file IMG_Stat.h.
| static const char* IMG_Stat::getColorModel | ( | IMG_ColorModel | cm | ) | [static] |
| int IMG_Stat::getDataHeight | ( | ) | const |
This returns the height of the image. If no data window is present, then this is Yres. If a data window is present, then this is the height of the data window.
| static const char* IMG_Stat::getDataType | ( | IMG_DataType | dt | ) | [static] |
| int IMG_Stat::getDataWidth | ( | ) | const |
This returns the width of the image. If no data window is present, then this is Xres. If a data window is present, then this is the width of the data window.
| void IMG_Stat::getDataWindow | ( | int & | x1, | |
| int & | y1, | |||
| int & | x2, | |||
| int & | y2 | |||
| ) | const |
Get the data window of an image.
| void IMG_Stat::getDataWindow | ( | UT_DimRect & | r | ) | const |
Get the data window of an image.
| const UT_String& IMG_Stat::getFilename | ( | ) | const [inline] |
filename of the opened file. Files attached to streams may not have a filename.
Definition at line 97 of file IMG_Stat.h.
| fpreal IMG_Stat::getFPS | ( | ) | const [inline] |
| int IMG_Stat::getNumFrames | ( | ) | const [inline] |
Definition at line 208 of file IMG_Stat.h.
| int IMG_Stat::getNumPlanes | ( | ) | const |
Returns the number of image planes in the image a plane contains the actual structure of the image data. An image needs at least one. Deep rasters can have multiple planes.
| IMG_Plane* IMG_Stat::getPlane | ( | int | i = 0 |
) | const |
| int IMG_Stat::getPlaneIndex | ( | const char * | name | ) | const |
Returns the index of the plane with 'name' Returns the index of the plane with name 'name', or -1 if not found.
| IMG_Plane* IMG_Stat::getPlaneName | ( | const char * | name | ) | const |
Get an image plane by name Returns the plane with name 'name', or NULL if no matching plane is found.
| unsigned IMG_Stat::getXres | ( | ) | const [inline] |
Sets the resolution for the image, if not specified by the constructor. Used only when writing.
Definition at line 82 of file IMG_Stat.h.
| unsigned IMG_Stat::getYres | ( | ) | const [inline] |
Sets the resolution for the image, if not specified by the constructor. Used only when writing.
Definition at line 83 of file IMG_Stat.h.
| bool IMG_Stat::hasDataWindow | ( | ) | const |
Returns true if the image has a data window.
| bool IMG_Stat::isEnvMap | ( | ) | const [inline] |
isEnvMap() will return true, only if the image is an environment map.
Definition at line 142 of file IMG_Stat.h.
Definition at line 66 of file IMG_Stat.h.
| int IMG_Stat::planeOffset | ( | int | i | ) | const |
| int IMG_Stat::planeOffset | ( | const IMG_Plane & | pi | ) | const |
| void IMG_Stat::removeAllPlanes | ( | ) |
Remove all planes from the stat. Used only for writing files.
| void IMG_Stat::removePlane | ( | const char * | name | ) |
Remove a plane by index from the stat. Used only for writing files.
| void IMG_Stat::removePlane | ( | int | pindex | ) |
Remove a plane by index from the stat. Used only for writing files.
| void IMG_Stat::reorderPlane | ( | IMG_Plane * | plane, | |
| int | beforeindex | |||
| ) |
Alters the order of planes in the stat.
| void IMG_Stat::setAspectRatio | ( | fpreal | aspect | ) | [inline] |
Pixel aspect ratio of the file (X/Y). Square pixels are 1.0 (default).
Definition at line 88 of file IMG_Stat.h.
| void IMG_Stat::setBackgroundColor | ( | fpreal | col[4] | ) |
The image data outside the data window can be represented one of two ways: with a constant color, or by streaking the edges of the window.
| void IMG_Stat::setBackgroundStreak | ( | bool | streak | ) | [inline] |
The image data outside the data window can be represented one of two ways: with a constant color, or by streaking the edges of the window.
Definition at line 192 of file IMG_Stat.h.
| void IMG_Stat::setDataWindow | ( | int | x1, | |
| int | y1, | |||
| int | x2, | |||
| int | y2 | |||
| ) |
Manipulate the data window of an image. The data window is constant across all planes. It may be smaller than the actual resolution (crop region) or larger. The data window is inclusive in that x2 and y2 are part of the region. You can also use the UT_DimRect versions for easier manipulations of the area. Image data is only defined for the area contained by the data window. By default, it is (0,0) - (xres-1, yres-1) (the entire image).
| void IMG_Stat::setDataWindow | ( | const UT_DimRect & | win | ) |
Manipulate the data window of an image. The data window is constant across all planes. It may be smaller than the actual resolution (crop region) or larger. The data window is inclusive in that x2 and y2 are part of the region. You can also use the UT_DimRect versions for easier manipulations of the area. Image data is only defined for the area contained by the data window. By default, it is (0,0) - (xres-1, yres-1) (the entire image).
| bool IMG_Stat::setEnvMap | ( | ) |
Sets the environment flag, if the image planes can be treated as an environment map.
| void IMG_Stat::setFilename | ( | const char * | name | ) | [inline] |
filename of the opened file. Files attached to streams may not have a filename.
Definition at line 96 of file IMG_Stat.h.
| void IMG_Stat::setFPS | ( | fpreal | fps | ) | [inline] |
| void IMG_Stat::setNumFrames | ( | int | nf | ) | [inline] |
Definition at line 211 of file IMG_Stat.h.
| void IMG_Stat::setResolution | ( | unsigned | xres, | |
| unsigned | yres | |||
| ) | [inline] |
Sets the resolution for the image, if not specified by the constructor. Used only when writing.
Definition at line 76 of file IMG_Stat.h.
1.5.9