Class SoMemoryDataAdapter

    • Constructor Detail

      • SoMemoryDataAdapter

        public SoMemoryDataAdapter()
        Default constructor. Init an image with one voxel unit of one component of type UNSIGNED_BYTE.

        Please use createMemoryDataAdapter() to create a Memory adapter from existing block of memory.

    • Method Detail

      • getBufferObject

        public SoBufferObject getBufferObject()
        Returns the buffer object containing the image data. Data are stored line by line, slice by slice, channels in CONTIGUOUS_PER_PIXEL.
      • createMemoryDataAdapter

        public static SoMemoryDataAdapter createMemoryDataAdapter​(SbVec4i32 dimension,
                                                                  SbImageDataType imageInfos,
                                                                  SoMemoryDataAdapter.LayerOrganizations organization,
                                                                  SoBufferObject data)
        Factory method that creates an adapter from an existing block of memory. Note: An SoMemoryDataAdapter stores its data in CONTIGUOUS_PER_PIXEL. Data may be copied and reorganized if LayerOrganization is not CONTIGUOUS_PER_PIXEL.

        Parameters:
        dimension - Dimension of the buffer (width, height, depth, timestep).

        imageInfos - Define the format type of data.

        organization - Define the organization of layers.

        data - Buffer object to map. If data is NULL, a buffer is automatically allocated and its values are initialized to 0.