# Coordinate Systems

Written by Andrew Taylor

{% file src="/files/dabrCtwJfrfUQ8E6re9D" %}

* **Image Spaces (associated with distinct coordinate system)**
  * Native space – coordinates unique to subject’s head placement in MRI scanner
  * Standard space – standard defined world coordinates across all images in this space define anatomy location (images in this space can have differ resolutions)
* **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)
* **qform and sform Matrices**

  PURPOSE: Used to convert voxel coordinates into world coordinates

  o   qform & sform stored in the Nifti File

  o   Historically, both matrices in a file to keep track of scanner coordinate system (qform) and standard space coordinates (sform); in practice not used; one matrix usually set to 0)

  o   Meaningful only if have a NON-ZERO code (0=unknown)


---

# 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/general-concepts/coordinate-systems.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.
