Skip to content

Commit 7d9c8f2

Browse files
committed
DOC: add info on sorting to API docs for PAR/REC
1 parent 9909550 commit 7d9c8f2

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

nibabel/parrec.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,28 @@
8686
Philips XML header files, and some previous experience, suggest that the REC
8787
data is always stored as 8 or 16 bit unsigned integers - see
8888
https://github.com/nipy/nibabel/issues/275
89+
90+
Data Sorting
91+
############
92+
93+
PAR/REC files have a large number of potential image dimensions. To handle
94+
sorting of volumes in PAR/REC files based on these fields and not the order
95+
slices first appear in the PAR file, the ``strict_sort`` flag of
96+
``nibabel.load`` (or ``parrec.load``) should be set to ``True``. The fields
97+
that are taken into account during sorting are:
98+
99+
- image_type_mr (Re, Im, Mag, Phase)
100+
- dynamic scan number
101+
- label type (ASL tag vs. control)
102+
- diffusion b value number
103+
- gradient orientation number
104+
- cardiac phase number
105+
- echo number
106+
- slice number
107+
108+
If the image data has more than 4 dimensions these will all be concatenated
109+
along the 4th dimension. The``get_volume_labels`` method of the header returns
110+
a dictionary containing the PAR field labels for this 4th dimension.
89111
"""
90112
from __future__ import print_function, division
91113

0 commit comments

Comments
 (0)