Image class that support file reading/writing operations using auxiliary image library. Supported image formats:
More...
|
| Image_AlienPixMap () |
| Empty constructor. More...
|
|
virtual | ~Image_AlienPixMap () |
| Destructor. More...
|
|
bool | Load (const TCollection_AsciiString &theFileName) |
| Read image data from file. More...
|
|
bool | Load (std::istream &theStream, const TCollection_AsciiString &theFileName) |
| Read image data from stream. More...
|
|
bool | Load (const Standard_Byte *theData, Standard_Size theLength, const TCollection_AsciiString &theFileName) |
| Read image data from memory buffer. More...
|
|
bool | Save (const TCollection_AsciiString &theFileName) |
| Write image data to file using file extension to determine compression format. More...
|
|
virtual bool | InitTrash (Image_Format thePixelFormat, const Standard_Size theSizeX, const Standard_Size theSizeY, const Standard_Size theSizeRowBytes=0) override |
| Initialize image plane with required dimensions. thePixelFormat - if specified pixel format doesn't supported by image library than nearest supported will be used instead! theSizeRowBytes - may be ignored by this class and required alignment will be used instead! More...
|
|
virtual bool | InitCopy (const Image_PixMap &theCopy) override |
| Initialize by copying data. More...
|
|
virtual void | Clear () override |
| Method correctly deallocate internal buffer. More...
|
|
bool | AdjustGamma (const Standard_Real theGammaCorr) |
| Performs gamma correction on image. theGamma - gamma value to use; a value of 1.0 leaves the image alone. More...
|
|
Image_Format | Format () const |
| Return pixel format. More...
|
|
void | SetFormat (const Image_Format thePixelFormat) |
| Override pixel format specified by InitXXX() methods. Will throw exception if pixel size of new format is not equal to currently initialized format. Intended to switch formats indicating different interpretation of the same data (e.g. ImgGray and ImgAlpha). More...
|
|
Standard_Size | Width () const |
| Return image width in pixels. More...
|
|
Standard_Size | Height () const |
| Return image height in pixels. More...
|
|
Standard_Size | Depth () const |
| Return image depth in pixels. More...
|
|
Standard_Size | SizeX () const |
| Return image width in pixels. More...
|
|
Standard_Size | SizeY () const |
| Return image height in pixels. More...
|
|
Standard_Size | SizeZ () const |
| Return image depth in pixels. More...
|
|
NCollection_Vec3< Standard_Size > | SizeXYZ () const |
| Return image width x height x depth in pixels. More...
|
|
Standard_Real | Ratio () const |
| Return width / height. More...
|
|
bool | IsEmpty () const |
| Return true if data is NULL. More...
|
|
| Image_PixMap () |
| Empty constructor. Initialize the NULL image plane. More...
|
|
virtual | ~Image_PixMap () |
| Destructor. More...
|
|
Quantity_ColorRGBA | PixelColor (Standard_Integer theX, Standard_Integer theY, Standard_Boolean theToLinearize=false) const |
| Returns the pixel color. This function is relatively slow. Beware that this method takes coordinates in opposite order in contrast to ::Value() and ::ChangeValue(). More...
|
|
void | SetPixelColor (const Standard_Integer theX, const Standard_Integer theY, const Quantity_Color &theColor, const Standard_Boolean theToDeLinearize=false) |
| Sets the pixel color. This function is relatively slow. Beware that this method takes coordinates in opposite order in contrast to ::Value() and ::ChangeValue(). More...
|
|
void | SetPixelColor (const Standard_Integer theX, const Standard_Integer theY, const Quantity_ColorRGBA &theColor, const Standard_Boolean theToDeLinearize=false) |
| Sets the pixel color. This function is relatively slow. Beware that this method takes coordinates in opposite order in contrast to ::Value() and ::ChangeValue(). More...
|
|
bool | InitZero (Image_Format thePixelFormat, const Standard_Size theSizeX, const Standard_Size theSizeY, const Standard_Size theSizeRowBytes=0, const Standard_Byte theValue=0) |
| Initialize image plane with required dimensions. Buffer will be zeroed (black color for most formats). More...
|
|
virtual bool | InitWrapper3D (Image_Format thePixelFormat, Standard_Byte *theDataPtr, const NCollection_Vec3< Standard_Size > &theSizeXYZ, const Standard_Size theSizeRowBytes=0) |
| Initialize 2D/3D image as wrapper over alien data. Data will not be copied! Notice that caller should ensure that data pointer will not be released during this wrapper lifetime. You may call InitCopy() to perform data copying. More...
|
|
virtual bool | InitTrash3D (Image_Format thePixelFormat, const NCollection_Vec3< Standard_Size > &theSizeXYZ, const Standard_Size theSizeRowBytes=0) |
| Initialize 2D/3D image with required dimensions. Memory will be left uninitialized (performance trick). More...
|
|
bool | InitZero3D (Image_Format thePixelFormat, const NCollection_Vec3< Standard_Size > &theSizeXYZ, const Standard_Size theSizeRowBytes=0, const Standard_Byte theValue=0) |
| Initialize 2D/3D image with required dimensions. Buffer will be zeroed (black color for most formats). More...
|
|
bool | IsTopDown () const |
| Returns TRUE if image data is stored from Top to the Down. By default Bottom Up order is used instead (topmost scanlines starts from the bottom in memory). which is most image frameworks naturally support. More...
|
|
void | SetTopDown (const bool theIsTopDown) |
| Setup scanlines order in memory - top-down or bottom-up. Drawers should explicitly specify this value if current state IsTopDown() was ignored! More...
|
|
Standard_Size | TopDownInc () const |
| Returns +1 if scanlines ordered in Top->Down order in memory and -1 otherwise. More...
|
|
const Standard_Byte * | Data () const |
| Return data pointer for low-level operations (copying entire buffer, parsing with extra tools etc.). More...
|
|
Standard_Byte * | ChangeData () |
| Return data pointer for low-level operations (copying entire buffer, parsing with extra tools etc.). More...
|
|
const Standard_Byte * | Row (Standard_Size theRow) const |
| Return data pointer to requested row (first column). Indexation starts from 0. More...
|
|
Standard_Byte * | ChangeRow (Standard_Size theRow) |
| Return data pointer to requested row (first column). Indexation starts from 0. More...
|
|
const Standard_Byte * | Slice (Standard_Size theSlice) const |
| Return data pointer to requested 2D slice. Indexation starts from 0. More...
|
|
Standard_Byte * | ChangeSlice (Standard_Size theSlice) |
| Return data pointer to requested 2D slice. Indexation starts from 0. More...
|
|
const Standard_Byte * | SliceRow (Standard_Size theSlice, Standard_Size theRow) const |
| Return data pointer to requested row (first column). Indexation starts from 0. More...
|
|
Standard_Byte * | ChangeSliceRow (Standard_Size theSlice, Standard_Size theRow) |
| Return data pointer to requested row (first column). Indexation starts from 0. More...
|
|
Standard_Size | SizePixelBytes () const |
| Return bytes reserved for one pixel (may include extra bytes for alignment). More...
|
|
Standard_Size | SizeRowBytes () const |
| Return bytes reserved per row. Could be larger than needed to store packed row (extra bytes for alignment etc.). More...
|
|
Standard_Size | RowExtraBytes () const |
| Return the extra bytes in the row. More...
|
|
Standard_Size | MaxRowAligmentBytes () const |
| Compute the maximal row alignment for current row size. More...
|
|
Standard_Size | SizeSliceBytes () const |
| Return number of bytes per 2D slice. More...
|
|
Standard_Size | SizeBytes () const |
| Return buffer size. More...
|
|
template<typename ColorType_t > |
const ColorType_t & | Value (Standard_Size theRow, Standard_Size theCol) const |
| Access image pixel with specified color type. Indexation starts from 0. This method does not perform any type checks - use on own risk (check Format() before)! WARNING: Input parameters are defined in the decreasing majority following memory layout - e.g. row first, column next. More...
|
|
template<typename ColorType_t > |
ColorType_t & | ChangeValue (Standard_Size theRow, Standard_Size theCol) |
| Access image pixel with specified color type. Indexation starts from 0. This method does not perform any type checks - use on own risk (check Format() before)! WARNING: Input parameters are defined in the decreasing majority following memory layout - e.g. row first, column next. More...
|
|
const Standard_Byte * | RawValue (Standard_Size theRow, Standard_Size theCol) const |
| Access image pixel as raw data pointer. Indexation starts from 0. This method does not perform any type checks - use on own risk (check Format() before)! WARNING: Input parameters are defined in the decreasing majority following memory layout - e.g. row first, column next. More...
|
|
Standard_Byte * | ChangeRawValue (Standard_Size theRow, Standard_Size theCol) |
| Access image pixel as raw data pointer. Indexation starts from 0. This method does not perform any type checks - use on own risk (check Format() before)! WARNING: Input parameters are defined in the decreasing majority following memory layout - e.g. row first, column next. More...
|
|
template<typename ColorType_t > |
const ColorType_t & | ValueXY (Standard_Size theX, Standard_Size theY) const |
| Access image pixel with specified color type. Indexation starts from 0. This method does not perform any type checks - use on own risk (check Format() before)! WARNING: Input parameters are defined in traditional X, Y order. More...
|
|
template<typename ColorType_t > |
ColorType_t & | ChangeValueXY (Standard_Size theX, Standard_Size theY) |
| Access image pixel with specified color type. Indexation starts from 0. This method does not perform any type checks - use on own risk (check Format() before)! WARNING: Input parameters are defined in traditional X, Y order. More...
|
|
const Standard_Byte * | RawValueXY (Standard_Size theX, Standard_Size theY) const |
| Access image pixel as raw data pointer. Indexation starts from 0. This method does not perform any type checks - use on own risk (check Format() before)! WARNING: Input parameters are defined in traditional X, Y order. More...
|
|
Standard_Byte * | ChangeRawValueXY (Standard_Size theX, Standard_Size theY) |
| Access image pixel as raw data pointer. Indexation starts from 0. This method does not perform any type checks - use on own risk (check Format() before)! WARNING: Input parameters are defined in traditional X, Y order. More...
|
|
template<typename ColorType_t > |
const ColorType_t & | ValueXYZ (Standard_Size theX, Standard_Size theY, Standard_Size theZ) const |
| Access image pixel with specified color type. Indexation starts from 0. This method does not perform any type checks - use on own risk (check Format() before)! WARNING: Input parameters are defined in traditional X, Y, Z order. More...
|
|
template<typename ColorType_t > |
ColorType_t & | ChangeValueXYZ (Standard_Size theX, Standard_Size theY, Standard_Size theZ) |
| Access image pixel with specified color type. Indexation starts from 0. This method does not perform any type checks - use on own risk (check Format() before)! WARNING: Input parameters are defined in traditional X, Y, Z order. More...
|
|
const Standard_Byte * | RawValueXYZ (Standard_Size theX, Standard_Size theY, Standard_Size theZ) const |
| Access image pixel as raw data pointer. Indexation starts from 0. This method does not perform any type checks - use on own risk (check Format() before)! WARNING: Input parameters are defined in traditional X, Y, Z order. More...
|
|
Standard_Byte * | ChangeRawValueXYZ (Standard_Size theX, Standard_Size theY, Standard_Size theZ) |
| Access image pixel as raw data pointer. Indexation starts from 0. This method does not perform any type checks - use on own risk (check Format() before)! WARNING: Input parameters are defined in traditional X, Y, Z order. More...
|
|
Public Member Functions inherited from Standard_Transient |
| Standard_Transient () |
| Empty constructor. More...
|
|
| Standard_Transient (const Standard_Transient &) |
| Copy constructor – does nothing. More...
|
|
Standard_Transient & | operator= (const Standard_Transient &) |
| Assignment operator, needed to avoid copying reference counter. More...
|
|
virtual | ~Standard_Transient () |
| Destructor must be virtual. More...
|
|
virtual void | Delete () const |
| Memory deallocator for transient classes. More...
|
|
virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
| Returns a type descriptor about this object. More...
|
|
Standard_Boolean | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
| Returns a true value if this is an instance of Type. More...
|
|
Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
| Returns a true value if this is an instance of TypeName. More...
|
|
Standard_Boolean | IsKind (const opencascade::handle< Standard_Type > &theType) const |
| Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
|
|
Standard_Boolean | IsKind (const Standard_CString theTypeName) const |
| Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
|
|
Standard_Transient * | This () const |
| Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More...
|
|
Standard_Integer | GetRefCount () const |
| Get the reference counter of this object. More...
|
|
void | IncrementRefCounter () const |
| Increments the reference counter of this object. More...
|
|
Standard_Integer | DecrementRefCounter () const |
| Decrements the reference counter of this object; returns the decremented value. More...
|
|
Image class that support file reading/writing operations using auxiliary image library. Supported image formats:
- *.bmp - bitmap image, lossless format without compression.
- *.ppm - PPM (Portable Pixmap Format), lossless format without compression.
- *.png - PNG (Portable Network Graphics) lossless format with compression.
- *.jpg, *.jpe, *.jpeg - JPEG/JIFF (Joint Photographic Experts Group) lossy format (compressed with quality losses). YUV color space used (automatically converted from/to RGB).
- *.tif, *.tiff - TIFF (Tagged Image File Format).
- *.tga - TGA (Truevision Targa Graphic), lossless format.
- *.gif - GIF (Graphical Interchange Format), lossy format. Color stored using palette (up to 256 distinct colors).
- *.exr - OpenEXR high dynamic-range format (supports float pixel formats).