I have a NIFTI image of a tract that contains different voxel intensities. In fsleyes, I am able to view the different intensities for each voxel. However, when I import the image into 3D Slicer, the image is displayed with a solid homogeneous colour but Slicer does recognize that there are different voxel intensities within the Data Probe tab. I tried to change the colours in the Display->Lookup Table but with no success. How can I get the colours of the image to reflect the different voxel intensities?
By default, volumes that have single-component voxels are loaded as “scalar volumes” (voxel values are continuous), while it seems that your data is a “labelmap volume” (voxel values are discrete, each value represents one tract). While you can adjust window/level and colormap of a scalar volume so that you can distinguish each integer value, probably you want to load the volume either as a segmentation (if you want to show/hide individual label values, edit them, display in 3D, etc.) or as a labelmap volume (it can handle thousands of values without performance issues, but needs volume rendering for 3D display and cannot easily show/hide individual values).
- Load as a segmentation: in “Add data” dialog, choose “Segmentation” in “Description” column
- Load as labelmap volume: in “Add data” dialog, check “Show options” and check “LabelMap” option. To avoid the need for enabling LabelMap option manually, you can rename the image file so that the filename ends with “-label” (for example, “something-label.nrrd”) and then LabelMap option will be enabled by default.
You can also convert between labelmap and scalar volume in Volumes module -> Volume information section -> Convert to label map.
I would be really interested to see how these tracts look in Slicer. It would be great if you could attach a screenshot of the result.
Thanks for your quick reply. The segmentation option was taking a very long time because of the number of large number of intensity values. However, the labelmap option appeared to work however, the output is slightly different from what I see in fsleyes. I’ve attached screenshots for the corticospinal tract represented both in fsleyes and Slicer. when looking at the Data Probe, the voxel intensity values are similar to what I’m seeing in fsleyes, but the tract voxel intensities are displayed differently. Essentially, the larger the voxel intensity, the brighter the voxel should appear. But I’m not able to display this relationship in Slicer.
Can you upload a sample data set somewhere and post the link here?
Thank you, it was very helpful to see what kind of data you work with. Voxels of this tract volume are actually continuous, so it should be loaded with default settings (as scalar volume). You can then adjust its color mapping and display it as a foreground volume:
Adjust color mapping in Volumes module:
Show tract as foreground volume:
Show tract using volume rendering:
To avoid the need for these 15-20 clicks to set up visualization, you could add a simple Python scripted module, which would load a tract image and set up all the visualization by a single click. You can learn about how to create such module from Slicer programming tutorials. We are here to help if you need any help with it. If this is a common task then we can add it to the FreeSurfer importer module.
Thank you very much Andras, this works exactly. I agree that it would be a good idea to wrap all these steps up in script. I’ll go through the tutorials that you provided and definitely will be in contact with your team should I need help. Thanks again!