Changing location of label for fiducial points

Hi all,

I’m new to slicer, so apologies if this question is basic. I’ve been reading the documentation, but haven’t been able to figure this out.

I need to annotate an image by marking several points. However, these points are extremely close to each other in the image. When I add points with labels, the labels overlap and become unreadable, no matter how small I make the text.

Is there any way that the label could be moved away from the point itself, perhaps with a line pointing to the marker? Here is an example of what is happening:

Screen Shot 2021-11-12 at 2.22.31 PM

1 Like

Controls for this would be great! I don’t know if they exist, but I run into this problem frequently as well.

Searching through this site, I found this, which might be helpful for you:

1 Like

Looks like many of the features we might find helpful are implemented through vtkTextProperty (VTK: vtkTextProperty Class Reference)

As noted above, orientation can be set with SetOrientation, distance from point (perpendicular to baseline) set with SetLineOffset, and relative positioning to point set via the following:

myMarkupNode.GetDisplayNode().GetTextProperty().SetJustificationToCentered()
myMarkupNode.GetDisplayNode().GetTextProperty().SetJustificationToLeft()
myMarkupNode.GetDisplayNode().GetTextProperty().SetJustificationToRight()
myMarkupNode.GetDisplayNode().GetTextProperty().SetVerticalJustificationToCentered()
myMarkupNode.GetDisplayNode().GetTextProperty().SetVerticalJustificationToBottom()
myMarkupNode.GetDisplayNode().GetTextProperty().SetVerticalJustificationToTop()

None of these will produce a line connecting the label with the point, but otherwise, there is a fair amount of flexibility here.

Text size is defined in screen space, so you can make the labels non-overlapping by zooming in or reducing the text size.

Making the labels manually movable would be complicated to implement, especially because in each view the labels would need to be moved in different directions. But at some point we are going to implement this.

If you find that changing text orientation makes a big difference then submit a feature request for it at issues.slicer.org.

Hello, neuralnet.
I’m pretty new to Slicer too, so take the following suggestions with a grain of salt…

I’m not sure whether it helps in your case, but I found that sometimes it’s helpful to rotate the 3D view so that features are arranged more in a vertical line (so it ends up looking like bullets on a PowerPoint slide) rather than in a horizontal line.
Perhaps there is a similar trick that would help for a 2D slice?

Other than that, you could possibly add the points to different ‘nodes’, so that it is easier to show only some markers, and easier to give them distinct colours, rather than having them all toggled on (i.e. visible) together and all in the same colour.

One more thing: you can shrink the size of the points (set Glyph size in the Display panel of the Markups module). From what I can see in your screenshot, this might help a little where the labels are being printed over the top of other points (which are all in the same colour).
[Possibly it might also help if the text could be a different colour from the markers, in your case, but I don’t know whether that can be done in Slicer.]

—DIV

1 Like

@mikebind wow!! thank you, this is hugely helpful

Thank you, Dr. Lasso!

@mikebind thank you!

Hi DIV,

This is a great strategy. I will try it out! Thank you!