Volume Miscalculation

In the scene file that you have uploaded, the volume spacing was [0.016, 0.016, 1.0]. I have changed it to [0.016, 0.016, 0.016] in Volumes module then saved it as both .mrml and mrb. In both cases, the spacing was saved in the 504_16-perfect-TOF.VOX256.nrrd image file correctly (as [0.016, 0.016, 0.016]) and after loading the scene or the image file, the spacing was correct again ([0.016, 0.016, 0.016]).

Is it possible that you may have chosen a different filename when you saved the image? Or maybe you have not saved it after changing the spacing? If you can reproduce the incorrect behavior (not saving modified spacing into the nrrd file) then let us know.

Note that volume spacing is not saved in the .mrml file but in the image (.nrrd) file, and only if you choose to save the image file (saving should be offered by default after you change spacing and open the save data window).

Hi,

The filename was not changed. I had cropped the image after changing spacing since the voxel size is 16 microns, and the image became very small. Then, I performed the segmentation, and saved the scene after I finished. As a result, the .nrrd image file is saving the cropped version of the image and using its volume information. Is the segmentation going to be saved in the .nnrd image file as well?

Thanks

Your previous thread indicated data came as a JPG sequence. Since JPG doesn’t contain the image spacing, you need to manually enter 0.016 to all three fields right after the import and then save the NRRD file. My suspicion is you never actually saved the imported volume in NRRD file and scene file (MRML) just points out to the JPG stack and you are loosing the spacing information every time you open the MRML file (it essentially re-imports everything). That would be my guess as why your spacing changes after reload (since image spacing information is contained in NRRD file, not in the MRML).

As for image getting small after you are entering the correct spacing, you can use the ‘center field of view’ button to fix that.

image

That is probably why I have been losing the image information. Also thanks for letting me know about the centering function.

I appreciate the help from both of you. Thank you so much for being so patient. Looking forward to working more with Slicer.

1 Like

No problem. If your data routinely comes in the form of image sequence (jpg or other formats). I highly encourage you to install SlicerMorph extension and use the ImageStacks module for importing that. You can specify spacing at the time of import (not after), and you do not have to do the vector to scaling conversion to use the segment editor or the volume rendering.

Just installed the extension. Thanks for letting me know about it!