Class SoVRMemoryWriter

  • All Implemented Interfaces:

    public class SoVRMemoryWriter
    extends SoVolumeWriter
    Write data in memory. This writer is the writer corresponding to SoVRMemoryReader. It writes data in the data buffer. You can manually specify this buffer. Else, a buffer will be created in the initialize() method. This writer does not organize data on tiles (isDataConverted returns false). So you must use the writeSubSlice method and write data slice by slice.

    Do not use the writeTile method with this writer.

    SoVRMemoryReader can return an instance of this class already configured to write into the same area of memory.

    Padding can be used to add zeros around the slice to align them in memory:

     |xxxxxxxxxxx|      |
     |xxxxxxxxxxx|      |
     |xxxxxxxxxxx|      |
     |___________|      |
     |                  |
         slice    padding

    See Also:
    SoVRMemoryReader, SoVolumeWriter, SoVRLdmFileWriter
    • Field Detail

      • data

        public final SoSFBufferObject data
        Buffer containing data. If specified, it must be the right size (nbVoxel * dataSize, by taking padding in account). If NULL, it will be allocated in the initialize() method and deleted in destructor. default is NULL.
      • padding

        public final SoSFVec2s padding
        Padding over x and y dimension, use to align slice data in memory. default is (0, 0).
    • Constructor Detail

      • SoVRMemoryWriter

        public SoVRMemoryWriter()