# Load volume and segmentation issue

**URL:** <https://discourse.slicer.org/t/load-volume-and-segmentation-issue/3137>\
**Category:** Support\
**Created:** [June 11, 2018, 3:23pm UTC](https://discourse.slicer.org/t/load-volume-and-segmentation-issue/3137 "2018-06-11T15:23:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![trnhx001](https://avatars.discourse-cdn.com/v4/letter/t/ed655f/32.png) [@trnhx001](https://discourse.slicer.org/u/trnhx001)\
**Post date:** [June 11, 2018, 3:23pm UTC](https://discourse.slicer.org/t/load-volume-and-segmentation-issue/3137/1 "2018-06-11T15:23:09Z")

</div>

Operating system: Window 7  
Slicer version: 4.8.1  
Expected behavior:Load files and display successfully  
Actual behavior: False

Hi again,

I am new to using Python Interactor in 3D Slicer. I am trying to load DCOM/NRRD file for CT Scan Images, load 2 separate segmentations of the same part of carotid. I want to smooth the segmentations and compare the two, and then save the views.

However, when I tried to load the volume. It keeps showing something like below:

> > > slicer.util.loadVolume(slicer.app.slicerHome + “D:\projects\From\_CAD\carotid\_annotations\subject9\4 CarotidAngio 1.0 B30f.nrrd”)  
> > > False

Can I know what I did wrong here? Moreover, is there anyway to download slicer module to use it in SPyder/Anaconda?

Thank you so much for your help.

---

<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:** [June 11, 2018, 3:55pm UTC](https://discourse.slicer.org/t/load-volume-and-segmentation-issue/3137/2 "2018-06-11T15:55:40Z")

</div>

If you do this:

```
path = slicer.app.slicerHome + “D:\projects\From_CAD\carotid_annotations\subject9_1.3.12.2.1107.5.1.4.54143.30000006102300243942100012919\4 CarotidAngio 1.0 B30f.nrrd”
path

```

then you’ll see that the string contains an invalid path. It is not a surprise, as you concatenate a(n almost) valid path to the Slicer home directory. I say almost valid, because backslases are not handled properly unless you add an ‘r’ character before the first quote.

That said, if you want a python script that you can re-use, then using full paths is not a good practice. Your original idea to use the home folder is a good one, but then you need to complete it with a relative path, and not an absolute one.

---

<div class="post-metadata">

**Author:** ![Saima](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Saima](https://discourse.slicer.org/u/Saima)\
**Post date:** [September 12, 2018, 8:35am UTC](https://discourse.slicer.org/t/load-volume-and-segmentation-issue/3137/3 "2018-09-12T08:35:53Z")

</div>

how to do the relative path setting?

---

<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:** [September 12, 2018, 2:54pm UTC](https://discourse.slicer.org/t/load-volume-and-segmentation-issue/3137/4 "2018-09-12T14:54:31Z")

</div>

Please ask the question in a new thread and make it specific so that it can be answered. Thanks!
