![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Structure to manage image buffer. More...
#include <Image_PixMapData.hxx>

Public Member Functions | |
| Image_PixMapData () | |
| Empty constructor. | |
| bool | Init (const occ::handle< NCollection_BaseAllocator > &theAlloc, const size_t theSizeBPP, const size_t theSizeX, const size_t theSizeY, const size_t theSizeRowBytes, uint8_t *theDataPtr) |
| Initializer. | |
| bool | Init (const occ::handle< NCollection_BaseAllocator > &theAlloc, const size_t theSizeBPP, const NCollection_Vec3< size_t > &theSizeXYZ, const size_t theSizeRowBytes, uint8_t *theDataPtr) |
| Initializer. | |
| void | ZeroData () |
| Reset all values to zeros. | |
| const uint8_t * | Row (const size_t theRow) const |
| Return data pointer to requested row (first column). | |
| uint8_t * | ChangeRow (const size_t theRow) |
| Return data pointer to requested row (first column). | |
| const uint8_t * | Value (const size_t theRow, const size_t theCol) const |
| Return data pointer to requested position. | |
| uint8_t * | ChangeValue (size_t theRow, size_t theCol) |
| Return data pointer to requested position. | |
| const uint8_t * | ValueXY (size_t theX, size_t theY) const |
| Return data pointer to requested position. | |
| uint8_t * | ChangeValueXY (size_t theX, size_t theY) |
| Return data pointer to requested position. | |
| const uint8_t * | Slice (size_t theSlice) const |
| Return data pointer to requested 2D slice. | |
| uint8_t * | ChangeSlice (size_t theSlice) |
| Return data pointer to requested 2D slice. | |
| const uint8_t * | SliceRow (size_t theSlice, size_t theRow) const |
| Return data pointer to requested row (first column). | |
| uint8_t * | ChangeSliceRow (size_t theSlice, size_t theRow) |
| Return data pointer to requested row (first column). | |
| const uint8_t * | ValueXYZ (size_t theX, size_t theY, size_t theZ) const |
| Return data pointer to requested position. | |
| uint8_t * | ChangeValueXYZ (size_t theX, size_t theY, size_t theZ) |
| Return data pointer to requested position. | |
| size_t | MaxRowAligmentBytes () const |
| Compute the maximal row alignment for current row size. | |
| 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! | |
Public Member Functions inherited from NCollection_Buffer | |
| NCollection_Buffer (const occ::handle< NCollection_BaseAllocator > &theAlloc, const size_t theSize=0, uint8_t *theData=nullptr) | |
| Default constructor. When theData is NULL but theSize is not 0 than buffer of specified size will be allocated. | |
| ~NCollection_Buffer () override | |
| Destructor. | |
| const uint8_t * | Data () const noexcept |
| uint8_t * | ChangeData () noexcept |
| bool | IsEmpty () const noexcept |
| size_t | Size () const noexcept |
| Return buffer length in bytes. | |
| const occ::handle< NCollection_BaseAllocator > & | Allocator () const noexcept |
| void | SetAllocator (const occ::handle< NCollection_BaseAllocator > &theAlloc) |
| Assign new buffer allocator with de-allocation of buffer. | |
| bool | Allocate (const size_t theSize) |
| Allocate the buffer. | |
| void | Free () |
| De-allocate buffer. | |
| virtual void | DumpJson (Standard_OStream &theOStream, int theDepth=-1) const |
| Dumps the content of me into the stream. | |
Public Member Functions inherited from Standard_Transient | |
| Standard_Transient () | |
| Empty constructor. | |
| Standard_Transient (const Standard_Transient &) | |
| Copy constructor – does nothing. | |
| Standard_Transient & | operator= (const Standard_Transient &) |
| Assignment operator, needed to avoid copying reference counter. | |
| virtual | ~Standard_Transient ()=default |
| Destructor must be virtual. | |
| virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
| Returns a type descriptor about this object. | |
| bool | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
| Returns a true value if this is an instance of Type. | |
| bool | IsInstance (const char *const theTypeName) const |
| Returns a true value if this is an instance of TypeName. | |
| bool | 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. | |
| bool | IsKind (const char *const 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. | |
| 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. | |
| int | GetRefCount () const noexcept |
| Get the reference counter of this object. | |
| void | IncrementRefCounter () noexcept |
| Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations. | |
| int | DecrementRefCounter () noexcept |
| Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement. | |
| virtual void | Delete () const |
| Memory deallocator for transient classes. | |
Data Fields | |
| size_t | SizeBPP |
| bytes per pixel | |
| size_t | SizeX |
| width in pixels | |
| size_t | SizeY |
| height in pixels | |
| size_t | SizeZ |
| depth in pixels | |
| size_t | SizeRowBytes |
| number of bytes per line (in most cases equal to 3 * sizeX) | |
| size_t | SizeSliceBytes |
| number of bytes per 2D slice | |
| size_t | TopToDown |
| image scanlines direction in memory from Top to the Down | |
Protected Attributes | |
| uint8_t * | myTopRowPtr |
| pointer to the topmost row (depending on scanlines order in memory) | |
Protected Attributes inherited from NCollection_Buffer | |
| uint8_t * | myData |
| data pointer | |
| size_t | mySize |
| buffer length in bytes | |
| occ::handle< NCollection_BaseAllocator > | myAllocator |
| buffer allocator | |
Additional Inherited Members | |
Public Types inherited from Standard_Transient | |
| typedef void | base_type |
| Returns a type descriptor about this object. | |
Static Public Member Functions inherited from Standard_Transient | |
| static constexpr const char * | get_type_name () |
| Returns a type descriptor about this object. | |
| static const opencascade::handle< Standard_Type > & | get_type_descriptor () |
| Returns type descriptor of Standard_Transient class. | |
Structure to manage image buffer.
|
inline |
Empty constructor.
Return data pointer to requested row (first column).
Return data pointer to requested 2D slice.
Return data pointer to requested row (first column).
Return data pointer to requested position.
Return data pointer to requested position.
Return data pointer to requested position.
|
inline |
Initializer.
|
inline |
Initializer.
|
inline |
Compute the maximal row alignment for current row size.
Return data pointer to requested row (first column).
Setup scanlines order in memory - top-down or bottom-up. Drawers should explicitly specify this value if current state IsTopDown() was ignored!
| theIsTopDown | top-down flag |
Return data pointer to requested 2D slice.
Return data pointer to requested row (first column).
Return data pointer to requested position.
Return data pointer to requested position.
Return data pointer to requested position.
|
inline |
Reset all values to zeros.
|
protected |
pointer to the topmost row (depending on scanlines order in memory)
| size_t Image_PixMapData::SizeBPP |
bytes per pixel
| size_t Image_PixMapData::SizeRowBytes |
number of bytes per line (in most cases equal to 3 * sizeX)
| size_t Image_PixMapData::SizeSliceBytes |
number of bytes per 2D slice
| size_t Image_PixMapData::SizeX |
width in pixels
| size_t Image_PixMapData::SizeY |
height in pixels
| size_t Image_PixMapData::SizeZ |
depth in pixels
| size_t Image_PixMapData::TopToDown |
image scanlines direction in memory from Top to the Down