18#ifndef itkDiffusionTensor3DReconstructionImageFilter_h
19#define itkDiffusionTensor3DReconstructionImageFilter_h
24#include "vnl/vnl_matrix.h"
25#include "vnl/vnl_vector_fixed.h"
26#include "vnl/vnl_matrix_fixed.h"
27#include "vnl/algo/vnl_svd.h"
30#include "ITKDiffusionTensorImageExport.h"
47 GradientIsInASingleImage = 1,
48 GradientIsInManyImages,
53extern ITKDiffusionTensorImage_EXPORT std::ostream &
145template <
typename TReferenceImagePixelType,
146 typename TGradientImagePixelType = TReferenceImagePixelType,
147 typename TTensorPixelType = double,
150 :
public ImageToImageFilter<Image<TReferenceImagePixelType, 3>, Image<DiffusionTensor3D<TTensorPixelType>, 3>>
179 using typename Superclass::OutputImageRegionType;
227 if (m_GradientImageTypeEnumeration ==
230 itkExceptionMacro(
"Cannot call both methods:"
231 <<
"AddGradientImage and SetGradientImage. Please call only one of them.");
236 m_GradientImageTypeEnumeration =
241 virtual ReferenceImageType *
248 virtual GradientDirectionType
251 if (idx >= m_NumberOfGradientDirections)
253 itkExceptionMacro(
"Gradient direction " << idx <<
" does not exist");
255 return m_GradientDirectionContainer->ElementAt(idx);
281 itkSetMacro(BValue, TTensorPixelType);
285 itkGetConstReferenceMacro(BValue, TTensorPixelType);
288#ifdef ITK_USE_CONCEPT_CHECKING
324#if !defined(ITK_LEGACY_REMOVE)
328 GradientImageTypeEnumeration::GradientIsInASingleImage;
330 GradientImageTypeEnumeration::GradientIsInManyImages;
344 unsigned int m_NumberOfGradientDirections{};
347 unsigned int m_NumberOfBaselineImages{};
353 TTensorPixelType m_BValue{};
359 bool m_MaskImagePresent{};
363#ifndef ITK_MANUAL_INSTANTIATION
364# include "itkDiffusionTensor3DReconstructionImageFilter.hxx"
Contains all enum classes used by DiffusionTensor3DReconstructionImageFilter class.
@ GradientIsInASingleImage
This class takes as input one or more reference image (acquired in the absence of diffusion sensitizi...
void SetReferenceImage(ReferenceImageType *referenceImage)
vnl_matrix< double > CoefficientMatrixType
void SetGradientImage(GradientDirectionContainerType *, const GradientImagesType *gradientImage)
void AddGradientImage(const GradientDirectionType &, const GradientImageType *gradientImage)
void VerifyPreconditions() const override
Verifies that the process object has been configured correctly, that all required inputs are set,...
void PrintSelf(std::ostream &os, Indent indent) const override
vnl_matrix_fixed< double, 6, 6 > TensorBasisMatrixType
void SetMaskSpatialObject(MaskSpatialObjectType *maskSpatialObject)
virtual ReferenceImageType * GetReferenceImage()
typename Superclass::InputImageType ReferenceImageType
DiffusionTensor3DReconstructionImageFilter()
virtual GradientDirectionType GetGradientDirection(unsigned int idx) const
vnl_vector_fixed< double, 3 > GradientDirectionType
void BeforeThreadedGenerateData() override
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
~DiffusionTensor3DReconstructionImageFilter() override=default
void SetMaskImage(MaskImageType *maskImage)
TReferenceImagePixelType ReferencePixelType
TGradientImagePixelType GradientPixelType
void ComputeTensorBasis()
TMaskImageType MaskImageType
const GradientImageType * GetGradientImage(unsigned int index) const
Represent a diffusion tensor as used in DTI images.
typename OutputImageType::RegionType OutputImageRegionType
Base class for filters that take an image as input and produce an image as output.
Templated n-dimensional image class.
Control indentation during Print() invocation.
Light weight base class for most itk classes.
virtual void SetNthInput(DataObjectPointerArraySizeType idx, DataObject *input)
DataObject * GetInput(const DataObjectIdentifierType &key)
Return an input.
Templated n-dimensional vector image class.
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)