# Editing DTI brain mask on Mac

**URL:** <https://discourse.slicer.org/t/editing-dti-brain-mask-on-mac/10387>\
**Category:** Support\
**Tags:** diffusion\
**Created:** [February 21, 2020, 8:20pm UTC](https://discourse.slicer.org/t/editing-dti-brain-mask-on-mac/10387 "2020-02-21T20:20:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![LearningSlicerYay](https://avatars.discourse-cdn.com/v4/letter/l/8dc957/32.png) [@LearningSlicerYay](https://discourse.slicer.org/u/LearningSlicerYay)\
**Post date:** [February 21, 2020, 8:20pm UTC](https://discourse.slicer.org/t/editing-dti-brain-mask-on-mac/10387/1 "2020-02-21T20:20:04Z")

</div>

Operating system: Mac  
Slicer version: 4.10.2  
Expected behavior: Has editor module  
Actual behavior: No editor module

Hi everyone  
I normally run my DTI analysis using Windows, but wanted to try out whitematteranalysis and moved to a Mac to test it out. Normally on Windows (running 4.10.1) when I run “Diffusion Brain Masking” I am able to edit the mask to include extra areas (optic nerves). However, this module is not available on 4.10.2. Moving forward, I’m wondering if there’s another way I can edit the brain mask generated without downgrading to 4.10.1?

Thanks,  
AC

---

<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:** [February 24, 2020, 4:46pm UTC](https://discourse.slicer.org/t/editing-dti-brain-mask-on-mac/10387/2 "2020-02-24T16:46:18Z")

</div>

Maybe this is the same question as this issue:

> [@Where can I found Editor module](https://discourse.slicer.org/t/where-can-i-found-editor-module/10408/4):
>
> You may search it or click the all modules: [image]

---

<div class="post-metadata">

**Author:** ![LearningSlicerYay](https://avatars.discourse-cdn.com/v4/letter/l/8dc957/32.png) [@LearningSlicerYay](https://discourse.slicer.org/u/LearningSlicerYay)\
**Post date:** [February 24, 2020, 6:41pm UTC](https://discourse.slicer.org/t/editing-dti-brain-mask-on-mac/10387/3 "2020-02-24T18:41:43Z")

</div>

Thanks Steve  
I’m not sure how I missed it before…

However, I know the Editor module is being replaced by Segment Editor. I tried editing the mask using the Segment Editor but there’s no option to do so. Is it possible?

---

<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:** [February 24, 2020, 7:46pm UTC](https://discourse.slicer.org/t/editing-dti-brain-mask-on-mac/10387/4 "2020-02-24T19:46:21Z")

</div>

@LearningSlicerYay - at the bottom of the Segmentations module there’s an import/export option that lets you bring in labelmaps as segmentations. Then you can export them again if you need a labelmap for other processing.

---

<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:** [February 25, 2020, 12:24am UTC](https://discourse.slicer.org/t/editing-dti-brain-mask-on-mac/10387/5 "2020-02-25T00:24:32Z")

</div>

To convert with 2 mouse clicks, you can also go to Data module and right-click on the labelmap or segmentation node and choose to convert to segmentation or labelmap.

---

<div class="post-metadata">

**Author:** ![LearningSlicerYay](https://avatars.discourse-cdn.com/v4/letter/l/8dc957/32.png) [@LearningSlicerYay](https://discourse.slicer.org/u/LearningSlicerYay)\
**Post date:** [March 3, 2020, 5:20pm UTC](https://discourse.slicer.org/t/editing-dti-brain-mask-on-mac/10387/6 "2020-03-03T17:20:11Z")

</div>

Hi all,

I’ve tried running this a couple times but every time I edit the brainmask and then try to run the DTI estimation, I get the following error:

> Diffusion Tensor Estimation standard error:  
> C:/…/NA-MIC/Extensions-27931/SlicerDMRI/lib/Slicer-4.10/cli-modules/DWIToDTIEstimation.exe: Error reading Mask file, wrong coordinate space

This occurs regardless if I use the segmentations module to convert/edit/export the mask, or use the data module to convert/edit/export the mask. I’ve also tried editing the mask using the baseline and dwi as my master volumes but still get this error.

I am not sure how to overcome this one… Does anyone have any ideas?  
(However, using the Editor module to edit the brainmask does not seem to result in this error).

---

<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 3, 2020, 5:45pm UTC](https://discourse.slicer.org/t/editing-dti-brain-mask-on-mac/10387/7 "2020-03-03T17:45:58Z")

</div>

You can check the [tensor estimation code is checking the transforms](https://github.com/SlicerDMRI/SlicerDMRI/blob/master/Modules/CLI/DWIToDTIEstimation/DWIToDTIEstimation.cxx#L117-L122). You can look at this in the Volume Information tab of the Volumes module. The exported labelmap should match the master volume used to generate the segmentation.

---

<div class="post-metadata">

**Author:** ![LearningSlicerYay](https://avatars.discourse-cdn.com/v4/letter/l/8dc957/32.png) [@LearningSlicerYay](https://discourse.slicer.org/u/LearningSlicerYay)\
**Post date:** [March 3, 2020, 6:07pm UTC](https://discourse.slicer.org/t/editing-dti-brain-mask-on-mac/10387/8 "2020-03-03T18:07:05Z")

</div>

Hi Steve,

Thanks for your response. I’m not sure how to check whether the code is checking the transforms due to my limited coding/programming knowledge…

However, I think you’re on the right track as my dwi, baseline, and brainmask have the same spacing and origin (with some floating number differences), whereas the ones I converted have very different origins. I tried centering my dwi and the converted/exported brain masks but the origin is still different from my DWI. Manually changing the origin of the masks to the dwi / baseline still gives me the error above, and visually in the viewer shifts the mask significantly AWAY from the brain from my dwi/baseline.

EDIT: I actually noticed an extra menu on the export portion of the segmentation module where I can specify the master volume. Ensuring this is the DWI seems to have fixed the problem! : )
