Alternate glyph shapes for Markups?

Hi,

Right now in Slicer 4.11, there are two options for 3D Glyph Types: Sphere3D and Diamond3D.

Can someone point me in the right direction for how to add or for code that I could use to add more 3D shapes?

Thank you!

Actually, there are many other shapes and they all show up in 3D. I agree that as of now they are not optimal, as their normal is set to a fixed RAS=(0,0,1) direction. It would make more sense if the normal would be set when the point is placed (e.g., it could be the slice, surface, or camera plane normal), or there could be a mode to orient the glyphs to always face the camera. Rather than just add some new sources Would you be interested in working on this? What would be the glyph shapes that you would like to have in 2D and 3D views?

Sure, what would that involve?

I don’t need any particular shapes but would like to have a variety in one scene to represent different data sets.

Thanks!

I’ve checked VTK’s glyph filter, which is used for displaying the markers in 3D views and found that it is quite easy to add a new display mode, which orients glyphs to always face the camera. This will allow using all the “2D” shapes in 3D views, too. I’ll start the integration now, it will probably take 1-2 weeks (as this has to be merged into VTK first and then into Slicer).

VTK pull request: https://gitlab.kitware.com/vtk/vtk/-/merge_requests/6586
Slicer pull request: https://github.com/Slicer/Slicer/pull/4736

The changes have been merged and will be available in Slicer Preview Releases downloaded March 19 or later.

2 Likes

thank you! this worked well

1 Like

I did notice one thing that fix might have changed. Now the markups are present on every slice on the 2D views instead of only where they exist (i.e.: if you scroll through the dicom, the markups are on every slice). Would this be easy to fix?

Nothing has changed related to visibility of markups in slice views. Maybe you have enabled “projection” in advanced display settings.