From 554caeff4b663bb7d04540d0d0a468c346c4479c Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauldmccarthy@gmail.com> Date: Sat, 13 Jul 2019 12:08:45 +0100 Subject: [PATCH] DOC: Minor tweaks --- fsl/data/image.py | 7 +++++++ fsl/transform/x5.py | 13 +++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/fsl/data/image.py b/fsl/data/image.py index d4edf9690..415018c2a 100644 --- a/fsl/data/image.py +++ b/fsl/data/image.py @@ -329,6 +329,13 @@ class Nifti(notifier.Notifier, meta.Meta): log.debug('FNIRT coefficient field detected - generating affine') + # Knot spacing is stored in the pixdims + # (specified in terms of reference image + # voxels), and reference image pixdims + # are stored as intent code parameters. + # If we combine the two, we can at least + # get the shape/size of the coefficient + # field about right knotpix = header.get_zooms()[:3] refpix = (header.get('intent_p1', 1), header.get('intent_p2', 1), diff --git a/fsl/transform/x5.py b/fsl/transform/x5.py index e1e709fcf..ca32f0965 100644 --- a/fsl/transform/x5.py +++ b/fsl/transform/x5.py @@ -175,17 +175,17 @@ or a *knot*. Evaluating the spline functions at a particular location in the grid will -result in a relative displacement which can be applied to that location's +result in a relative displacement which can be added to that location's reference image coordinates, in order to determine the corresponding source image coordinates. The shape of this coefficient grid is not necessarily the same as the shape of the reference image grid. For this reason, some additional parameters are -stored in coefficient field files, in a sub-group called ``/Parameters``: +stored in coefficient field files, in a sub-group called ``/Parameters/``: - The distance between control points, defined in terms of reference image - voxels + voxels. - An affine transformation which can be used to transform reference image voxel coordinates into coefficient field voxel coordinates. @@ -203,8 +203,9 @@ some other coordinate system. Howewer, if the transformation does not transform between source and reference -image **world** coordinates, the ``/Pre`` and ``/Post`` affine transformations -must be provided. +image **world** coordinates, the ``/Pre/`` and ``/Post/`` affine +transformations must be provided. + The ``/Pre/`` affine transformation will be used to transform reference image world coordinates into the reference image coordinate system required for use @@ -257,7 +258,7 @@ File format specification Non-linear X5 transformation files are assumed to adhere to the following -HDF5 structure: +HDF5 structure. All fields are required unless otherwise noted: +---------------------+-----------+-------------------------------------------+ -- GitLab