Skip to content

SlicerRt developers page

Sunderlandkyl edited this page Sep 20, 2017 · 4 revisions

Building Slicer4 with RT extensions

Prerequisites on Windows:

  • Install TortoiseSVN (choose the non-default option of including command-line tools) or SlikSVN

Build procedure:

  • Build Slicer as described on the Slicer build instructions page
    • When configuring Slicer:
      • For 64-bit builds: choose "Visual Studio 9 2008 Win64" or "Visual Studio 11 2012 Win64" and a 64-bit QT package that was built from source. Instructions for building Qt can be found here
      • For 32-bit builds (not recommended): choose Visual Studio 9 2008 (or 11 2012) and an installed binary QT package
    • If the build process stalls at the "Cloning into ..." step then uncheck the "Slicer_USE_GIT_PROTOCOL" option (it is somewhat slower but more robust download method, more suitable for using from behind firewalls), reconfigure, and rebuild the project
  • Checkout SlicerRt extension using SVN from https://subversion.assembla.com/svn/slicerrt/trunk/SlicerRt/src
  • When configuring the project set the Slicer_DIR to the Slicer version that you have built (e.g., d:/devel/Slicer4-win64rel/Slicer-build)
  • Open SlicerRT.sln, select the Debug/Release configuration that matches the configuration that used for Slicer build, and build ALL_BUILD
  • Start Slicer and in the application settings add the following additional module paths (replace Debug by Release if you are testing in Release mode):
    • <SlicerRt-bin>\inner-build\lib\Slicer-4.5\cli-modules  # For unix
    • <SlicerRt-bin>\inner-build\lib\Slicer-4.5\cli-modules[Debug or Release]   # For windows
    • <SlicerRt-bin>\inner-build\lib\Slicer-4.5\qt-scripted-modules
    • <SlicerRt-bin>\inner-build\lib\Slicer-4.5\qt-loadable-modules   # For unix
    • <SlicerRt-bin>\inner-build\lib\Slicer-4.5\qt-loadable-modules[Debug or Release]   # For windows

Automatic testing

  • Run the automatic SlicerRT tests on your computer:
    • Open a command line in the inner-build in your SlicerRT binary directory, and run the command ctest -C Release -D Experimental
    • If you have a debug build, then use -C Debug instead
    • As a result, a line should appear in the Slicer dashboard in the Extensions-Experimental section. Similarly, the nightly appears in the nightly section.
    • It is advised to have a separate directory for the nightly test, which does not contain any local modifications.
  • Set up a nightly dashboard on your computer: follow instructions at http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/Tutorials/DashboardSetup

Create a new Slicer extension version

SlicerRT nightly is released automatically every night now, but stable releases are still manual

How to link between external modules

Steve and JC explained to me how to do this, if we want to call plastimatch functions from SlicerRT extension

  • Build plastimatch as extension, including library such as libfoo.so
  • In SlicerRT, do FIND_PACKAGE(plastimatch), then INCLUDE(${PLM_USE_FILE})
  • Use file will set include and library directories for SlicerRT to find header and libraries at build time
  • Add "depends" section to SlicerRT .s4ext file, so build machines can build them in the right order
  • Extension manager will look at dependency, and automatically install plastimatch if SlicerRT is chosen

SVN branches

To check out a branch

Sample data

Useful information

Task tracking

Weekly meeting: Wednesday at 11:00am Eastern time (first one Jan 23, 2012)

Important tasks are tracked as tickets.

Ticket states:

  • New: work on the task is not yet started
  • Accepted: the task is in progress (don't accept the task to indicate acknowledgment, set it to accepted when you actually start working on it)
  • Test: the the task is completed, needs testing
  • Invalid: the task has been cancelled
  • Fixed: the task has been successfully completed

Please switch ticket state to "Accepted" when you start working on that: not before (because this may prevent others from starting to work on that, thinking that you already work on the item), not after (because then someone may think that you don't work on that, and start working on that, too). 

Assembla has a nice feature for automatically linking the commits to the tickets, and we use it whenever we have a related ticket (which should be the case every time, but sometimes it is just a quick fix without an open ticket). When you don't want to close your ticket or change its state, then include "Re #93" in the commit message, eg. "Re #93: Your commit message" (provided the related ticket is number 93 of course). When you want to change the state then include "Test #93: Commit message" or "Fixed #93: Commit message".

Coding rules

  • Slicer (NA-MIC) coding rules apply: windows file endings for all files, indentation is 2 spaces (no tabs). See http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/Style_Guide
  • The following exceptions / clarifications are noted:
    • Lines may be longer than 80 characters
    • Curly braces should be on a separate line from the if / for statement
    • Windows line ending is used
    • Comments are C++-style, starting with // in each row
  • Variable naming convention
    • Local variables start with lower case
    • VTK members start with upper case
    • Qt members start with m_