11
NA-MIC National Alliance for Medical Image Computing http://na-mic.org Slicer Building and Deployment Steve Pieper, PhD

Slicer Building and Deployment

Embed Size (px)

DESCRIPTION

Slicer Building and Deployment. Steve Pieper, PhD. Overall Goals. Building: Support cross platform building of Slicer Base plus run-time loadable modules Use VTK/ITK CMake infrastructure, but avoid writing a lot of code in CMake script Deployment: - PowerPoint PPT Presentation

Citation preview

Page 1: Slicer Building and Deployment

NA-MICNational Alliance for Medical Image Computing http://na-mic.org

Slicer Building and Deployment

Steve Pieper, PhD

Page 2: Slicer Building and Deployment

National Alliance for Medical Image Computing http://na-mic.org

Overall Goals

• Building:– Support cross platform building of Slicer Base

plus run-time loadable modules– Use VTK/ITK CMake infrastructure, but avoid

writing a lot of code in CMake script

• Deployment:– Capture all dynamic libraries into

redistributable platform specific archive– Run off a CD-ROM or download with no

installation and minimal system dependencies

Page 3: Slicer Building and Deployment

National Alliance for Medical Image Computing http://na-mic.org

Slicer Solution

• slicer_variables.tcl– A few high-level configurations

• genlib.tcl– Does cvs checkout of tagged CMake, VTK, ITK, Tcl/Tk

to generate compatible libraries• cmaker.tcl

– Detects modules, configures for libraries, and builds• launch.tcl

– Sets platform-specific environment variables so loadable libraries are correctly detected

• tarup.tcl– Makes a platform-specific archive including all shared

libraries and tcl scripts

Page 4: Slicer Building and Deployment

National Alliance for Medical Image Computing http://na-mic.org

Slicer_variables.tcl

• Set high-level configuration– Custom locations of lib directories– Compiler choice– CMake Generator Type

• E.g. Makefiles or Visual Studio

– Build type (debug or release)– …

• Generally the default values are fine– Windows requires download of pre-compiled

tcl and gsl libs

Page 5: Slicer Building and Deployment

National Alliance for Medical Image Computing http://na-mic.org

Genlib.tcl

• Create the needed libraries so you don’t have to!– Cmake, tcl, tk, itcl, iwidgets, BLT, VTK,

ITK

• Process– Check out tagged cvs versions– Configure / cmake– Make install to local directory

Page 6: Slicer Building and Deployment

National Alliance for Medical Image Computing http://na-mic.org

Cmaker.tcl

• Script to build slicer and it’s modules– Automatically detect build targets from

the Modules directory– Specify Extra Modules from the

SLICER_MODULES environment variable

Page 7: Slicer Building and Deployment

National Alliance for Medical Image Computing http://na-mic.org

Launch.tcl

• Uses slicer_variables.tcl to identify libraries

• Sets up the execution environment to find all shared libraries and support tcl files – PATH and LD_LIBRARY_PATH (linux, solaris)– Path (windows)– DYLD_LIBRARY_PATH (mac)– TCLLIBPATH, TCL_LIBRARY, TK_LIBRARY

(all)

• Starts slicer in subshell

Page 8: Slicer Building and Deployment

National Alliance for Medical Image Computing http://na-mic.org

Launchers

• Rely on “Starkits” – Stand Alone Runtime Kits– Use tcl virtual file system technology to make single

executable tcl/tk distribution that also includes custom scripts

– Allows detection of SLICER_HOME automatically so that all other paths can be relative to the launcher executable

• Why?– Cross-Platform– Launch logic localized to single script for easier

maintenance (not a .bat and a .sh file)• See Scripts/launcher for more detail

Page 9: Slicer Building and Deployment

National Alliance for Medical Image Computing http://na-mic.org

Tarup.tcl

• Run from within Slicer• Builds Archive distribution for

deployment– Platform specific launcher– Shared libraries, tcl code, data for

• Lib• Base• Modules

– Extra platform-specific support libs

Page 10: Slicer Building and Deployment

National Alliance for Medical Image Computing http://na-mic.org

Result

• Cross-platform build and deployment solution for VTK/ITK based interactive applications

• Tested across the last 3 slicer releases

Page 11: Slicer Building and Deployment

National Alliance for Medical Image Computing http://na-mic.org

Resources

• www.slicer.org

• www.na-mic.org/Wiki

• www.na-mic.org/Bug

• www.na-mic.org/Testing

[email protected]

[email protected]