Change colour of the ruler in the 3D orthographic model

Dear all,

First of all, I would like to take this opportunity to congratulate you in the making of this excellent software. It is helping me a lot in achieving my segmentation tasks and creating high quality images.

I am posting this question today because I am unable to find an option to change the colour of the ruler. It is white by default and, when I change the background colour to white, the ruler gets lost with it.

Is there an easy way of making this ruler black? I found the below thread where the user was able to change it to yellow from the “pin options”, but I do not find these options.

Unfortunately, I am a very basic user and I do not know how to manipulate the vtkMRMLAbstractViewNode from the Python terminal.

I would really appreciate your support or any suggestions you may have.

Thank you very much and I wish you a lovely day.

Best regards,

Daniel.

In slice view you control the color of the ruler from here:
image
and in 3D from here:

image

Even more detail (I needed to look for myself since I haven’t used that menu in a long time)

Here is an example for setting the first 3D View to have a thin black ruler. You can try this out with the python terminal.

three_d_view_node = slicer.app.layoutManager().threeDWidget(0).mrmlViewNode()  # 3D View "1"
three_d_view_node.setRulerType(slicer.vtkMRMLAbstractViewNode.RulerTypeThin)
three_d_view_node.setRulerColor(slicer.vtkMRMLAbstractViewNode.RulerColorBlack)

Dear all,

Thank you for your very detailed answers. I was confused at first because my ruler options are a bit more limited than the ones you showed in your screenshots. Please refer to the below snip from my 3D Slicer

image

Additionally, I tried to put the lines of code that @jamesobutler suggested in the Python terminal but it throws the following error after I execute the second line:

Traceback (most recent call last):
File “”, line 1, in
AttributeError: ‘MRMLCorePython.vtkMRMLViewNode’ object has no attribute ‘setRulerType’

Thank you again for your really kind answers and help. I do not understand why the colour options are missing in my software, should I attempt to reinstall 3D Slicer?

By the way, I am using the latest version of 3D Slicer: 4.10.2 r28257

Thank you very much to everyone that posted an answer, you are very kind.

Best regards,

Daniel.

Hi Daniel -

Probably you are using the current release 4.10.2 but the feature has been updated in the current nightly preview versions (4.11, to be released as 5.0).

Let us know if that doesn’t solve it for you.

Dear all and @pieper,

Indeed, downloading the 4.11 release allowed me to make these changes.

Thank you all for your fantastic support, I wish you a lovely day.

Best regards,

Daniel.