Using SlicerCat

Hello i tried to follow the tutorial : 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 ?

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:

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

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.

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 which builds the custom app framework using the most recent Slicer hash.

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

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

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 ?

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