# New Annotation for Slicer - Splines and Planes

**URL:** <https://discourse.slicer.org/t/new-annotation-for-slicer-splines-and-planes/3951>\
**Category:** Development\
**Created:** [August 30, 2018, 3:12pm UTC](https://discourse.slicer.org/t/new-annotation-for-slicer-splines-and-planes/3951 "2018-08-30T15:12:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johan\_Andruejol](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/johan_andruejol/32/3639_2.png) [@Johan\_Andruejol](https://discourse.slicer.org/u/Johan_Andruejol)\
**Post date:** [August 30, 2018, 3:12pm UTC](https://discourse.slicer.org/t/new-annotation-for-slicer-splines-and-planes/3951/1 "2018-08-30T15:12:27Z")

</div>

Hi everyone,

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

Planes:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/b/cb2e3c2dcf929723d021bb7f003afd46b0250453.png)  
Note: Planes annotation are only available in the 3D view

Splines:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/e/be66bd06ebf017f0ac49c1a03abe7a22f081eaeb.jpeg)

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

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [August 30, 2018, 3:29pm UTC](https://discourse.slicer.org/t/new-annotation-for-slicer-splines-and-planes/3951/2 "2018-08-30T15:29:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 30, 2018, 3:48pm UTC](https://discourse.slicer.org/t/new-annotation-for-slicer-splines-and-planes/3951/3 "2018-08-30T15:48:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [August 30, 2018, 7:41pm UTC](https://discourse.slicer.org/t/new-annotation-for-slicer-splines-and-planes/3951/4 "2018-08-30T19:41:49Z")

</div>

Very cool. I’m guessing the code is what’s found in [BICCN/cell-location PR #15](https://github.com/BICCN/cell-locator/pull/15)

---

<div class="post-metadata">

**Author:** ![Johan\_Andruejol](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/johan_andruejol/32/3639_2.png) [@Johan\_Andruejol](https://discourse.slicer.org/u/Johan_Andruejol)\
**Post date:** [August 31, 2018, 3:29pm UTC](https://discourse.slicer.org/t/new-annotation-for-slicer-splines-and-planes/3951/5 "2018-08-31T15:29:04Z")

</div>

I have pushed a PR [here (1)](https://github.com/Slicer/Slicer/pull/1010) 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](https://github.com/Slicer/Slicer/pull/1010)

---

<div class="post-metadata">

**Author:** ![timeanddoctor](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/timeanddoctor/32/5839_2.png) [@timeanddoctor](https://discourse.slicer.org/u/timeanddoctor)\
**Post date:** [September 8, 2018, 1:20am UTC](https://discourse.slicer.org/t/new-annotation-for-slicer-splines-and-planes/3951/6 "2018-09-08T01:20:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 9, 2018, 12:11pm UTC](https://discourse.slicer.org/t/new-annotation-for-slicer-splines-and-planes/3951/7 "2018-09-09T12:11:20Z")

</div>

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.
