OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    Image_PixMapTypedData< PixelType_t > Class Template Reference

    Structure to manage image buffer with predefined pixel type. More...

    #include <Image_PixMapTypedData.hxx>

    Inheritance diagram for Image_PixMapTypedData< PixelType_t >:

    Public Member Functions

     Image_PixMapTypedData ()=default
     Empty constructor.
    bool Init (const occ::handle< NCollection_BaseAllocator > &theAlloc, size_t theSizeX, size_t theSizeY, size_t theSizeRowBytes=0, uint8_t *theDataPtr=nullptr)
     Initializer.
    void Init (const PixelType_t &theValue)
     Reset all values to specified one.
    const PixelType_t * Row (size_t theRow) const
    PixelType_t * ChangeRow (size_t theRow)
    const PixelType_t & Value (size_t theRow, size_t theCol) const
    PixelType_t & ChangeValue (size_t theRow, size_t theCol)
    Public Member Functions inherited from Image_PixMapData
     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.

    Additional Inherited Members

    typedef void base_type
     Returns a type descriptor about this object.
    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.
    Data Fields inherited from Image_PixMapData
    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 inherited from Image_PixMapData
    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

    Detailed Description

    template<typename PixelType_t>
    class Image_PixMapTypedData< PixelType_t >

    Structure to manage image buffer with predefined pixel type.

    Constructor & Destructor Documentation

    ◆ Image_PixMapTypedData()

    template<typename PixelType_t>
    Image_PixMapTypedData< PixelType_t >::Image_PixMapTypedData ( )
    default

    Empty constructor.

    Member Function Documentation

    ◆ ChangeRow()

    template<typename PixelType_t>
    PixelType_t * Image_PixMapTypedData< PixelType_t >::ChangeRow ( size_t theRow)
    inline
    Returns
    data pointer to requested row (first column).

    ◆ ChangeValue()

    template<typename PixelType_t>
    PixelType_t & Image_PixMapTypedData< PixelType_t >::ChangeValue ( size_t theRow,
    size_t theCol )
    inline
    Returns
    data pointer to requested position.

    ◆ Init() [1/2]

    template<typename PixelType_t>
    bool Image_PixMapTypedData< PixelType_t >::Init ( const occ::handle< NCollection_BaseAllocator > & theAlloc,
    size_t theSizeX,
    size_t theSizeY,
    size_t theSizeRowBytes = 0,
    uint8_t * theDataPtr = nullptr )
    inline

    Initializer.

    ◆ Init() [2/2]

    template<typename PixelType_t>
    void Image_PixMapTypedData< PixelType_t >::Init ( const PixelType_t & theValue)
    inline

    Reset all values to specified one.

    ◆ Row()

    template<typename PixelType_t>
    const PixelType_t * Image_PixMapTypedData< PixelType_t >::Row ( size_t theRow) const
    inline
    Returns
    data pointer to requested row (first column).

    ◆ Value()

    template<typename PixelType_t>
    const PixelType_t & Image_PixMapTypedData< PixelType_t >::Value ( size_t theRow,
    size_t theCol ) const
    inline
    Returns
    data pointer to requested position.

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