I have created a 3D model from a stack of histological images. Now i would like to texturize/colorize this model by using the original rgb-images. Is there a way to project this “color” information on the model for example by ray casting (like it is done in volume rendering module)? Or any other way how I can achieve this? It should also work if i cut through the model.
As described in the linked post, you need an RGBA volume - the alpha channel containing transparency of voxels. If you want to make the background transparent then set alpha values of the background to 0.
Sorry to bother you again, but where do I have to set the alpha values? In the scalar volume or can I set this in the volume properties? Hope this question isn’t too stupid, but I’m still new to Slicer. Thanks!
There is no GUI for manipulating voxel values, but you can retrieve voxel values in the Python console as a numpy array (using slicer.util.arrayFromVolume), adjust the values of the alpha channel using standard numpy array manipulations, then update the volume with the changes (slicer.util.arrayFromVolumeModified). See example here.
Hello Andras,
that worked well, thanks Is there a way to keep these settings when I save the whole scene as a medical record bundle? Currently, when I reload the scene from the bundle my modifications are not displayed anymore. Display node is observing the volume properties and the volume node.
How can I ensure to reload the scene in exactly the same state as I saved it?
Probably IndependentComponents property is not saved in the file. Probably you would just need to add a couple of lines to vtkMRMLVolumePropertyNode to read/write the property to XML.