Skip to content

Commit

Permalink
Update doxygen
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Brown committed Jan 11, 2019
1 parent 754b442 commit 19ef0a2
Show file tree
Hide file tree
Showing 30 changed files with 297 additions and 109 deletions.
55 changes: 55 additions & 0 deletions doxygen/doxygengroups.h
Original file line number Diff line number Diff line change
@@ -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.
*/
2 changes: 1 addition & 1 deletion src/Registration/cReg/NiftiImageData3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Registration/cReg/NiftiImageData3DTensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Registration/cReg/NiftyRegistration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Registration/cReg/Resample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 dataType>
class AffineTransformation : public Transformation<dataType>
{
Expand Down
11 changes: 10 additions & 1 deletion src/Registration/cReg/include/sirf/cReg/ImageWeightedMean.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,16 @@ namespace sirf {
// Forward delcarations
template<class dataType> 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 dataType>
class ImageWeightedMean
{
Expand Down
48 changes: 31 additions & 17 deletions src/Registration/cReg/include/sirf/cReg/NiftiImageData.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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 dataType>
class NiftiImageData : public ImageData
{
Expand Down
12 changes: 10 additions & 2 deletions src/Registration/cReg/include/sirf/cReg/NiftiImageData3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 dataType>
class NiftiImageData3D : public NiftiImageData<dataType>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -38,7 +38,16 @@ namespace sirf {
template<class dataType> class NiftiImageData3D;
template<class dataType> 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 dataType>
class NiftiImageData3DDeformation : public NiftiImageData3DTensor<dataType>, public Transformation<dataType>
{
Expand Down Expand Up @@ -68,7 +77,7 @@ class NiftiImageData3DDeformation : public NiftiImageData3DTensor<dataType>, pub
/// Create from 3D image
void create_from_3D_image(const NiftiImageData3D<dataType> &image);

/// Create from CPP image
/// Create from control point grid image
void create_from_cpp(NiftiImageData3DTensor<dataType> &cpp, const NiftiImageData3D<dataType> &ref);

/// Get as deformation field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -36,7 +36,16 @@ limitations under the License.
namespace sirf {
template<class dataType> 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 dataType>
class NiftiImageData3DDisplacement : public NiftiImageData3DTensor<dataType>, public Transformation<dataType>
{
Expand Down
14 changes: 12 additions & 2 deletions src/Registration/cReg/include/sirf/cReg/NiftiImageData3DTensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -36,7 +36,17 @@ namespace sirf {
// Forward declarations
template<class dataType> 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 dataType>
class NiftiImageData3DTensor : public NiftiImageData<dataType>
{
Expand Down
10 changes: 9 additions & 1 deletion src/Registration/cReg/include/sirf/cReg/NiftyAladinSym.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,15 @@ namespace sirf {
/// Forward declarations
template<class dataType> 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 dataType> class NiftyAladinSym : public NiftyRegistration<dataType>
{
public:
Expand Down
13 changes: 12 additions & 1 deletion src/Registration/cReg/include/sirf/cReg/NiftyF3dSym.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,18 @@ namespace sirf {
/// Forward declarations
template<class dataType> 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 dataType> class NiftyF3dSym : public NiftyRegistration<dataType>
{
public:
Expand Down
27 changes: 8 additions & 19 deletions src/Registration/cReg/include/sirf/cReg/NiftyRegistration.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<something> 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
Expand All @@ -53,7 +36,13 @@ namespace sirf {
/// Forward declarations
template<class dataType> 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 dataType>
class NiftyRegistration : public Registration<dataType>
{
Expand Down
Loading

0 comments on commit 19ef0a2

Please sign in to comment.