Hi slicer experts,
There are 100 coordinates in a file named 1,2,3,…100. I want to make one point’s color is different from others. For example, point 1st to 5th is red, and the 6th is yellow, the left (7th-100th) is invisible.
I load the coordinates into Slicer, firstly.
mDisplayNode = getNode('vtkMRMLMarkupsFiducialNode1').GetDisplayNode()
Now, I want to change the point color one by one, but it will change the color of all points by using:
Does anyone know how to select one point and set the corresponding property?
Thanks is advance.
Within the markup list you can set each fiducial selected or not and that will change between two colors:
Thanks Pieper. Yes , it works.
Do you know how to change the size of the selected fiducial?
I use the following function, but it will change all fiducial points in the list. I want to adjust size of the selected point only.
Thanks in advance.
Currently it is not possible to set different scale or color options for fiducials in a single fiducial list. If you need to do that, you will have to break apart your list. (i.e., clone your existing one, or create a new empty list, and copy/paste from the original).
You can also create a model node with arbitrarily scaled and colored spheres, using vtkGlyph3D filter. It probably takes just a couple of lines of Python code to create a model from a point list.
If you have a script that does what you need, you can create a small Python-scripted module from it by following developer tutorials.
Thanks for all your suggestions and help. It is very useful.