# Sometimes freehand drawing does not work in Segment editor

**URL:** <https://discourse.slicer.org/t/sometimes-freehand-drawing-does-not-work-in-segment-editor/2271>\
**Category:** Support\
**Created:** [March 8, 2018, 6:20pm UTC](https://discourse.slicer.org/t/sometimes-freehand-drawing-does-not-work-in-segment-editor/2271 "2018-03-08T18:20:37Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![drusmanbashir](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/drusmanbashir/32/1282_2.png) [@drusmanbashir](https://discourse.slicer.org/u/drusmanbashir)\
**Post date:** [March 8, 2018, 6:20pm UTC](https://discourse.slicer.org/t/sometimes-freehand-drawing-does-not-work-in-segment-editor/2271/1 "2018-03-08T18:20:37Z")

</div>

Hi,  
While drawing annotation ROIs on a volume using freehand segmentation editor, sometimes the annotation does not draw altogether. If i delete the segmentation and create a new one , it will start working. I was able to save a mrml scene with the erratic segment map (named ‘HUM\_PT1\_LTlVL2’) with master volume (‘PT\_20140501\_123709’). Trying freehand draw on this volume produces no visible effect. If you can suggest, i would like to upload the zip folder containing the volumes segmaps and saved mrml scene.

Thanks  
Usman.

---

<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:** [March 8, 2018, 7:22pm UTC](https://discourse.slicer.org/t/sometimes-freehand-drawing-does-not-work-in-segment-editor/2271/2 "2018-03-08T19:22:58Z")

</div>

> [@drusmanbashir](#):
>
> While drawing annotation ROIs on a volume using freehand segmentation editor, sometimes the annotation does not draw altogether.

By “annotation does not draw” do you mean segment editor paint effect does not paint on the image? This can happen if the resolution of the binary labelmap in the segmentation node does not match resolution of the current master volume node.

Resolution of the binary labelmap is set to the _first selected_ master volume node, so if you change a volume then the simplest is to create a new segmentation node and select the updated volume as master volume. If you had segments in an old segmentation node that you would like to keep using, you can copy those to the new segmentation (in Segmentations module’s Copy/Move section).

We are aware that this behavior is not intuitive and plan to add a simpler way of changing the binary labelmap geometry in the segmentation node. This task is tracked here: [Add convenient GUI for changing segmentation labelmap geometry · Issue #4308 · Slicer/Slicer · GitHub](https://issues.slicer.org/view.php?id=4308)

---

<div class="post-metadata">

**Author:** ![drusmanbashir](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/drusmanbashir/32/1282_2.png) [@drusmanbashir](https://discourse.slicer.org/u/drusmanbashir)\
**Post date:** [March 9, 2018, 11:36am UTC](https://discourse.slicer.org/t/sometimes-freehand-drawing-does-not-work-in-segment-editor/2271/3 "2018-03-09T11:36:00Z")

</div>

I realised that. But in the case I have mentioned (and in that particular scene) no matter how many times i create the segmentation and define the first master volume to be the intended one, it won’t draw on it (not using paint effect btw). I did work around it by loading the volumes one by one in the scene. So unless someone wants to look into it, the problem is not affecting my work for now.  
Thanks  
Usman.

---

<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:** [March 9, 2018, 9:01pm UTC](https://discourse.slicer.org/t/sometimes-freehand-drawing-does-not-work-in-segment-editor/2271/4 "2018-03-09T21:01:27Z")

</div>

A post was split to a new topic: [Surface representation of segmentation is too much smoothed](https://discourse.slicer.org/t/surface-representation-of-segmentation-is-too-much-smoothed/2277)

---

<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:** [March 9, 2018, 9:06pm UTC](https://discourse.slicer.org/t/sometimes-freehand-drawing-does-not-work-in-segment-editor/2271/5 "2018-03-09T21:06:48Z")

</div>

It may be possible that there are non-axis aligned or tilted gantry acquisitions. Can you send the scene (upload to dropbox, onedrive, google drive, etc. and post the link here) so that I can have a look?

Only the draw tool has problems, or paint tool as well? If you enable sphere shape for the paintbrush, does it work then?

---

<div class="post-metadata">

**Author:** ![drusmanbashir](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/drusmanbashir/32/1282_2.png) [@drusmanbashir](https://discourse.slicer.org/u/drusmanbashir)\
**Post date:** [March 13, 2018, 10:24am UTC](https://discourse.slicer.org/t/sometimes-freehand-drawing-does-not-work-in-segment-editor/2271/6 "2018-03-13T10:24:36Z")

</div>

Hi Andras,  
Here is the link

> **[Dropbox - File Deleted](https://www.dropbox.com/sh/1etf1mwe96cli8v/AACUtLDl6R4sur3e5TZWMfGEa?dl=0)**
>
> Dropbox is a free service that lets you bring your photos, docs, and videos anywhere and share them easily. Never email yourself a file again!

A single segmentation map is saved in this folder. If i try to edit that on the master volume linked to it, I do not see anything

---

<div class="post-metadata">

**Author:** ![drusmanbashir](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/drusmanbashir/32/1282_2.png) [@drusmanbashir](https://discourse.slicer.org/u/drusmanbashir)\
**Post date:** [March 14, 2018, 11:25am UTC](https://discourse.slicer.org/t/sometimes-freehand-drawing-does-not-work-in-segment-editor/2271/7 "2018-03-14T11:25:02Z")

</div>

Hi,  
It seems the problem switches between contouring tools, at times I am able to use paint when freehand is not working and a few slices down it will alternate, i.e., freehand will start working and paint will stop. I hope this helps.

---

<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:** [March 14, 2018, 5:57pm UTC](https://discourse.slicer.org/t/sometimes-freehand-drawing-does-not-work-in-segment-editor/2271/8 "2018-03-14T17:57:36Z")

</div>

Your red slice view was aligned right between two axial slices.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/d/7d49888f0cee30850f093ade55f39dd71c39332c.png)

In these cases, due to rounding errors it may be possible that you see a different slice than you are drawing at.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/6/7677860ee04a4e21df5c09385a14d909fedba7c1.png)

To fix this, use Shift+MouseMove to reposition your slice view in a sagittal or coronal view, to not be exactly at voxel boundary.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [March 14, 2018, 8:09pm UTC](https://discourse.slicer.org/t/sometimes-freehand-drawing-does-not-work-in-segment-editor/2271/9 "2018-03-14T20:09:28Z")

</div>

Yes, this can be an issue when there are an even number of slices in the view direction (the default fit exactly centers).

In the old Editor all labeling tools (draw, paint, etc) have this in the constructor for that very reason:

> <https://github.com/Slicer/Slicer/blob/master/Modules/Scripted/EditorLib/LabelEffect.py#L193-L195>

It calls this code:

> <https://github.com/Slicer/Slicer/blob/f4ac8624e3ac55f4a5addfb68611639c370c353b/Libs/MRML/Logic/vtkMRMLSliceLogic.cxx#L2165-L2182>

---

<div class="post-metadata">

**Author:** ![drusmanbashir](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/drusmanbashir/32/1282_2.png) [@drusmanbashir](https://discourse.slicer.org/u/drusmanbashir)\
**Post date:** [March 16, 2018, 12:31pm UTC](https://discourse.slicer.org/t/sometimes-freehand-drawing-does-not-work-in-segment-editor/2271/10 "2018-03-16T12:31:29Z")

</div>

Slicer is proving quite a minefield of ‘gotchas’ . I think i understand the workaround. Thanks for the help

---

<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:** [March 16, 2018, 1:26pm UTC](https://discourse.slicer.org/t/sometimes-freehand-drawing-does-not-work-in-segment-editor/2271/11 "2018-03-16T13:26:00Z")

</div>

Yes, in Slicer usually you are free to do whatever you want - but this can certainly make things more complicated and you may need to learn more than what you wanted to.

To make the slider behavior more clear, we planned to distinguish interpolated and slice-centered mode, but it hasn’t been implemented yet (see [https://issues.slicer.org/view.php?id=3346](https://issues.slicer.org/view.php?id=3346)).

---

<div class="post-metadata">

**Author:** ![drusmanbashir](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/drusmanbashir/32/1282_2.png) [@drusmanbashir](https://discourse.slicer.org/u/drusmanbashir)\
**Post date:** [March 16, 2018, 5:32pm UTC](https://discourse.slicer.org/t/sometimes-freehand-drawing-does-not-work-in-segment-editor/2271/12 "2018-03-16T17:32:28Z")

</div>

The only thing with this workaround is - if i have a different image-volume open in the saggital or cooronal view and i try pressing the shift key and (I see that they do some kind of alignment), does that still work or must i have the same volume open in the other window but in a different orientation?

---

<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:** [March 16, 2018, 5:41pm UTC](https://discourse.slicer.org/t/sometimes-freehand-drawing-does-not-work-in-segment-editor/2271/13 "2018-03-16T17:41:13Z")

</div>

You don’t need to have same volume selected. The position is synchronized between all slice views that are in the same view group, regardless of what they show.
