SoVolumeReaderGetSubVolume Method |
Namespace: OIV.LDM.Readers
public virtual bool GetSubVolume( SbBox3i32 subVolume, SbVec3i32 actualSubsampleLevel, SbNativeArray data )
Given the subVolume that VolumeViz needs, the reader should either copy the data using the reference VolumeViz gives (if its copyPolicy is COPY) or just set the data object to where the data is present in memory (if its copyPolicy is NO_COPY).
If the reader is unable to return data at the requested subsample level, VolumeViz will automatically subsample the data that the reader provides. (This was the only supported behavior in Version 3.0.)
If the reader returns data that's at the requested (or lower) resolution, VolumeViz will use that data without additional processing. This allows you to avoid the overhead of subsampling and is also a way to force VolumeViz to use lower resolution data.
Generally, if you implement GetSubVolume, you must also implement #GetSubVolumeInfo. If not, then you must return full resolution data and copy it using the reference that VolumeViz gives.