Difference between revisions of "2010 Winter Project Week SPECTRE 3DSlicer Integration"

From NAMIC Wiki
Jump to: navigation, search
Line 71: Line 71:
 
==How to run SPECTRE with Slicer==
 
==How to run SPECTRE with Slicer==
  
===Linux===
+
===October 2010===
 +
 
 +
SPECTRE has been modified to work as an extension. This is still an intermediate stage in the integration process, the eventual end goal is to use the Extensions Wizard to download SPECTRE automatically. Currently the process is as follows:
 +
 
 +
* build Slicer3 from the source code in the SVN trunk
 +
 
 +
===January 2010===
 +
====Linux====
  
 
Updated instructions, based on the Windows process, to run SPECTRE with Slicer on a linux workstation (Jan 29/10):
 
Updated instructions, based on the Windows process, to run SPECTRE with Slicer on a linux workstation (Jan 29/10):
Line 99: Line 106:
 
* Wait, the stripped brain is eventually loaded back into Slicer.
 
* Wait, the stripped brain is eventually loaded back into Slicer.
  
===Windows===
+
====Windows====
  
 
At the project week, the integration was done on Nicole's Win32 laptop using these steps:
 
At the project week, the integration was done on Nicole's Win32 laptop using these steps:

Revision as of 20:48, 25 October 2010

Home < 2010 Winter Project Week SPECTRE 3DSlicer Integration


Key Investigators

  • BWH: Nicole Aucoin
  • JHU: Aaron Carass, Min Chen
  • GE: Jim Miller

Objective

Integration of SPECTRE Skull Stripping software into the NAMIC Toolkit via the Slicer3 CLI framework.





Approach, Plan

Our approach: integration of software which will segment and provide coordinate reference frames for the Cerebrum (akin to the Talairach space), the Cerebellum (see reference below for K. Rehm), and for the Brainstem.

This will be achieved through integration of the Java Imaging Software Toolkit (JIST) into the Slicer3 framework and then testing and evaluation of JIST components for completing the necessary components to provide this system.

The main challenge is supporting Java command line executables in 3D Slicer.

Our plan is first to facilitate Java command line module discovery and execution, by adding support for the --xml argument to SPECTRE, and adding support for tcl wrapping scripts in 3DSlicer. Then integrate SPECTRE into the NAMIC toolkit by crafing a CMakeLists.txt file to allow it to be built easily. Create a NITRC project and a 3D Slicer extension that can be either downloaded or built on any platform.

Progress

A proof of concept sample Java HelloWorld application has been added to 3D Slicer.

Changes to the Command Line Module logic and Module Factory were made to support launching the tcl script with tclsh, for cross platform compatibility.

Changes made to the Java classes to support the --xml argument, Slicer recognises SPECTRE as a command line module.

Reading in the output images from SPECTRE back into Slicer works, to do: volume origin and win/level, stderr issue, marking some as label maps.

Updating instructions on how to run SPECTRE in Slicer to reflect current methods.

Presentations

Powerpoint presentation given by Jerry L. Prince on the status of the integration of SPECTRE as a module within Slicer, given at the 2010 Winter AHM in Utah.

How to run SPECTRE with Slicer

October 2010

SPECTRE has been modified to work as an extension. This is still an intermediate stage in the integration process, the eventual end goal is to use the Extensions Wizard to download SPECTRE automatically. Currently the process is as follows:

  • build Slicer3 from the source code in the SVN trunk

January 2010

Linux

