Difference between revisions of "2011 Winter Project Week:SPECTRE Integration"
From NAMIC Wiki
Line 58: | Line 58: | ||
<ul> | <ul> | ||
<li>Atlas file OAS1_0001_MR1_original.hdr & .img loaded into Slicer using Add Data. Saved in .nhdr nrrd format, .nhdr contains: | <li>Atlas file OAS1_0001_MR1_original.hdr & .img loaded into Slicer using Add Data. Saved in .nhdr nrrd format, .nhdr contains: | ||
− | <pre>space: left-posterior-superior | + | <pre> |
+ | type: short | ||
+ | dimension: 3 | ||
+ | space: left-posterior-superior | ||
sizes: 176 208 176 | sizes: 176 208 176 | ||
space directions: (1,0,0) (0,-1,0) (0,0,1) | space directions: (1,0,0) (0,-1,0) (0,0,1) | ||
− | space origin: (0,0,0)</pre> | + | kinds: domain domain domain |
+ | endian: little | ||
+ | encoding: gzip | ||
+ | space origin: (0,0,0) | ||
+ | </pre> | ||
<li>Loading the .nhdr file back into Slicer, volume aligns with .hdr/.img | <li>Loading the .nhdr file back into Slicer, volume aligns with .hdr/.img | ||
<li>Turning off deleting intermediate files for SPECTRE: | <li>Turning off deleting intermediate files for SPECTRE: | ||
[$::slicer3::CommandLineModuleGUI_SPECTRE_2009 GetLogic] DeleteTemporaryFilesOff | [$::slicer3::CommandLineModuleGUI_SPECTRE_2009 GetLogic] DeleteTemporaryFilesOff | ||
<li>Running the algorithm, generating only stripped image. unu head on input image BJAIF_vtkMRMLScalarVolumeNodeB.nrrd: | <li>Running the algorithm, generating only stripped image. unu head on input image BJAIF_vtkMRMLScalarVolumeNodeB.nrrd: | ||
− | <pre>space: left-posterior-superior | + | <pre> |
+ | type: short | ||
+ | dimension: 3 | ||
+ | space: left-posterior-superior | ||
sizes: 176 208 176 | sizes: 176 208 176 | ||
space directions: (1,0,0) (0,-1,0) (0,0,1) | space directions: (1,0,0) (0,-1,0) (0,0,1) | ||
+ | kinds: domain domain domain | ||
+ | endian: little | ||
+ | encoding: gzip | ||
space origin: (0,0,0) | space origin: (0,0,0) | ||
</pre> | </pre> | ||
<li>unu head on output stripped image BJAIF_vtkMRMLScalarVolumeNodeD.nrrd: | <li>unu head on output stripped image BJAIF_vtkMRMLScalarVolumeNodeD.nrrd: | ||
<pre> | <pre> | ||
− | + | 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 | ||
</pre> | </pre> | ||
+ | <li>Differences are the space directions, big instead of little endian, and the undefined thicknesses. | ||
+ | <li>Endian: | ||
+ | <ul> | ||
+ | <li>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 | ||
+ | <li>and loading it back into Slicer, still offset | ||
+ | </ul> | ||
+ | <li>Space directions | ||
+ | <ul> | ||
+ | <li>Before this test, placing stripped output volume inside a transform with this matrix shifts it into alignment with the original image: | ||
+ | <pre> | ||
+ | 1 0 0 | ||
+ | 0 -1 0 | ||
+ | 0 0 1 </pre> | ||
+ | but Dec 29/10, there's still an A-P flip. | ||
+ | </ul> | ||
</ul> | </ul> | ||
</ul> | </ul> |
Revision as of 18:56, 29 December 2010
Home < 2011 Winter Project Week:SPECTRE IntegrationKey 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
Progress
- 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)