I modified XTK's lesson 13 to load DICOM images from my desktop and do volume rendering.
Although it is working fine, I noticed that the X.volume object is holding nearly 4 times the total size of pixel data in the DICOM images. Is it an expected behavior, and if not then what is the correct method to do this?
Found out that XTK initializes 4 unique volume objects, which leads to this behavior. However it needs only the X.volume._IJKVolume
object for the final rendering, and rest of the volume objects (i.e. X.volume.slices
, X.volume.data
and X.volume._IJKVolumeN
) are no more needed after X.volume._IJKVolume
is created.