New Annotation for Slicer - Splines and Planes

Hi everyone,

We have developed new annotation support for Slicer in the form of Splines and Planes. Here is a preview:

Planes:


Note: Planes annotation are only available in the 3D view

Splines:

These fulfill the needs we have for them, but I don’t think they could be considered “feature complete”. They don’t have a GUI to interact with them for example. Where do you think would be a good idea to share these so the community can have access to it ? As an extension ?

Each of these new annotation uses the Markups nodes as a base. Unfortunately, they don’t have a generic storage node for them yet. We were thinking we should add a one. The plan would be:

  • Add a generic markup storage node to save to JSon
  • Allow subclasses to easily add attributes to store in the JSon for:
    • The whole markup node
    • Each individual markup
      The current vtkMRMLMarkupsFiducialStorageNode would stay as-is, leaving the user the option to save to (*.fcsv, *.acsv) with it or to JSON with the new generic storage node.

What do you think ?

Thanks !
Johan

3 Likes

This looks great, thank you!

I think we can comment more on what’s needed if we see the code. Could you issue a PR?

Without seeing it I think that

  • this should go into the core
  • even if it uses markups nodes it should have its own node with storage and display nodes
  • even if there is no module GUI for this yet, it would be very important to have VTK widgets to interact with the splines in the slice views

Just share the code as is. If it is implemented as a modification in Slicer core, just push it to your own fork. I’ve been working on very similar features, so I have a good idea of how to proceed, but I would need to see what you have already.

Very cool. I’m guessing the code is what’s found in BICCN/cell-location PR #15

I have pushed a PR here (1) for preview. It’s easier to comment on these than on a branch.

@cpinter: I am working on a storage node (see the plan for the JSON generic markup storage node). In our applications we have not needed any specialized behavior for the display so I have not implement any yet.
The planes are not available in the 2D view, but the splines are. You can interact with them too.

@jamesobutler: Yes indeed.

(1): https://github.com/Slicer/Slicer/pull/1010

1 Like

Cool. Did the fuction avaliable now? How to use it now?

The feature is not available in the nightly release yet. You need to build Slicer using the branch referenced in the pull request above if you want to try it now.