Change crosshair color?

Is there a way in python to change the color of the crosshair from yellow to something else?

The color of the crosshair seems to be hardcoded here:

There are other properties that are not harcoded (e.g., crosshairThickness):

The latter property can be changed in python simply by:

crosshairNode = getNode('Crosshair')

Parameterizing the color so it becomes available in python should be easy. @pieper, @lassoan does it make sense to parameterize the color?

Yes, it would make perfect sense to parameterize the color. It could exactly follow the same pattern as the other parameters.

@hherhold What color are you interested in changing it to? A different color just on personal preference? Or different color based on a certain set of conditions?

Just out of curiosity. Shouldn’t the vtkMRMLCrosshairNode have avtkMRMLCrosshairDisplayNode, and shouldn’t there be a vtkMRMLCrosshairDisplayableManager2D?

We usually separate display properties into display nodes when there’s a lot of bulk data in the node itself but here it’s sort of intrinsic to the node itself and there isn’t much else. One reason to separate would be if we wanted the same node to have different displays in different views (i.e. inherit from vtkMRMLDisplayableNode but I guess that hasn’t ever come up.

Looks like we weren’t completely consistent in the naming of the different types of displayable managers: Slicer: vtkMRMLAbstractDisplayableManager Class Reference

Just a different color based on conditions, the ones at the moment being a screen capture for a figure for a paper. The yellow doesn’t show up that well, but I was able to work around it by annotating in Illustrator.

This isn’t super high priority - just wondering if there was something I was missing while grepping through the code.

What color did you decide to use to improve the figure for your paper?

I wound up leaving it in as yellow, rather than trying to draw over it in a different color. It was a bit obscured by other geometry, so I added a labeled line in Illustrator to point out the particular morphology I was trying to highlight.