Projects:RegistrationDocumentation:Developer

From NAMIC Wiki
Revision as of 17:37, 10 November 2009 by Meier (talk | contribs) (→‎GUI)
Jump to: navigation, search
Home < Projects:RegistrationDocumentation:Developer

Back to ARRA main page
Back to Registration main page
Registration Use-case Inventory

GUI

  • Parameter Presets: To navigate the jungle of parameter settings and avoid complex GUI design efforts, all parameters are listed and controllable via a preset dropdown menu. The menu can then be labeled by use cases i.e. combinations of MR-MR, same contrast, inter-subject, inter-modality, fast, precise etc. Parameter sets can be saved to files and shared. Each preset becomes a menu entry. This will enable building a library of presets that can be shared among users also. Each preset is associated with a MRML file like this one.
  • Module Design: Separate those functions that use different algorithms and cost functions. Top level distinction Fiducials/Intensity seems most intuitive. As the user I then combine my workflow from the selection below. We also have a clean modular design where changes in one do not that easily spill over to the other.Hence we'd have the following sub-modules within Registration:
1. Manual Affine
interactive visual alignment with 6-12 DOF using Transforms module. This is a good tool for cases in need of an initialization.
2. Fiducials Affine
solves Procrustes registration problem with 6-12 DOF using ICP or similar Input: fiducial pairs. This is the final destination for registration that cannot be accomplished otherwise.
3. Fiducials BSpline
creates an interpolation grid from fiducials (Krigging or similar): Input: fiducial pairs
4. Intensity Affine
creates Affine Xform, Input: image pair
5. Intensity BSpline
creates BSpline Xform, Input: Affine aligned image pair.
6. Xform Concatenation
combines multiple Xforms
7. Interpolator
applies Affine and/or BSpline Xform and resamples image data
8. Evaluation
registration quality assessment. This may be better integrated with each of the above modules instead of a separate module, esp. when using measurements such as final cost function. Visualization also may depend on DOF.
  • The GUI can list the many combination as a single list of checkboxes for increasing DOF. The full list would be 3,6,7,9,12,b . The checked boxes provide the input string for the recursive call. Media:DOFHierarchy_GUI.jpg‎
  • Tooltip link:direct links to Reference Manual from Widget tooltips? Can the static text or widget itself launch a link to the Reference manual entry on the Documentation Wiki? That would enable a one-click answer to "What does this button do?" Casey suggested a little ? button next to each widget. Opportunities exist with the new QT-widget enabled webkit to integrate online documentation live into the application.
  • Parameter Settings Wizard: the wizard is basically the hierarchical form of the Parameter Presets. As the presets become comprehensive, the list evolves into a tree (which corresponds to our Use Case Hierarchy Tree). Traversing this tree can be done with a Wizard that asks questions to branch. At the end is a set of presets. So there's 3 ways to pick the parameters: 1) directly from the dropdown Custom Presets menu, 2) via the Wizard, 3) by setting each manually

Algorithm/Strategic

  • Transform Concatenation: (partially available: harden transforms) Multiple spatial transforms applied to the same volume appear as nested MRML entries, which can be collapsed. Important to apply before a volume resampling is executed to avoid accumulation of interpolation effects. Affine is simple matrix multiplication, Bspline would have to send the gridpoints through all Xforms and reparameterize. A complete system of arranging multiple registrations also needs an easy copy function for all MRML entry data (images and Xforms). More Details.
  • Recursive DOF hierarchy: Both multi-resolution and the sequence of calls with increasing DOF could be implemented as a single recursive scheme. The caller provides an array of DOF and a matching array of resolution levels, which is processed by recursive calls with the first/last element taken from the list. A simulation Matlab program and example is here: Projects:RegistrationImprovement:RecursiveScheme
  • Offline WIKI: can the documentation WIKI be downloaded and used offline, e.g. for laptop users?
  • Affine SVD: (in development) decomposition of affine into the 4 3DOF components: translation, rotation, scaling, shearing. Can an SVD do this for 12DOF vs. 3 DOF? Having values that relate directly to geometry can help greatly in evaluating and adjusting results. E.g. user can tell visually which of the 3 rotations is most out of alignment. Checking the result rotation angles already provides a quick check and valuable info about where things went awry if solution is suboptimal. Also enables to decouple individual elements, i.e. extract the shear component etc. The current "Transforms" module already does this for translation & rotation, but the scale and shear portions are missing.
  • Distortion Correction: e.g. spherical harmonics Gradient Nonlinearity correction (BIRN) is a form of spatial Xform to be housed in the Registration or Transformations module.
  • Volumes/Display' would it be possible to have a switch in the selected volume here automatically trigger a switch in the FG/BG toggle if all FG/BG views have uniform images assigned (i.e. all FG panels show same image)

