Regardless of what voxel values you set in a volume that is displayed using “gray” colormap then the volume will still always appear as shades of gray.
What are you trying to achieve: show a colored overlay (segmentation, markups, etc.) on the volume for highlighting something, or change the CT volume content? What is the clinical application and your overall goal?
Functional goals:Multiple markers are affixed to the patient’s skin (markers can be recognized in CT and displayed in CT images) . We want to set the image threshold via the Python script (only marks on the skin will be labeled) . Automatically creates a segment for each tag and gets the center of mass for each segment as A,A’,A’',…gets the coordinates of each center of mass
You can make the marker detection fully automatic quite easily:
threshold the image (you can use Segment Editor for these first few steps, first manually, then automate using Python scripting)
apply some global smoothing (median, maybe Gaussian) if needed
split each island to a separate segment using Island effect; set the minimum size just slightly smaller than the fiducial marker’s volume
use Segment statistics module to compute shape and size metrics (this can be scripted, too); by checking oriented bounding box size, flatness, roundness, elongation you can determine which segments correspond to fiducial marker
Segment statistics module also provides the centroid of each segment that you can use in the Fiducial registration module to compute the transform between the phantom’s coordinate system and the image coordinate system.
All the steps can be executed using the GUI and I would recommend to start with that. Once you have figured out a robust workflow then you can write a short Python script that automates all the steps. THe script repository is a good starting point, but if you get stuck at any point then you can ask for help here.