# dMRI Extension Files -- Where do they end up?

**URL:** https://discourse.slicer.org/t/dmri-extension-files-where-do-they-end-up/14246
**Category:** SlicerDMRI
**Created:** [October 26, 2020, 1:19am UTC](https://discourse.slicer.org/t/dmri-extension-files-where-do-they-end-up/14246 "2020-10-26T01:19:11Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![mgc26](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@mgc26](https://discourse.slicer.org/u/mgc26)
#### Post date: [October 26, 2020, 1:19am UTC](https://discourse.slicer.org/t/dmri-extension-files-where-do-they-end-up/14246/1 "2020-10-26T01:19:11Z")

</div>

I’ve been trying to complete the whitematteranalysis, but stuck on the last step as I cannot locate the SlicerDMRI extension files on my Ubuntu box.

The step I’m stuck on:

# 8. Fiber tract diffusion measurements

> ```
> wm_diffusion_measurements.py ./FiberClustering/SeparatedClusters/tracts_left_hemisphere/ ./DiffusionMeasurements/left_hemisphere_clusters.csv /Applications/Slicer4p10realease.app/Contents/Extensions-27501/SlicerDMRI/lib/Slicer-4.10/cli-modules/FiberTractMeasurements
> 
> wm_diffusion_measurements.py ./FiberClustering/SeparatedClusters/tracts_right_hemisphere/ ./DiffusionMeasurements/right_hemisphere_clusters.csv /Applications/Slicer4p10realease.app/Contents/Extensions-27501/SlicerDMRI/lib/Slicer-4.10/cli-modules/FiberTractMeasurements
> 
> wm_diffusion_measurements.py ./FiberClustering/SeparatedClusters/tracts_commissural/ ./DiffusionMeasurements/commissural_clusters.csv /Applications/Slicer4p10realease.app/Contents/Extensions-27501/SlicerDMRI/lib/Slicer-4.10/cli-modules/FiberTractMeasurements
> 
> ```

Anyone know where the I can find FiberTractMeasurements with the 3D Slicer linux installation?

---

<div class="post-metadata">

### Author: ![zhangfanmark](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/zhangfanmark/32/4451_2.png) [@zhangfanmark](https://discourse.slicer.org/u/zhangfanmark)
#### Post date: [October 26, 2020, 5:28pm UTC](https://discourse.slicer.org/t/dmri-extension-files-where-do-they-end-up/14246/2 "2020-10-26T17:28:38Z")

</div>

Hi @mgc26

Here you are using the cli module path under a Mac OS, which is for demonstration in the tutorial you followed.

For Linux, you will need to install both 3D slicer and SlicerDMRI extension. See here for SlicerDMRI installation instructions: [http://dmri.slicer.org/download/](http://dmri.slicer.org/download/)

Then, you should be find the module under your 3D Slicer folder, like this: Extensions-XXX/SlicerDMRI/lib/Slicer-4.XX/cli-modules/FiberTractMeasurements

Please let me know how it works for you.

PS: for any further issues related to WMA, you can directly create an issue in the WMA repository.

---

<div class="post-metadata">

### Author: ![mgc26](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@mgc26](https://discourse.slicer.org/u/mgc26)
#### Post date: [October 26, 2020, 5:38pm UTC](https://discourse.slicer.org/t/dmri-extension-files-where-do-they-end-up/14246/3 "2020-10-26T17:38:29Z")

</div>

Thanks for getting back to me, Fan.  
I do have 3D Slicer installed as well as SlicerDMRI per the instructions. I was able to run the WMA whole tutorial up through the last step.  
The issue is that in the Linux 3D Slicer directory there is no extensions folder containing SlicerDMRI.  
In my 3D Slicer GUI, I am able to see that SlicerDMRI is installed and can use it. The installation appears to have worked just fine.  
However, when I try to do the WMA tutorial at the CLI there SlicerDMRI extension files don’t exist in the 3D Slicer application directory.

Hopefully that clarifies the issue I’ve run in to.

---

<div class="post-metadata">

### Author: ![zhangfanmark](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/zhangfanmark/32/4451_2.png) [@zhangfanmark](https://discourse.slicer.org/u/zhangfanmark)
#### Post date: [October 26, 2020, 5:54pm UTC](https://discourse.slicer.org/t/dmri-extension-files-where-do-they-end-up/14246/4 "2020-10-26T17:54:29Z")

</div>

Have you tried to search within the Slicer folder to see if you can find FiberTractMeasurements? Unfortunately, I don’t have a linux machine to check the path.

Another way, if you run the FiberTractMeasurements using GUI, in the “log message” (right bottom red), you can see how the cli is being called. From there, you will see the path of the cli module.

Regards,  
Fan

---

<div class="post-metadata">

### Author: ![mgc26](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@mgc26](https://discourse.slicer.org/u/mgc26)
#### Post date: [November 2, 2020, 8:16pm UTC](https://discourse.slicer.org/t/dmri-extension-files-where-do-they-end-up/14246/5 "2020-11-02T20:16:35Z")

</div>

Hi Fan,  
Thanks for your reply. I used your log message trick and it did indicate how the CLI is being called, but it appears to be in a hidden location:

> /home/\*\*/.config/NA-MIC/Extensions-29402/SlicerDMRI/lib/Slicer-4.11/cli-modules/FiberTractMeasurements

Unfortunately, the script to run the measurements does not work as the .config folder is ‘hidden’ in Ubuntu. Thus, it appears Slicer3D stores the extension cli-modules in a hidden config file.

As a workaround, I tried downloading the DMRI source code from Github and tried to source FiberTractMeasurements directly

> /home/\*\*/SlicerDMRI-master/Modules/CLI/FiberTractMeasurements

Now, I’m getting an error on permissions:

> sh: 1: /home/\*\*/SlicerDMRI-master/Modules/CLI/FiberTractMeasurements: Permission denied

I’ve tried to unlock the files using chmod +x \* but to no avail.

Any suggestions beyond this?

---

<div class="post-metadata">

### Author: ![zhangfanmark](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/zhangfanmark/32/4451_2.png) [@zhangfanmark](https://discourse.slicer.org/u/zhangfanmark)
#### Post date: [November 3, 2020, 6:58pm UTC](https://discourse.slicer.org/t/dmri-extension-files-where-do-they-end-up/14246/6 "2020-11-03T18:58:58Z")

</div>

For the FiberTractMeasurements, can you try to run “/home/\*\*/.config/NA-MIC/Extensions-29402/SlicerDMRI/lib/Slicer-4.11/cli-modules/FiberTractMeasurements -h” from your terminal and see if it works?

Not sure why it does not work in the script. Perhaps also try adding parentheses to the module path “/home/\*\*/.config/NA-MIC/Extensions-29402/SlicerDMRI/lib/Slicer-4.11/cli-modules/FiberTractMeasurements”

Directly from the source code should not work. You will need to compile in order to have the binary executable file.

Regards,  
Fan

---

<div class="post-metadata">

### Author: ![mgc26](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@mgc26](https://discourse.slicer.org/u/mgc26)
#### Post date: [November 4, 2020, 2:00am UTC](https://discourse.slicer.org/t/dmri-extension-files-where-do-they-end-up/14246/7 "2020-11-04T02:00:15Z")

</div>

Hi Fan – thanks for your continued support.

Unfortunately, it appears that the script still cannot find FiberTractMeasurements with adding “-h” or putting the command in parentheses as you suggested.

I was able to generate the measurements using the GUI, so the dMRI module works. Seems the issue here is that when 3D Slicer installs extensions into the hidden .config folder they are not accessible with the terminal call supplied in the WMA tutorial. The remainder of the tutorial executed perfectly…
