Skip to content

Commit 94bea5a

Browse files
committed
DOC: add additional sorting details to the parrec API docs
1 parent 7d9c8f2 commit 94bea5a

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

nibabel/parrec.py

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,28 @@
9696
``nibabel.load`` (or ``parrec.load``) should be set to ``True``. The fields
9797
that are taken into account during sorting are:
9898
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
10699
- slice number
100+
- echo number
101+
- cardiac phase number
102+
- gradient orientation number
103+
- diffusion b value number
104+
- label type (ASL tag vs. control)
105+
- dynamic scan number
106+
- image_type_mr (Re, Im, Mag, Phase)
107+
108+
Slices are sorted into the third dimension and the
109+
order of preference for sorting along the 4th dimension corresponds to the
110+
order in the list above. If the image data has more than 4 dimensions these
111+
will all be concatenated along the 4th dimension. For example, for a scan with
112+
two echos and two dynamics, the 4th dimension will have both echos of dynamic 1
113+
prior to the two echos for dynamic 2.
114+
115+
The``get_volume_labels`` method of the header returns a dictionary containing
116+
the PAR field labels for this 4th dimension.
107117
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.
118+
The volume sorting described above can be enabled in the parrec2nii command
119+
utility via the option "--strict-sort". The dimension info can be exported
120+
to a CSV file by adding the option "--volume-info".
111121
"""
112122
from __future__ import print_function, division
113123

0 commit comments

Comments
 (0)