# Registration

## Essential Concepts <a href="#essential-concepts" id="essential-concepts"></a>

* **Image Spaces (associated with distinct coordinate system)**
  * Native space – coordinates unique to subject’s head placement in MRI scanner
  * Standard space – standard defined coordinates across all images in this space define anatomy location
    * Images in this space can have different resolution
* **Coordinate Systems**
  * Voxel coordinates
    * no units; integers
    * voxel count in each dimension reflecting matrix size
    * Origin: corner of image (e.g., 0,0,0 or 1,1,1)
    * Origin and axes naming conventions differ in programs
  * World coordinates
    * Have units in mm; floating values
    * Denote anatomy
      * Handedness system
        * Right-handed (RAS) system
          * x+ Left-Right
          * y+ Posterior-Anterior
          * z+ Inferior-Superior
          * Default for: MNI152 space, NifTi
      * LPS system
        * Default for: Dicom
  * Origin: can differ in programs, standard space (e.g., MNI152 space origin at anterior commissure)
* **Standard Templates**
  * RULE: Know demographics of cases used to generate atlas, try match template and study cohort
  * Talairach and Tournoux (TT space)
    * 1 postmortem brain, female, 60 years old
  * MNI152/ICBM 152 (MNI152 space)
    * 152 healthy young adults
  * Study-Specific Templates (Study Specific space)
    * Need substantial representative cases to make
* **Standard Atlas**
  * RULE: Know demographics of cases used to generate atlas; MAY BE DIFFER from template in same space, try match atlas, template and study cohort
  * Talairach and Tournoux (MNI152 space) - discrete
    * 1 postmortem brain, female, 60 years old
  * AAL (MNI152 space) - discrete
    * Multiple scans from 1 healthy adult
  * Harvard-Oxford (MNI152 space) - probabilistic
    * 37 healthy adults
  * JHU WM (MNI152 space) – probabilistic
    * 28 young healthy adults

## Registration Decision Points

* Prep - QC input & reference images
  * Artifacts
  * Sharpness of anatomical features
  * Variability of anatomy
  * Comparable demographics (e.g., atlas, standard template, study cohort)
  * FOV sampling of body similar (e.g., amount of neck included)
* Prep - Reorient (optional)
  * Initialization
* Prep - Crop (optional)
  * Remove non brain areas in FOV in both images so sampling similar (e.g., neck)
* Prep - Brain extraction of input & reference image (optional)
  * RULE: input & reference image MUST match in skull sampling (BAD: 1 w/skull, 1 w/out)
  * Quality needs to be good, if not – better to not do
* Registration - Spatial transformations
  * DEFINITION: *Calculate* the best alignment of the images by determining parameters of the spatial transformation
  * Linear Transformation (within-subject, same anatomy)
    * Rigid-Body (6-DOF: 3 rotations, 3 translations)
      * Within-subject registration
      * Initializing other methods
    * Affine (12-DOF: 3 rotations, 3 translations, 3 scaling, 3 sheers/skews)
      * Eddy-current distortion correction
      * Initializing nonlinear transformations
  * Non-linear Transformation/Warp (between-subject, differ anatomy)
    * 12+ DOF
      * REQUIRE: Initialization with affine registration
* Resample/Transform – *Apply* the spatial transformation & creating image in new space
  * RULE: Avoid degradation of images; resample/interpolate only 1x
  * Create and check quality of separate registrations before concatenating and applying to image 1x


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bridge-lab.gitbook.io/docs/imaging/image-analysis/registration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
