diff --git a/doxygen/doxygengroups.h b/doxygen/doxygengroups.h new file mode 100644 index 000000000..ece254fed --- /dev/null +++ b/doxygen/doxygengroups.h @@ -0,0 +1,55 @@ +/* +CCP PETMR Synergistic Image Reconstruction Framework (SIRF) +Copyright 2019 University College London + +This is software developed for the Collaborative Computational +Project in Positron Emission Tomography and Magnetic Resonance imaging +(http://www.ccppetmr.ac.uk/). + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +// define some doxygen groups and namespace +// This file does not contain any code + +/*! \namespace sirf + \brief Namespace for the SIRF library (and some/most of its applications) + + This namespace encompasses the whole + library. All classes, functions and symbols are in this namespace. + This has the effect that conflicts with any other library is + impossible (except if that library uses the same namespace...). +*/ + +/*! +\defgroup PET SIRF PET +\ingroup SIRF +All PET functionality of SIRF. +*/ + +/*! +\defgroup MR SIRF MR +\ingroup SIRF +All MR functionality of SIRF. +*/ + +/*! +\defgroup Registration SIRF registration +\ingroup SIRF +All registration/resampling functionality of SIRF. +*/ + +/*! +\defgroup Synergistic SIRF synergistic +\ingroup SIRF +All synergistic functionality of SIRF. +*/ diff --git a/src/Registration/cReg/NiftiImageData3D.cpp b/src/Registration/cReg/NiftiImageData3D.cpp index 5ae6f5454..b47a6ed63 100644 --- a/src/Registration/cReg/NiftiImageData3D.cpp +++ b/src/Registration/cReg/NiftiImageData3D.cpp @@ -21,7 +21,7 @@ limitations under the License. /*! \file \ingroup Registration -\brief Base class for SIRF image data. +\brief Base class for 3D SIRF image data. \author Richard Brown \author CCP PETMR diff --git a/src/Registration/cReg/NiftiImageData3DTensor.cpp b/src/Registration/cReg/NiftiImageData3DTensor.cpp index 46be27ac4..58fdd1e72 100644 --- a/src/Registration/cReg/NiftiImageData3DTensor.cpp +++ b/src/Registration/cReg/NiftiImageData3DTensor.cpp @@ -21,7 +21,7 @@ limitations under the License. /*! \file \ingroup Registration -\brief Class for deformation and displacement SIRF image data. +\brief Class for tensor SIRF image data. \author Richard Brown \author CCP PETMR diff --git a/src/Registration/cReg/NiftyRegistration.cpp b/src/Registration/cReg/NiftyRegistration.cpp index 85a8c8295..85a9401dd 100644 --- a/src/Registration/cReg/NiftyRegistration.cpp +++ b/src/Registration/cReg/NiftyRegistration.cpp @@ -21,7 +21,7 @@ limitations under the License. /*! \file \ingroup Registration -\brief Base class for all SIRF registration. +\brief Base class for all NiftyReg registration algorithms. \author Richard Brown \author CCP PETMR diff --git a/src/Registration/cReg/Resample.cpp b/src/Registration/cReg/Resample.cpp index 8f14ef619..bb95513e1 100644 --- a/src/Registration/cReg/Resample.cpp +++ b/src/Registration/cReg/Resample.cpp @@ -21,7 +21,7 @@ limitations under the License. /*! \file \ingroup Registration -\brief bstract resampling base class +\brief Abstract resampling base class \author Richard Brown \author CCP PETMR diff --git a/src/Registration/cReg/include/sirf/cReg/AffineTransformation.h b/src/Registration/cReg/include/sirf/cReg/AffineTransformation.h index 62e6708dc..dd3878b8e 100644 --- a/src/Registration/cReg/include/sirf/cReg/AffineTransformation.h +++ b/src/Registration/cReg/include/sirf/cReg/AffineTransformation.h @@ -33,7 +33,12 @@ limitations under the License. #include "sirf/cReg/Transformation.h" namespace sirf { -///Class for affine transformations +/*! +\ingroup Registration +\brief Class for affine transformations. +\author Richard Brown +\author CCP PETMR +*/ template class AffineTransformation : public Transformation { diff --git a/src/Registration/cReg/include/sirf/cReg/ImageWeightedMean.h b/src/Registration/cReg/include/sirf/cReg/ImageWeightedMean.h index dcd4bc11f..439147465 100644 --- a/src/Registration/cReg/include/sirf/cReg/ImageWeightedMean.h +++ b/src/Registration/cReg/include/sirf/cReg/ImageWeightedMean.h @@ -37,7 +37,16 @@ namespace sirf { // Forward delcarations template class NiftiImageData; -/// Calculate the weighted mean of a set of images +/*! +\file +\ingroup Registration +\brief Perform weighted mean of multiple images. + +TODO - would be simple for this to work in terms of ImageData instead of NiftiImageData. + +\author Richard Brown +\author CCP PETMR +*/ template class ImageWeightedMean { diff --git a/src/Registration/cReg/include/sirf/cReg/NiftiImageData.h b/src/Registration/cReg/include/sirf/cReg/NiftiImageData.h index 27cb45f04..6be5b2d10 100644 --- a/src/Registration/cReg/include/sirf/cReg/NiftiImageData.h +++ b/src/Registration/cReg/include/sirf/cReg/NiftiImageData.h @@ -23,22 +23,6 @@ limitations under the License. \ingroup Registration \brief Base class for SIRF nifti image data. -Generally SIRF (not necessarily NiftyReg) will preferentially use -the qform over the sform code. This is the same for ITK and ANTs, but -is not the case for SPM/MRIcroGL/FSLeyes/Mango. - -qform/sform -The qform code describes "scanner-anatomical" coordinates, whereas the -sform code describes the location of the voxels in some standard space. - -For qform > 0, the origin of coordinates would generally be whatever -the scanner origin is; for example, in MRI, (0,0,0) is the center -of the gradient coil. - -For sform > 0, the origin of coordinates would depend on the value -of sform_code; for example, for the Talairach coordinate system, -(0,0,0) corresponds to the Anterior Commissure. - \author Richard Brown \author CCP PETMR */ @@ -57,7 +41,37 @@ of sform_code; for example, for the Talairach coordinate system, namespace sirf { -/// SIRF image data +/*! +\file +\ingroup Registration +\brief Base class for SIRF's nifti image data. + +This is a wrapper around the basic nifti_image (stored as a sptr), +with extra functionality. + +This is the general form, and any number of dimensions are allowed. +This is contrary to the derived classes, which have specific requirements +(e.g., NiftiImageData3DDeformation requires 5 dimensions, of which the 4th (time) == 1). + +To move between different images types (e.g., STIRImageData and MRImageData), +we need to know the patient's position relative to the scanner. For this, only +qform_code == 1 will suffice. + +qform/sform +The qform code describes "scanner-anatomical" coordinates, whereas the +sform code describes the location of the voxels in some standard space. + +For qform > 0, the origin of coordinates would generally be whatever +the scanner origin is; for example, in MRI, (0,0,0) is the center +of the gradient coil. + +For sform > 0, the origin of coordinates would depend on the value +of sform_code; for example, for the Talairach coordinate system, +(0,0,0) corresponds to the Anterior Commissure. + +\author Richard Brown +\author CCP PETMR +*/ template class NiftiImageData : public ImageData { diff --git a/src/Registration/cReg/include/sirf/cReg/NiftiImageData3D.h b/src/Registration/cReg/include/sirf/cReg/NiftiImageData3D.h index 206c44682..783b76b78 100644 --- a/src/Registration/cReg/include/sirf/cReg/NiftiImageData3D.h +++ b/src/Registration/cReg/include/sirf/cReg/NiftiImageData3D.h @@ -21,7 +21,7 @@ limitations under the License. /*! \file \ingroup Registration -\brief Base class for SIRF image data. +\brief 3D Nifti image. \author Richard Brown \author CCP PETMR @@ -33,7 +33,15 @@ limitations under the License. namespace sirf { -/// SIRF image data +/*! +\ingroup Registration +\brief 3D Nifti image. + +Here, we require that the number of dimensions == 3. + +\author Richard Brown +\author CCP PETMR +*/ template class NiftiImageData3D : public NiftiImageData { diff --git a/src/Registration/cReg/include/sirf/cReg/NiftiImageData3DDeformation.h b/src/Registration/cReg/include/sirf/cReg/NiftiImageData3DDeformation.h index 9c5c4e9c3..7fec37215 100644 --- a/src/Registration/cReg/include/sirf/cReg/NiftiImageData3DDeformation.h +++ b/src/Registration/cReg/include/sirf/cReg/NiftiImageData3DDeformation.h @@ -21,7 +21,7 @@ limitations under the License. /*! \file \ingroup Registration -\brief Class for deformation/displacement SIRF image data. +\brief Class for deformation SIRF image data. \author Richard Brown \author CCP PETMR @@ -38,7 +38,16 @@ namespace sirf { template class NiftiImageData3D; template class NiftiImageData3DDisplacement; -/// SIRF nifti image data deformation field image +/*! +\ingroup Registration +\brief Class for deformation SIRF image data. + +Here, we require ndim == 5, nt == 1 (so contains x,y,z dimensions as well as u==3 for the tensor component). +Also require intent_p1 == DEF_FIELD. + +\author Richard Brown +\author CCP PETMR +*/ template class NiftiImageData3DDeformation : public NiftiImageData3DTensor, public Transformation { @@ -68,7 +77,7 @@ class NiftiImageData3DDeformation : public NiftiImageData3DTensor, pub /// Create from 3D image void create_from_3D_image(const NiftiImageData3D &image); - /// Create from CPP image + /// Create from control point grid image void create_from_cpp(NiftiImageData3DTensor &cpp, const NiftiImageData3D &ref); /// Get as deformation field diff --git a/src/Registration/cReg/include/sirf/cReg/NiftiImageData3DDisplacement.h b/src/Registration/cReg/include/sirf/cReg/NiftiImageData3DDisplacement.h index b374ecff2..fe02e0b61 100644 --- a/src/Registration/cReg/include/sirf/cReg/NiftiImageData3DDisplacement.h +++ b/src/Registration/cReg/include/sirf/cReg/NiftiImageData3DDisplacement.h @@ -21,7 +21,7 @@ limitations under the License. /*! \file \ingroup Registration -\brief Class for deformation/displacement SIRF image data. +\brief Class for displacement SIRF image data. \author Richard Brown \author CCP PETMR @@ -36,7 +36,16 @@ limitations under the License. namespace sirf { template class NiftiImageData3D; -/// SIRF nifti image data displacement field image +/*! +\ingroup Registration +\brief Class for displacement SIRF image data. + +Here, we require ndim == 5, nt == 1 (so contains x,y,z dimensions as well as u==3 for the tensor component). +Also require intent_p1 == DISP_FIELD. + +\author Richard Brown +\author CCP PETMR +*/ template class NiftiImageData3DDisplacement : public NiftiImageData3DTensor, public Transformation { diff --git a/src/Registration/cReg/include/sirf/cReg/NiftiImageData3DTensor.h b/src/Registration/cReg/include/sirf/cReg/NiftiImageData3DTensor.h index ece99a69d..592636baf 100644 --- a/src/Registration/cReg/include/sirf/cReg/NiftiImageData3DTensor.h +++ b/src/Registration/cReg/include/sirf/cReg/NiftiImageData3DTensor.h @@ -21,7 +21,7 @@ limitations under the License. /*! \file \ingroup Registration -\brief Class for deformation/displacement SIRF image data. +\brief Class for tensor SIRF image data. \author Richard Brown \author CCP PETMR @@ -36,7 +36,17 @@ namespace sirf { // Forward declarations template class NiftiImageData3D; -/// SIRF image data +/*! +\ingroup Registration +\brief Class for tensor SIRF image data. + +Here, we require ndim == 5, nt == 1 (so contains x,y,z dimensions as well as u==3 for the tensor component). +This is the general tensor class, so we do not care if the image is a deformation or displacement field (or any other type). +Hence, any value of intent_p1 is fine. + +\author Richard Brown +\author CCP PETMR +*/ template class NiftiImageData3DTensor : public NiftiImageData { diff --git a/src/Registration/cReg/include/sirf/cReg/NiftyAladinSym.h b/src/Registration/cReg/include/sirf/cReg/NiftyAladinSym.h index cf9dc47a9..855dfb9d5 100644 --- a/src/Registration/cReg/include/sirf/cReg/NiftyAladinSym.h +++ b/src/Registration/cReg/include/sirf/cReg/NiftyAladinSym.h @@ -38,7 +38,15 @@ namespace sirf { /// Forward declarations template class AffineTransformation; -/// Wrapper around NiftyReg's aladin class for rigid and affine transformations +/*! +\ingroup Registration +\brief NiftyReg's aladin class for rigid and affine registrations. + +Since this algorithm is affine/rigid, it can also return a transformation matrix if desired. + +\author Richard Brown +\author CCP PETMR +*/ template class NiftyAladinSym : public NiftyRegistration { public: diff --git a/src/Registration/cReg/include/sirf/cReg/NiftyF3dSym.h b/src/Registration/cReg/include/sirf/cReg/NiftyF3dSym.h index 6d1a01ed6..aacb946ff 100644 --- a/src/Registration/cReg/include/sirf/cReg/NiftyF3dSym.h +++ b/src/Registration/cReg/include/sirf/cReg/NiftyF3dSym.h @@ -38,7 +38,18 @@ namespace sirf { /// Forward declarations template class AffineTransformation; -/// Wrapper around NiftyReg's f3d class for non-rigid transformations +/*! +\ingroup Registration +\brief NiftyReg's f3d class for non-rigid registrations. + +User can set an initial affine transformation if desired. + +In theory, multiple time points can be used, but thus far has only been tested for +t == 1 for both reference and floating images. + +\author Richard Brown +\author CCP PETMR +*/ template class NiftyF3dSym : public NiftyRegistration { public: diff --git a/src/Registration/cReg/include/sirf/cReg/NiftyRegistration.h b/src/Registration/cReg/include/sirf/cReg/NiftyRegistration.h index fd323bf88..7ae1a8fa8 100644 --- a/src/Registration/cReg/include/sirf/cReg/NiftyRegistration.h +++ b/src/Registration/cReg/include/sirf/cReg/NiftyRegistration.h @@ -21,24 +21,7 @@ limitations under the License. /*! \file \ingroup Registration -\brief Base class for all SIRF registration. - -The parameter file should have interfile-like syntax. -The variables will be stored as a vector of floats and converted into the required type (int, unsigned int, etc) if necessary. -Multiple variables for a given parameter should be comma separated. -Spaces and tabs will be ignored. -For the title, it doesn't matter what is written as it will be ignored, but something has to be there (otherwise the first parameter will be ignored). -Possible parameters are all the Set methods for each class (e.g., nifty_aladin::SetPerformRigid) and should be written in the parameter file without the "Set" (e.g., PerformRigid). - -An example is given below: - SomeTitle := - ReferenceTimePoint := 1 - FloatingTimePoint := 2 - LinearEnergyWeights := 1.5,1 - AdditiveMC := - end := - -More examples can be found in data/examples/Registration/paramFiles +\brief Base class for all NiftyReg registrations. \author Richard Brown \author CCP PETMR @@ -53,7 +36,13 @@ namespace sirf { /// Forward declarations template class NiftiImageData3D; -/// Base class for wrapped NiftyReg registration algorithms +/*! +\ingroup Registration +\brief Base class for all NiftyReg registrations. + +\author Richard Brown +\author CCP PETMR +*/ template class NiftyRegistration : public Registration { diff --git a/src/Registration/cReg/include/sirf/cReg/NiftyResample.h b/src/Registration/cReg/include/sirf/cReg/NiftyResample.h index 2f578b2c6..7e6fbde7b 100644 --- a/src/Registration/cReg/include/sirf/cReg/NiftyResample.h +++ b/src/Registration/cReg/include/sirf/cReg/NiftyResample.h @@ -23,12 +23,6 @@ limitations under the License. \ingroup Registration \brief Resampling class based on nifty resample -If multiple transformations are set, they will be used in the order that they have been added. -i.e., Trans3(Trans2(Trans1(x))). - -The reference image must be 3D (i.e., NiftiImageData3D), but the floating image (and therefore -the output image) can have nt and/or nu != 1. - \author Richard Brown \author CCP PETMR */ @@ -50,7 +44,16 @@ namespace sirf { template class NiftiImageData3DDisplacement; template class AffineTransformation; -/// Wrapper around NiftyReg's resample class +/*! +\ingroup Registration +\brief Resampling class based on nifty resample + +The reference image must be 3D (i.e., NiftiImageData3D), but the floating image (and therefore +the output image) can have nt and/or nu != 1. + +\author Richard Brown +\author CCP PETMR +*/ template class NiftyResample : public Resample { @@ -76,11 +79,11 @@ class NiftyResample : public Resample /// Set up the output image void set_up_output_image(); - /// Reference image as a NiftyImageData3D + /// Reference image as a NiftiImageData3D std::shared_ptr > _reference_image_nifti_sptr; - /// Floating image as a NiftyImageData + /// Floating image as a NiftiImageData std::shared_ptr > _floating_image_nifti_sptr; - /// Floating image as a NiftyImageData + /// Floating image as a NiftiImageData std::shared_ptr > _output_image_nifti_sptr; }; } diff --git a/src/Registration/cReg/include/sirf/cReg/Parser.h b/src/Registration/cReg/include/sirf/cReg/Parser.h index bb7446fa5..c80cf6ec9 100644 --- a/src/Registration/cReg/include/sirf/cReg/Parser.h +++ b/src/Registration/cReg/include/sirf/cReg/Parser.h @@ -21,7 +21,7 @@ limitations under the License. /*! \file \ingroup Registration -\brief NiftyReg's aladin class for rigid and affine registrations. +\brief Small class to parse parameter files. \author Richard Brown \author CCP PETMR @@ -37,7 +37,14 @@ limitations under the License. #include namespace sirf { -/// Reg parser +/*! +\file +\ingroup Registration +\brief Small class to parse parameter files. + +\author Richard Brown +\author CCP PETMR +*/ template class Parser { diff --git a/src/Registration/cReg/include/sirf/cReg/ParserKey.h b/src/Registration/cReg/include/sirf/cReg/ParserKey.h index f459e1694..ab365c532 100644 --- a/src/Registration/cReg/include/sirf/cReg/ParserKey.h +++ b/src/Registration/cReg/include/sirf/cReg/ParserKey.h @@ -21,7 +21,7 @@ limitations under the License. /*! \file \ingroup Registration -\brief NiftyReg's aladin class for rigid and affine registrations. +\brief Parser keys for 0, 1 and 2 arguments \author Richard Brown \author CCP PETMR @@ -47,7 +47,13 @@ std::string get_typeid(A) else return "unknown"; } -/// Abstract base class for a parser key +/*! +\ingroup Registration +\brief Base for parser keys + +\author Richard Brown +\author CCP PETMR +*/ template class ParserKeyBase { @@ -140,7 +146,13 @@ class ParserKeyBase std::shared_ptr _object; }; -/// Abstract base class for a parser key with 0 arguments +/*! +\ingroup Registration +\brief Class for parser keys with 0 arguments + +\author Richard Brown +\author CCP PETMR +*/ template class ParserKey0Arg : public ParserKeyBase { @@ -173,7 +185,13 @@ class ParserKey0Arg : public ParserKeyBase void (Z::*_function)(); }; -/// Abstract base class for a parser key with 1 argument +/*! +\ingroup Registration +\brief Class for parser keys with 1 argument + +\author Richard Brown +\author CCP PETMR +*/ template class ParserKey1Arg : public ParserKeyBase { @@ -213,7 +231,13 @@ class ParserKey1Arg : public ParserKeyBase A _arg1; }; -/// Abstract base class for a parser key with 2 arguments +/*! +\ingroup Registration +\brief Class for parser keys with 2 arguments + +\author Richard Brown +\author CCP PETMR +*/ template class ParserKey2Arg : public ParserKeyBase { diff --git a/src/Registration/cReg/include/sirf/cReg/Registration.h b/src/Registration/cReg/include/sirf/cReg/Registration.h index 2c848a38c..1f04b996f 100644 --- a/src/Registration/cReg/include/sirf/cReg/Registration.h +++ b/src/Registration/cReg/include/sirf/cReg/Registration.h @@ -23,7 +23,29 @@ limitations under the License. \ingroup Registration \brief Base class for all SIRF registration. -The parameter file should have interfile-like syntax. +\author Richard Brown +\author CCP PETMR +*/ + +#pragma once + +#include +#include +#include + +namespace sirf { + +/// Forward declarations +template class Transformation; +class ImageData; + +/*! +\ingroup Registration +\brief Base class for all SIRF registration. + +Registration classes can be set up with parameter files or inputting arguments directly with the set_parameter() method. + +If using a parameter file, it should have interfile-like syntax. The variables will be stored as a vector of floats and converted into the required type (int, unsigned int, etc) if necessary. Multiple variables for a given parameter should be comma separated. Spaces and tabs will be ignored. @@ -31,32 +53,20 @@ For the title, it doesn't matter what is written as it will be ignored, but some Possible parameters are all the Set methods for each class (e.g., nifty_aladin::SetPerformRigid) and should be written in the parameter file without the "Set" (e.g., PerformRigid). An example is given below: +\verbatim SomeTitle := ReferenceTimePoint := 1 FloatingTimePoint := 2 LinearEnergyWeights := 1.5,1 AdditiveMC := end := +\endverbatim More examples can be found in data/examples/Registration/paramFiles \author Richard Brown \author CCP PETMR */ - -#pragma once - -#include -#include -#include - -namespace sirf { - -/// Forward declarations -template class Transformation; -class ImageData; - -/// Base class for SIRF registration algorithms template class Registration { diff --git a/src/Registration/cReg/include/sirf/cReg/Resample.h b/src/Registration/cReg/include/sirf/cReg/Resample.h index 26a6b5ec9..28c8ea12f 100644 --- a/src/Registration/cReg/include/sirf/cReg/Resample.h +++ b/src/Registration/cReg/include/sirf/cReg/Resample.h @@ -23,9 +23,6 @@ limitations under the License. \ingroup Registration \brief Abstract resampling base class -If multiple transformations are set, they will be used in the order that they have been added. -i.e., Trans3(Trans2(Trans1(x))). - \author Richard Brown \author CCP PETMR */ @@ -41,7 +38,17 @@ namespace sirf { template class Transformation; class ImageData; -/// Wrapper around NiftyReg's resample class +/*! +\file +\ingroup Registration +\brief Abstract resampling base class + +If multiple transformations are set, they will be used in the order that they have been added. +i.e., Trans3(Trans2(Trans1(x))). + +\author Richard Brown +\author CCP PETMR +*/ template class Resample { diff --git a/src/Registration/cReg/include/sirf/cReg/Transformation.h b/src/Registration/cReg/include/sirf/cReg/Transformation.h index b3b0efa3c..0cf85d392 100644 --- a/src/Registration/cReg/include/sirf/cReg/Transformation.h +++ b/src/Registration/cReg/include/sirf/cReg/Transformation.h @@ -36,8 +36,17 @@ namespace sirf { template class NiftiImageData3D; template class NiftiImageData3DDeformation; -/// Base class for transformations -template +/*! +\ingroup Registration +\brief Base class for transformations. + +All transformations need to be able to convert themselves +to a deformation field. In this fashion, they can be composed +into a single transformation. + +\author Richard Brown +\author CCP PETMR +*/template class Transformation { public: diff --git a/src/Registration/cReg/sirf_change_datatype.cpp b/src/Registration/cReg/sirf_change_datatype.cpp index 7f334b876..cb507e2df 100644 --- a/src/Registration/cReg/sirf_change_datatype.cpp +++ b/src/Registration/cReg/sirf_change_datatype.cpp @@ -21,7 +21,7 @@ limitations under the License. /*! \file \ingroup Registration -\brief Convert affine transformation matrix to displacement or deformation field image(s) +\brief Change the datatype of a nifti image (e.g., int->float) \author Richard Brown \author CCP PETMR diff --git a/src/Registration/cReg/sirf_crop_image.cpp b/src/Registration/cReg/sirf_crop_image.cpp index bc6fb1eb0..7a6846d6a 100644 --- a/src/Registration/cReg/sirf_crop_image.cpp +++ b/src/Registration/cReg/sirf_crop_image.cpp @@ -21,7 +21,7 @@ limitations under the License. /*! \file \ingroup Registration -\brief Convert affine transformation matrix to displacement or deformation field image(s) +\brief Crop a nifti image \author Richard Brown \author CCP PETMR diff --git a/src/Registration/cReg/sirf_print_nifti_info.cpp b/src/Registration/cReg/sirf_print_nifti_info.cpp index 91632a429..9ef87bcbd 100644 --- a/src/Registration/cReg/sirf_print_nifti_info.cpp +++ b/src/Registration/cReg/sirf_print_nifti_info.cpp @@ -21,7 +21,7 @@ limitations under the License. /*! \file \ingroup Registration -\brief Dump info of a nifti image +\brief Dump info of one or more nifti images \author Richard Brown \author CCP PETMR diff --git a/src/Registration/mReg/+mReg/NiftiImageData3D.m b/src/Registration/mReg/+mReg/NiftiImageData3D.m index 26653fda8..5936f5021 100644 --- a/src/Registration/mReg/+mReg/NiftiImageData3D.m +++ b/src/Registration/mReg/+mReg/NiftiImageData3D.m @@ -1,5 +1,5 @@ classdef NiftiImageData3D < mReg.NiftiImageData -% Class for image data. +% Class for 3D image data. % CCP PETMR Synergistic Image Reconstruction Framework (SIRF). % Copyright 2018-2019 University College London diff --git a/src/Registration/mReg/+mReg/NiftyResample.m b/src/Registration/mReg/+mReg/NiftyResample.m index 37098ad61..57d56e6f4 100644 --- a/src/Registration/mReg/+mReg/NiftyResample.m +++ b/src/Registration/mReg/+mReg/NiftyResample.m @@ -1,5 +1,5 @@ classdef NiftyResample < handle -% Class resampling nifti image using NiftyReg. +% Class for resampling using NiftyReg. % CCP PETMR Synergistic Image Reconstruction Framework (SIRF). % Copyright 2018-2019 University College London diff --git a/src/Registration/pReg/Reg.py b/src/Registration/pReg/Reg.py index c3b636052..4804f94b4 100644 --- a/src/Registration/pReg/Reg.py +++ b/src/Registration/pReg/Reg.py @@ -218,7 +218,7 @@ def get_as_deformation_field(self, ref): class NiftiImageData(SIRF.ImageData): """ - General class for nifti image. + General class for nifti image data. """ def __init__(self, src=None): self.handle = None @@ -391,9 +391,15 @@ def print_headers(to_print): raise error('print_headers only implemented for up to 5 images.') +class ImageData(NiftiImageData): + """ + Alias class for nifti image data. + """ + + class NiftiImageData3D(NiftiImageData): """ - 3D nifti image. + Class for 3D nifti image data. """ def __init__(self, src=None): self.handle = None @@ -424,15 +430,9 @@ def copy_data_to(self, pet_image): try_calling(pyreg.cReg_NiftiImageData3D_copy_data_to(self.handle, pet_image.handle)) -class ImageData(NiftiImageData3D): - """ - 3D nifti image. - """ - - class NiftiImageData3DTensor(NiftiImageData): """ - 3D tensor nifti image. + Class for 3D tensor nifti image data. """ def __init__(self, src1=None, src2=None, src3=None): self.handle = None @@ -480,7 +480,7 @@ def flip_component(self, dim): class NiftiImageData3DDisplacement(NiftiImageData3DTensor, _Transformation): """ - 3D tensor displacement nifti image. + Class for 3D displacement nifti image data. """ def __init__(self, src1=None, src2=None, src3=None): self.handle = None @@ -505,7 +505,7 @@ def __del__(self): class NiftiImageData3DDeformation(NiftiImageData3DTensor, _Transformation): """ - 3D tensor deformation nifti image. + Class for 3D deformation nifti image data. """ def __init__(self, src1=None, src2=None, src3=None): diff --git a/src/Synergistic/sirf_do_images_match.cpp b/src/Synergistic/sirf_do_images_match.cpp index dc19b033f..b15d077fa 100644 --- a/src/Synergistic/sirf_do_images_match.cpp +++ b/src/Synergistic/sirf_do_images_match.cpp @@ -21,7 +21,7 @@ limitations under the License. /*! \file \ingroup Registration -\brief Check if two images match to a given precision. +\brief Check if two SIRF images match to a given precision. \author Richard Brown \author CCP PETMR diff --git a/src/Synergistic/sirf_registration.cpp b/src/Synergistic/sirf_registration.cpp index f9a0c2cb5..96cbdaa0e 100644 --- a/src/Synergistic/sirf_registration.cpp +++ b/src/Synergistic/sirf_registration.cpp @@ -21,7 +21,7 @@ limitations under the License. /*! \file \ingroup Registration -\brief Perform registration with any type of SIRF image and any SIRF registration algorithm +\brief Perform registration with any types of SIRF image and any SIRF registration algorithm. \author Richard Brown \author CCP PETMR diff --git a/src/Synergistic/sirf_resample.cpp b/src/Synergistic/sirf_resample.cpp index c74867913..b52f5aef0 100644 --- a/src/Synergistic/sirf_resample.cpp +++ b/src/Synergistic/sirf_resample.cpp @@ -22,6 +22,7 @@ limitations under the License. \file \ingroup Registration \brief Perform resampling with any type of SIRF image and any SIRF resampling algorithm. + If no transformations are given, identity will be used. If multiple transformations are given, they will be applied in the order they were given.