October 08 2009 Meeting: VT-NAMIC Revised atlas construction workflow

From NAMIC Wiki
Jump to: navigation, search
Home < October 08 2009 Meeting: VT-NAMIC Revised atlas construction workflow

TODOs

  • link the software tools and scripts with the workflow
  • prepare a branch in the sandbox with the tools not available in Slicer (confirm with Chris copyright issues)


Software

  • Atlas buiding workflow: Slicer 3.5 ~svn r10578. BRAINSFit Slicer extension branch svn r301 (current one is broken). EM Segmenter from 3.4 svn stable branch.

Workflow

Template Tommy

Step 1: Prepare the data using the instructions -- LINK

Step 2: Gradient anisotropic diffusion. Tools: Slicer GAD module. Parameters: time step: 0.0625, iterations: 5, conductance: 1. Note: Should try with and without GAD. Sandy suggested GAD can cause troubles for EM.

Step 3: Initial registration 6+9+12 DOF registration. Tools: BRAINSFit svn r301. Parameters: default except CenterOfHead initializer with ROIAUTO sampling region. Comments: failure to recover the pose for Hugo and Valentino (both have severe head tilt in all three planes). Execution time: ~2 min per subject.

Step 4: Manual pose alignment for Hugo and Valentino. Transforms "hardened" in Slicer MRML, volumes saved and re-registered same way as described in Step 3. Registration issue resolved. Tools: Slicer Transforms module, BRAINSFit.

Step 5 -- Ginger: Manual ICC for Tommy. Tools: itkSNAP, manual editing by Ginger. Tried Xiaodong's SkullStrippingModule, no luck.

Step 6: Editing of ICC label map. Tools: Slicer smoothing label map module. Parameters: 10 iterations.

Step 7: Manual mask dilation, so that each brain of each subject following registration in Step is contained. Tools: Slicer Editor module. Parameters: 8-neighbor, repeated 3 times.

Step 8: Resampling of the ICC to each subject. Tools: Slicer ResampleVolume2 command line module. Parameters: NN interpolation.

Step 9: Bias field correction with ICC. Tools: Slicer N3MRILightCLI extension. Parameters: default values except number of iterations increased from 50 to 100, convergence threshold decreased from 0.001 to 0.0001, ICC label from Step 8. Execution time: < 2 min per subject. Comments: There are some parameters in N3 which we understand and can play with. Subjective (?) trying to evaluate if the result is better. Note: should also try not correcting for bias field outside EM.

Step 10 -- we are here right now: Pipelined registration (6+9+12+BSpline). Tried: (1) ICC ROI from step for moving floating, BSpline step segfaults; (2) ROIAUTO (same as in Step 3), BSpline completes, but resampled volume does not make any sense. AF: I suspect BSpline registration may not be able to handle non-axis-aligned volumes. Comments: When resampling, do not forget to use higher order interpolator. Debugging data: File:Tommy-Calvin-bspline registration.tgz

Step 11: Average all subjects to get average template.

Step 12: Manually edit ICC labels for each subject, skull strip here or after Step 9, edit and repeat all steps to improve registration.

Remaining steps:

  • Segment GM/WM/CSF+Putamen/Caudate/Hippocampus in the averaged template.
  • Invert the deformation field from Step 10 (Step 12?), and map the segmentations to the individual subjects.
  • Manually edit each subject labels. Map back to the average template and calculate the probabilities atlas.
  • Run EM Segmenter to get the bias field. Repeat again?

Template Gucci

Following the discussion during Oct'09 meeting, the agreement is that Gucci is the best subject to be used as a template for atlas building (see meeting notes). The current progress in atlas construction will be reported here.

Transforms, scripts and other relevant material (except data) will be maintained on the NAMIC Sandbox here: http://viewvc.slicer.org/viewcvs.cgi/trunk/VervetAtlas/?root=NAMICSandBox

Step 1 Prepare the data using instructions. Result: <Subject>-raw.nrrd

Step 2 Discard the directions matrix from the input data using DiscardDirectionCosines Slicer extension. Images with non-orthogonal orientation result in poor performance of B-spline registration at a later step. Result: <Subject>-axial.nrrd

Step 2 Segment Gucci (template) ICC manually using ITK-SNAP (spline editing capabilities, not available in Slicer). Result: Gucci-ICC.nrrd

Step 3 Register subjects to template with BRAINSFit. (--transformType Rigid,ScaleVersor3D,ScaleSkewVersor3D,Affine,BSpline --initializeTransformMode CenterOfHead). Save the resulting bulk transform (Affine+BSpline) as .tfm (problems reading .mat transforms have been observed with different tools).

Step 4 Invert the transform using this tool, recover ICC for each subject by applying the inverse transform to the ICC of Gucci. Resampling should be performed with ApplyWarp tool from BRAINSDemonWarp package. ResampleVolume2 from Slicer does not give consistent results and has not been tested with bulk Affine+BSpline transform (bug report #709 submitted)


TODO:

  • compare ICC volume across subjects?
  • ventricles volume appears to be very different across subjects -- is this normal? -- Ok, confirmed with Sota

Progress

Most recent first

  • Nov 30, 2009:
    • subcorticals now with hippocampus for one hemisphere)
    • label image mirror tool in Sandbox (to simplify second hemisphere segmentation)
  • Nov 23, 2009:
  • Nov 19, 2009:
    • ApplyWarp tool from BRAINSDemonWarp produces resampled image consistent with the output of BRAINSFit for affine+bspline bundled transform.
    • N4 bias correction tested.
    • ICC segmentations for subjects are ready for the subjects registered to template, bspline deformation inversion tool is in progress (Ginger)
    • initial subcortical segmentations are ready (one hemisphere)
  • Nov 16, 2009: Average template ready, started working on subcortical structures segmentation (AF under Ron's guidance)
Gucci axial slice (#94) showing contrast for thalamus, globus pallidus, putamen
Same slice, template averaged from registered images
Same slice, template averaged from resampled images
Same slice, difference between 2 and 3
  • Nov 13, 2009: A significant non-rigid discrepancy between the registered image produced by BRAINSFit and the image resampled with the ResampleVolume2 and the transform produced by BRAINSFit.
  • Oct 29, 2009: experiments with the input data resampled to be axis-aligned showed significant improvement of the performanc in BSplpine registration. Added a module to discard direction cosines from the input images (http://svn.na-mic.org/NAMICSandBox/trunk/VervetAtlas/Tools/DiscardDirectionCosines/). Need to re-think the workflow in light of this. Likely, we will not be able to impose AC-PC alignment on the template subject.
  • Oct 27, 2009: discussed the possibility of applying groupwise registration to the vervet data with Lilla Zollei. Lilla has the data,
  • Oct, 2009:
    • AF: Progress with workflow stalled, since BSpline registration does not perform well with the current data
    • GL: ICC prepared for Gucci, initial attempts to manually segment GM/WM. Difficulties identifying basal ganglia.
    • GL: Watershed segmentation considered as a tool to help with manual segmentation. CLI module in preparation.
    • AF: Experiments with EM Segmenter to segment GM/WM, ECC+CSF masked out. Not successful.
    • AF: ITK 3.16 is required to handle image orientation. Slicer updated accordingly, initial problems with BRAINSFit resolved, but the results are not satisfying (TODO: put images)