# Using SlicerCat

**URL:** https://discourse.slicer.org/t/using-slicercat/10737
**Category:** Development
**Created:** [March 18, 2020, 5:43pm UTC](https://discourse.slicer.org/t/using-slicercat/10737 "2020-03-18T17:43:09Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![rbahegne](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbahegne/32/4837_2.png) [@rbahegne](https://discourse.slicer.org/u/rbahegne)
#### Post date: [March 18, 2020, 5:43pm UTC](https://discourse.slicer.org/t/using-slicercat/10737/1 "2020-03-18T17:43:09Z")

</div>

Hello i tried to follow the tutorial : [https://blog.kitware.com/slicercat-creating-custom-applications-based-on-3d-slicer/](https://blog.kitware.com/slicercat-creating-custom-applications-based-on-3d-slicer/) to build a custom version of slicer bundled with my own extension (sistream).

Everything when quite fine till Step 6 (build step).

After few errors easily fixed, our repository, Sistream is checked out and built, other error appeared that i did not manage to fix :

The build can’t find vtkMRMLMultiVolumeNode.h which is include in some file in my extension. In a regular slicer build this file is located in /Slicer-SuperBuild-Debug/MultiVolumeExplorer/MRML/ and it is correctly linked in the according CMakeList in my extension. Since the extension is bundled in the same project i would assume that Slicer\_DIR environnement variable to be set for the extension alone was kind of automated. I tried to compile in a IDE setting variable with no result.

Is it a problem to bundled an extension which target include files from regular slicer modules ? Or do i just need another CMake declaration to make things right ?

---

<div class="post-metadata">

### Author: ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)
#### Post date: [March 18, 2020, 6:01pm UTC](https://discourse.slicer.org/t/using-slicercat/10737/2 "2020-03-18T18:01:13Z")

</div>

Hi!

The default SlicerCustomAppTemplate tries to make a very “stripped down” version of Slicer, and so disables some functionality by default. This includes MultiVolume support.

In the CMakeLists.txt of the custom app you will need to turn ON MultiVolume support:

> <https://github.com/KitwareMedical/SlicerCustomAppTemplate/blob/90a68547d6ce9da7131b0d5a7097ed95e0036b58/%7B%7Bcookiecutter.project_name%7D%7D/CMakeLists.txt#L90>

You can also enable this when configuring with CMake, as there will be a checkbox option to turn it on.

---

<div class="post-metadata">

### Author: ![rbahegne](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbahegne/32/4837_2.png) [@rbahegne](https://discourse.slicer.org/u/rbahegne)
#### Post date: [March 19, 2020, 4:46pm UTC](https://discourse.slicer.org/t/using-slicercat/10737/3 "2020-03-19T16:46:47Z")

</div>

Thanks a lot that was the thing.

I did work nicely, yet i have a few questions concerning errors i came by. I fetch thoses Slicer sources :

> # Slicer sources
> 
> include(FetchContent)  
> if(NOT DEFINED slicersources\_SOURCE\_DIR)
> 
> # Download Slicer sources and set variables slicersources\_SOURCE\_DIR and slicersources\_BINARY\_DIR
> 
> FetchContent\_Populate(slicersources  
> GIT\_REPOSITORY git://github.com/Slicer/Slicer  
> GIT\_TAG v4.10.2  
> GIT\_PROGRESS 1  
> )  
> else()  
> set(slicersources\_BINARY\_DIR ${CMAKE\_CURRENT\_BINARY\_DIR}/slicersources-subbuild)  
> endif()

I encountered :

- /yourproject/slicersources-src/Modules/CLI/ResampleDTIVolume/Data/Baseline/Brain\_slice.nrrd is missing —\> your can get it from another regular slicer build

- Jsons located at /yourproject/slicersources-src/Base/QTCore/Testing/Data/input are expected to be found compressed as tar.gz —\> compressed them manually to fullfill that expectation

This can be solved easily but if I can avoid doing it each time i build a new project, i would be glad. Maybe this is linked to the version of slicer checkouted, or the build options.

---

<div class="post-metadata">

### Author: ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)
#### Post date: [March 19, 2020, 7:11pm UTC](https://discourse.slicer.org/t/using-slicercat/10737/4 "2020-03-19T19:11:12Z")

</div>

So, the first is definitely an issue related to the older version of Slicer used. The second is more mysterious. I am running a test SlicerCAT build with the most recent Slicer hash to see if it builds clean.

We have a testing dashboard for the CustomAppTemplate here: [http://slicer.cdash.org/index.php?project=SlicerCustomAppTemplate](http://slicer.cdash.org/index.php?project=SlicerCustomAppTemplate) which builds the custom app framework using the most recent Slicer hash.

---

<div class="post-metadata">

### Author: ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)
#### Post date: [March 20, 2020, 7:15pm UTC](https://discourse.slicer.org/t/using-slicercat/10737/5 "2020-03-20T19:15:41Z")

</div>

So, it looks like the template is building cleanly with the most recent Slicer nightly hash  
[https://github.com/Slicer/Slicer/commit/9be2a42e72089851dff44722c632307fa8415d85](https://github.com/Slicer/Slicer/commit/9be2a42e72089851dff44722c632307fa8415d85)

You could try building with that Slicer version and see if there are any issues.

---

<div class="post-metadata">

### Author: ![rbahegne](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbahegne/32/4837_2.png) [@rbahegne](https://discourse.slicer.org/u/rbahegne)
#### Post date: [March 23, 2020, 8:02am UTC](https://discourse.slicer.org/t/using-slicercat/10737/6 "2020-03-23T08:02:45Z")

</div>

Yes with the last master branch, it builds fine. Thing is we wanted to stay on a release version, do you know when the next release version will be out ?

---

<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 23, 2020, 1:41pm UTC](https://discourse.slicer.org/t/using-slicercat/10737/7 "2020-03-23T13:41:47Z")

</div>

We plan to release it within a couple of weeks. You can see the list of open issues here: [https://github.com/Slicer/Slicer/milestone/1](https://github.com/Slicer/Slicer/milestone/1)
