Loading Colour Table alongside 3D Models

Hello,

I am currently trying to load 3D models of individual segments (liver, left kidney, right kidney etc) into Slicer but I am losing their original colour attributes. I see that there is an option to load a colour table under the Model module but I cannot currently access it. Is there any other way that I can manually load a colour table into Slicer while my models are loading or is this something I would possibly need to script?

1 Like

Color table is for coloring scalars (data associated with mesh points or cells). If you want to change the overall color of a model then you don’t need color files - the color is stored in the display node associated with the model node. You can set color of a model after loading (modelNode.GetDisplayNode().SetColor(1,0,0)) but if you want to preserve colors then the simplest is to save the scene file and load the models using that scene file.

You can also save segmentations along with colors (and standard DICOM terminology to identify segment content) in private fields by setting master representation in Segmentations module to “Closed surface”.

What is the overall goal of your project? What is your current processing workflow? Why are you considering loading individual segments manually instead of loading via a scene file?

2 Likes

Hi Andras,

I followed your advice and saved it as a scene file and loaded that back into Slicer and it worked. The colours were maintained and we’re able to select which segmented parts we want to view. Thank you again for your help!

2 Likes