diff --git a/fsl/transform/nonlinear.py b/fsl/transform/nonlinear.py index ec2cef1428f5c9cc2f816c9f9949a16041c15b9f..630116ec3252546a7eab17b2cf5d3c49b252a39b 100644 --- a/fsl/transform/nonlinear.py +++ b/fsl/transform/nonlinear.py @@ -456,7 +456,7 @@ class CoefficientField(NonLinearTransform): :arg premat: If ``True``, the inverse :meth:`srcToRefMat` is applied to the coordinates after the displacements have been - addd. + added. :returns: ``coords``, transformed into the source image space """ @@ -465,7 +465,7 @@ class CoefficientField(NonLinearTransform): def displacements(self, coords): - """Calculate the relative displacemenets for the given coordinates. + """Calculate the relative displacements for the given coordinates. :arg coords: ``(N, 3)`` array of reference image voxel coordinates. :return: A ``(N, 3)`` array of relative displacements to the diff --git a/fsl/transform/x5.py b/fsl/transform/x5.py index 3c784a8b6be29e37b741038183f2ffa81a1fdaa3..67f406628bc44b9b9ebc5e7100397375ff7b1bfd 100644 --- a/fsl/transform/x5.py +++ b/fsl/transform/x5.py @@ -88,18 +88,18 @@ shape, dimensions, and voxel-to-world affine transformation. Groups of type *space* have the following fields: -+-------------+-----------+---------------------------------------------------+ -| **Name** | **Type** | **Value/Description** | -+-------------+-----------+---------------------------------------------------+ -| ``Type`` | attribute | ``'image'`` | -+-------------+-----------+---------------------------------------------------+ -| ``Size`` | attribute | ``uint64`` ``(X, Y, Z)`` voxel dimensions | -+-------------+-----------+---------------------------------------------------+ -| ``Scales`` | attribute | ``float64`` ``(X, Y, Z)`` voxel pixdims | -+-------------+-----------+---------------------------------------------------+ -| ``Mapping`` | affine | The image voxel-to-world transformation (its | -| | | ``sform``) | -+-------------+-----------+---------------------------------------------------+ ++--------------+-----------+--------------------------------------------------+ +| **Name** | **Type** | **Value/Description** | ++--------------+-----------+--------------------------------------------------+ +| ``Type`` | attribute | ``'image'`` | ++--------------+-----------+--------------------------------------------------+ +| ``Size`` | attribute | ``uint64`` ``(X, Y, Z)`` voxel dimensions | ++--------------+-----------+--------------------------------------------------+ +| ``Scales`` | attribute | ``float64`` ``(X, Y, Z)`` voxel pixdims | ++--------------+-----------+--------------------------------------------------+ +| ``Mapping/`` | affine | The image voxel-to-world transformation (its | +| | | ``sform``) | ++--------------+-----------+--------------------------------------------------+ *deformation* @@ -131,19 +131,19 @@ coordinate system. Groups of type *deformation* have the following fields: -+-------------+-----------+---------------------------------------------------+ -| **Name** | **Type** | **Value/Description** | -+-------------+-----------+---------------------------------------------------+ -| ``Type`` | attribute | ``'deformation'`` | -+-------------+-----------+---------------------------------------------------+ -| ``SubType`` | attribute | ``'absolute'`` or ``'relative'``. | -+-------------+-----------+---------------------------------------------------+ -| ``Matrix`` | dataset | The deformation field - a ``float64`` array of | -| | | shape ``(X, Y, Z, 3)`` | -+-------------+-----------+---------------------------------------------------+ -| ``Mapping`` | affine | The field voxel-to-world transformation (its | -| | | ``sform``) | -+-------------+-----------+---------------------------------------------------+ ++--------------+-----------+--------------------------------------------------+ +| **Name** | **Type** | **Value/Description** | ++--------------+-----------+--------------------------------------------------+ +| ``Type`` | attribute | ``'deformation'`` | ++--------------+-----------+--------------------------------------------------+ +| ``SubType`` | attribute | ``'absolute'`` or ``'relative'``. | ++--------------+-----------+--------------------------------------------------+ +| ``Matrix`` | dataset | The deformation field - a ``float64`` array of | +| | | shape ``(X, Y, Z, 3)`` | ++--------------+-----------+--------------------------------------------------+ +| ``Mapping/`` | affine | The field voxel-to-world transformation (its | +| | | ``sform``) | ++--------------+-----------+--------------------------------------------------+ Linear X5 files @@ -204,7 +204,7 @@ between FLIRT-style matrices and X5 style matrices. .. [*] For a given image, FSL coordinates are voxel coordinates scaled by the - ``pixdim`` values in the NIFTI header, and an inversion along the X + ``pixdim`` values in the NIFTI header, with an inversion along the X axis if the voxel-to-world affine (the ``sform``) has a positive determinant. @@ -269,9 +269,9 @@ Storage of FSL FNIRT warp fields in non-linear X5 files ------------------------------------------------------- -FLIRT outputs the result of a non-linear registration from a source image to a -reference image as either a warp field, or a coefficient field which can be -used to generate a warp field. A warp field is defined in terms of the +FLIRT outputs the result of a non-linear registration between a source image +and a reference image as either a warp field, or a coefficient field which can +be used to generate a warp field. A warp field is defined in terms of the reference image - the warp field has the same shape and FOV as the reference image, and contains either: @@ -316,6 +316,7 @@ to source image world coordinates. The :mod:`fsl.transform.fnirt` module contains functions which can be used to perform all of the conversions and adjustments required to store FNIRT transformations as X5 files. + """ @@ -341,11 +342,11 @@ class X5Error(Exception): def inferType(fname): - """Return the type of the given X5 file - either ``'linear'``or + """Return the type of the given X5 file - either ``'linear'`` or ``'nonlinear'``. :arg fname: Name of a X5 file - :returns: ``'linear'``or ``'nonlinear'`` + :returns: ``'linear'`` or ``'nonlinear'`` """ with h5py.File(fname, 'r') as f: @@ -405,7 +406,7 @@ def readNonLinearX5(fname): """Read a nonlinear X5 transformation file from ``fname``. :arg fname: File name to read from - :returns: A :class:`.DisplacementField` or :class:`.CoefficientField` + :returns: A :class:`.DeformationField` """ with h5py.File(fname, 'r') as f: @@ -432,7 +433,7 @@ def writeNonLinearX5(fname, field): """Write a nonlinear X5 transformation to ``fname``. :arg fname: File name to write to - :arg field: A :class:`.DisplacementField` or :class:`.CoefficientField` + :arg field: A :class:`.DeformationField` """ with h5py.File(fname, 'w') as f: diff --git a/fsl/wrappers/wrapperutils.py b/fsl/wrappers/wrapperutils.py index 541c383a5a7d564ab37cde61cb47eff5c9a89fdd..c89afb2aadb002e1e6838235578ce124ce4caf41 100644 --- a/fsl/wrappers/wrapperutils.py +++ b/fsl/wrappers/wrapperutils.py @@ -448,7 +448,7 @@ class _FileOrThing(object): ``dict``-like object, where the function's actual return value is accessible via an attribute called ``output``. All output arguments with a value of ``LOAD`` will be present as dictionary entries, with the keyword - argument names used as keys. Any ``LOAD``ed output arguments which were not + argument names used as keys. Any ``LOAD`` output arguments which were not generated by the function will not be present in the dictionary.