2011 Winter Project Week:SPECTRE Integration
From NAMIC Wiki
Home < 2011 Winter Project Week:SPECTRE Integration
Key Investigators
- BWH: Nicole Aucoin
- JHU: Min Chen
Objective
To advance the integration of the Java based SPECTRE algorithm into Slicer3 (and Slicer4), to find validation data sets.
Approach, Plan
Our approach is to fine tune the integration for Slicer3, write a python wrapping script for Slicer4, fine tune the ACPC algorithm. The main challenge to this approach is coordinate system transforms.
Our plan for the project week is:
- Add a memory argument to the SPECTRE xml and use it to set Java heap sizes
- Fine tune the Java handling in Slicer3 to fail gracefully if Java is not available on a build machine
- Debug the ACPC algorithm in SPECTRE
- Add a transform output to SPECTRE
- Debug y flip on reading in output images into Slicer
- Find collaborators with segemented data sets for the validation portion of our project. Ron has suggested talking with:
- Sylvain Bioux
- Hans Johnson
- Write a python wrapper so we can integrate SPECTRE into Slicer4
- Work on documentation so that the manual steps are as clear as possible
- Remove the requirement to have to run MIPAV before running the SPECTRE extension in Slicer.
- Set volume types in SPECTRE outputs
- Find info on current state of batch jobs via clusters (for validation, not critical as they can run the java processes through the pipeline at JHU, but could be interesting)
Progress
Pre-project week:
- Memory
- Command line argument name suggestions: -Xmx (too obscure), -memoryMax, -maximumMemory, -maxMemoryUsage
- Y flip
- Atlas file OAS1_0001_MR1_original.hdr & .img loaded into Slicer using Add Data. Saved in .nhdr nrrd format, .nhdr contains:
type: short dimension: 3 space: left-posterior-superior sizes: 176 208 176 space directions: (1,0,0) (0,-1,0) (0,0,1) kinds: domain domain domain endian: little encoding: gzip space origin: (0,0,0)
- Loading the .nhdr file back into Slicer, volume aligns with .hdr/.img
- Turning off deleting intermediate files for SPECTRE: [$::slicer3::CommandLineModuleGUI_SPECTRE_2009 GetLogic] DeleteTemporaryFilesOff
- Running the algorithm, generating only stripped image. unu head on input image BJAIF_vtkMRMLScalarVolumeNodeB.nrrd:
type: short dimension: 3 space: left-posterior-superior sizes: 176 208 176 space directions: (1,0,0) (0,-1,0) (0,0,1) kinds: domain domain domain endian: little encoding: gzip space origin: (0,0,0)
- unu head on output stripped image BJAIF_vtkMRMLScalarVolumeNodeD.nrrd:
type: float dimension: 3 sizes: 176 208 176 endian: big encoding: raw kinds: space space space space: left-posterior-superior space origin: (-0.0,0.0,0.0) space directions: (1.0,0,0) (0,1.0,0) (0,0,1.0) thicknesses: NaN NaN 0.0
- Differences are the space directions, big instead of little endian, and the undefined thicknesses.
- Endian:
- Converting stripped image to big endian: unu save -f nrrd -en little -i /home/nicole/Slicer3nicole/BJAIF_vtkMRMLScalarVolumeNodeD.nrrd -o /home/nicole/Slicer3nicole/BJAIF_vtkMRMLScalarVolumeNodeD-littleEndian.nrrd
- and loading it back into Slicer, still offset
- Space directions
- Before this test, placing stripped output volume inside a transform with this matrix shifts it into alignment with the original image:
1 0 0 0 -1 0 0 0 1
but Dec 29/10, there's still an A-P flip.
- Before this test, placing stripped output volume inside a transform with this matrix shifts it into alignment with the original image:
- Atlas file OAS1_0001_MR1_original.hdr & .img loaded into Slicer using Add Data. Saved in .nhdr nrrd format, .nhdr contains:
Delivery Mechanism
This work will be delivered to the NA-MIC Kit as a
- ITK Module
- Slicer Module
- Built-in
- Extension -- commandline YES
- Extension -- loadable
References
- 2010 Summer Project Week
- 2010 Winter Project Week (has manual steps for integration)