Result Evaluation Tools

  • Registration Metrics: Can we use the Label Map Hausdorff Distance Feature ?
  • Methods design: We can categorize 2 ways at the top level: Affine/BSpline or Fiducial/Intensity. All 4 combinations will likely use different algorithms: Fiducial+Affine = Procrustes, Fiducial+Bspline = direct fitting/krigging , Intensity+Affine = 12 DOF optimizer, Intensity+BSpline = non-rigid. Fiducial/Intensity obviously use different cost function, whereas Affine/BSpline is a distinction in spatial DOF. So Fiducial/Intensity seems to be the more intuitive choice as top level distinction.
  • Registration Evaluation/Quality Assessment: tools for the user to tell : "how good is this?" "can I get this better still?" "is this about as good as it gets?"
    • Compare 2 transforms: how diffferent are 2 transforms: run fiducial set through one and the invert of the other and report distance. Allow cross-fading between 2 transforms w/o creating duplicate
    • Checkerboard Display, as shown in Vervet Registration Example.
    • Fiducial RMS Error fiducial markers set by the user on both images. Tool returns RMS distance error. Pick points inside and at the margins of your analysis ROI, i.e. if taking metrics from entire brain, use fiducials posterior and anterior, superior and inferior, because alignment quality may differ. The tool should also return the variance of RMS, because that gives an idea of possible improvement: if the error is very low in some but large in other areas, chances for improvement may be less than if a steady error bias is seen across all fiducials. Hausdorff Distance.
    • ROI Similarity Metric: quick similarity metric report on a manually chosen ROI, e.g. draw a box and see the image similarity metric in that box.
    • Cost Function Visualizer: visualize the cost function optimization curve. and possibly a history of the tried movement: e.g. a movie of a grid/box moving thru the optimization. That will tell the user if a particular position was ever explored or not, and if/which parameters should be adjusted based on that.
      • extract cost function value as registr. quality metric (-> currently via ErrorLog )
      • graphic representation of registr. progress (both cartesian and cost function), maybe realtime?
      • stepable movie of concatenated functions (e.g. rigd, affine, B-spline etc. visualized on simple grid/cube)
    • Fiducial Weights: this is tricky, but consider a set of manually set fiducials to be integrated with the intensity metric 1) make sure those points are among the point set and have a large (custom) weight, 2) have fiducial RMS distance contribute to the cost function: this is difficult because we're mixing metrics and a good balance thru normalization may be hard to achieve. But 1) would be interesting, in the sense that it tells the registration to emphasize that region in sampling. In the most extreme case this could be done via the mask image, where the mask value determines the weight, i.e. 0= ignore, 1=count 100%. The user could then draw and edit the mask image manually.
  • Procrustes/Manual Fiducial Registration: As a final destination/last resort for all tough cases it would be great to offer this. User selects fiducial pairs and Slicer calculates rigid/affine even BSpline registration. This is currently offered in the Register Images module in the form of Landmarks as initialization and None as Registration. Implementation Pending? Preferable for modular design to have a separate tab/module because it will be using another algorithm. Esp. in conjunction with Xfrom concatenation this could be a great asset, i.e. the user can nudge things little by little and get closer to an ideal case and also undo,i.e. delete, a Xform that made things worse, and in the end merge/flatten them all. See also 'Adjustment Layers' below.


Processing & Bug Notes

  • to run slicer3.5 on fat node: on X11: ssh -Y george; cd /workspace/meier
  • NRRD (.nhdr) files seem to load only when raw file is compressed (raw.gz). Should be fixed (i.e. specific error message suggesting zipping) or documented
  • data loading method needs to cleanup: it leaves "X11" active objects behind: progress bars. Not a refresh issue. Objects close when X11 closes.