Hello, I am using Slicer-4.11.20210226-linux-amd64 to create segmentations data to train a segmentation algorithm to automatically segment the fat depots in CT scan. The dimensions of the saved 3D segmentation file (rows, columns, slices) doesn’t match the original volume nrrd dimensions which is causing problems in my algorithm.
I am a software engineer and do not have much knowledge of Slicer, I tried few solutions available online but they don’t work. Could you please let me know if there is a way to save the segmentation files with same dimensions as the original nrrd volume file in Slicer?
@ mau_igna_06 Thank you for your response!! I tried setting up the reference volume argument in Slicer and export the labelmaps, but the labelmap file is mostly empty while I have the segmentations labelled in the segmentation nrrd file. And saving the the segmentation file with reference volume set doesn’t update the dimensions. Below are the steps I am following:
Load the original volume nrrd and segmentation nrrd files on Slicer
Go to Segmentations > Advanced > Export/Import models and labelmaps, change the reference volume to the original nrrd volume.
Save the segmentation file in nrrd format (at place of seg.nrrd format).
Could you please let me know if I am missing any steps, or where exactly on Slicer I have to set up the reference volume to make it work?
I think you almost have it. Just set up ExportedSegments==All on advanced section, click on the export button and the resulting labelmap will be the volume you want to save as seg.nrrd
Thank you !! ExportedSegments==All, is already set up on Advanced section. But I think I know what is causing the issue, I noticed that the “space directions” and the “space origin” were also different in the two files (original nrrd and the corresponding segmentation nrrd). Maybe that’s why it wasn’t picking up the labels and the resulting labelmap was empty !? I corrected both tags to match on both files and now I am able to export the labelmap fine.