Updated instructions, based on the Windows process, to run SPECTRE with Slicer on a linux workstation (Jan 29/10):

  • build Slicer3 from the source code in the SVN trunk
  • install the SPECTRE classes and supporting classes in Slicer3/Applications/CLI/JAVA/SPECTRE/, so a plugins directory appears there that has all the supporting classes (ie the org tree) and the edu tree.
  • Install MIPAV
    • download installMIPAV.bin
    • chmod u+x installMIPAV.bin
    • sh ./installMIPAV.bin
    • In the installer, Choose Install folder: Slicer3/Applications/CLI/Java/SPECTRE/mipav
    • In the installer, Create links: none
    • MIPAV comes with a JRE, to use that version of java: add Slicer3/Applications/CLI/Java/SPECTRE/mipav/jre/bin to the start of your path (Slicer will use it for the SPECTRE jars if you have the more recent version of SPECTRE.tcl)
  • go to the Slicer3 source directory Slicer3\Applications\CLI and edit the file CMakeLists.txt
    • remove the hash mark at the start of the line with Java on it (in the SET cli_modules command)
  • in the Slicer3\Applications\CLI\Java directory, edit the file SPECTRE.tcl, and edit the following lines to point to your installation:
    • pathToMipav to the full path to Slicer3/Applications/CLI/Java/SPECTRE/mipav
    • pathToSPECTREPlugins to the full path to Slicer3/Applications/CLI/Java/SPECTRE/plugins
  • Rebuild Slicer using Slicer3/Scripts/getbuildtest.tcl in order to install the helper script SPECTRE.tcl
  • Start up Slicer
    • check under the Modules menu, Developer Tools, and run the Java Example first. If the status message says "Completed with errors", you can restart Slicer with the --clear-module-cache argument and try it again.
    • once it does run, SPECTRE 2009 is also categorised under Developer Tools, click on it to open it's GUI
  • Load an input volume
  • Select that input volume in the SPECTRE GUI under the Volume drop down menu (Slicer3/Application/CLI/Java/SPECTRE/mipav/plugins/atlases/spectre_atlas/OAS1_0001_MR1_original.hdr)
  • Click on the Atlas list folder and browse to your atlas file list (Slicer3/Application/CLI/Java/SPECTRE//mipav/plugins/atlases/spectre_atlas/oasis-3_20081124.txt)
  • Scroll down to the Output pane in the SPECTRE GUI and click on the drop down menus for the output volumes that you wish to reload into Slicer, for example, Stripped Volume, and select the Create New Volume option.
  • Click the Apply button
  • Wait, the stripped brain is eventually loaded back into Slicer.

Windows

At the project week, the integration was done on Nicole's Win32 laptop using these steps:

  • build Slicer3 from the source code in the SVN trunk
  • install the SPECTRE classes in c:\Documents and Settings\nicole\mipav\plugins, there should be a directory called edu there that holds the SPECTRE classes, as well as support libraries
  • download and install MIPAV to C:\Program Files\mipav
  • run MIPAV and under the Plugins menu, select Install Plugin.
  • browse to "c:\Documents and Settings\nicole\mipav\plugins" and click on the arrow to move it the Selected class files window, then click Install Plugin(s)
  • go to the Slicer3 source directory Slicer3\Applications\CLI and edit the file CMakeLists.txt
    • remove the hash mark at the start of the line with Java on it (in the SET cli_modules command)
  • in the Slicer3\Applications\CLI\Java directory, edit the file SPECTRE.tcl, and edit the following lines to point to your installation:
    • set pathToMipavPlugins "c:/Program Files/mipav"
    • lappend jarList {c:/Program Files/mipav}
    • lappend jarList {c:/Documents and Settings/nicole/mipav/plugins}
  • Rebuild Slicer using Slicer3/Scripts/getbuildtest.tcl in order to install the helper script SPECTRE.tcl
  • Start up Slicer
    • check under the Modules menu, Developer Tools, and run the Java Example first. If the status message says "Completed with errors", you can restart Slicer with the --clear-module-cache argument and try it again.
    • once it does run, SPECTRE 2009 is also categorised under Developer Tools, click on it to open it's GUI
  • Load an input volume
  • Select that input volume in the SPECTRE GUI under the Volume drop down menu (c:/program files/mipav/plugins/atlases/spectre_atlas/OAS1_0001_MR1_original.hdr)
  • Click on the Atlas list folder and browse to your atlas file list (c:/program files/mipav/plugins/atlases/spectre_atlas/oasis-3_20081124.txt)
  • Scroll down to the Output pane in the SPECTRE GUI and click on the drop down menus for the output volumes that you wish to reload into Slicer, for example, Stripped Volume, and select the Create New Volume option.
  • Click the Apply button
  • Wait, the stripped brain is eventually loaded back into Slicer.

References

  • K. Rehm's 2000 HBM abstract, 'Use of Cerebellar Landmarks To Define a Coordinate System and an Isolation Strategy'