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"
122 template<
typename TReferenceImagePixelType,
123 typename TGradientImagePixelType = TReferenceImagePixelType,
124 typename TTensorPixelType = double,
125 typename TMaskImageType = Image<unsigned char, 3> >
128 Image< DiffusionTensor3D< TTensorPixelType >, 3 > >
205 if ( m_GradientImageTypeEnumeration == GradientIsInASingleImage )
207 itkExceptionMacro(<<
"Cannot call both methods:"
208 <<
"AddGradientImage and SetGradientImage. Please call only one of them.");
213 m_GradientImageTypeEnumeration = GradientIsInManyImages;
223 if ( idx >= m_NumberOfGradientDirections )
225 itkExceptionMacro(<<
"Gradient direction " << idx <<
"does not exist");
227 return m_GradientDirectionContainer->ElementAt(idx + 1);
232 void SetMaskImage(MaskImageType *maskImage);
235 void SetMaskSpatialObject(MaskSpatialObjectType *maskSpatialObject);
241 itkSetMacro(Threshold, ReferencePixelType);
242 itkGetConstMacro(Threshold, ReferencePixelType);
251 itkSetMacro(BValue, TTensorPixelType);
255 itkGetConstReferenceMacro(BValue, TTensorPixelType);
258 #ifdef ITK_USE_CONCEPT_CHECKING
270 ReferencePixelType > ) );
273 ReferencePixelType > ) );
285 void PrintSelf(std::ostream & os,
Indent indent)
const override;
287 void ComputeTensorBasis();
289 void BeforeThreadedGenerateData()
override;
291 void DynamicThreadedGenerateData(
const OutputImageRegionType & outputRegionForThread)
override;
293 void VerifyPreconditions() ITKv5_CONST override;
298 GradientIsInASingleImage = 1,
301 } GradientImageTypeEnumeration;
333 #ifndef ITK_MANUAL_INSTANTIATION
334 #include "itkDiffusionTensor3DReconstructionImageFilter.hxx"
Light weight base class for most itk classes.
CoefficientMatrixType m_BMatrix
virtual GradientDirectionType GetGradientDirection(unsigned int idx) const
TensorBasisMatrixType m_TensorBasis
unsigned int m_NumberOfGradientDirections
Templated n-dimensional vector image class.
typename Superclass::InputImageType ReferenceImageType
TMaskImageType MaskImageType
vnl_matrix< double > CoefficientMatrixType
Implementation of the composite pattern.
TTensorPixelType m_BValue
DataObject * GetInput(const DataObjectIdentifierType &key)
Return an input.
typename Superclass::OutputImageRegionType OutputImageRegionType
TGradientImagePixelType GradientPixelType
GradientImageTypeEnumeration m_GradientImageTypeEnumeration
This class takes as input one or more reference image (acquired in the absence of diffusion sensitizi...
vnl_matrix_fixed< double, 6, 6 > TensorBasisMatrixType
void SetReferenceImage(ReferenceImageType *referenceImage)
Base class for filters that take an image as input and produce an image as output.
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
Control indentation during Print() invocation.
vnl_vector_fixed< double, 3 > GradientDirectionType
unsigned int m_NumberOfBaselineImages
TReferenceImagePixelType ReferencePixelType
virtual void SetNthInput(DataObjectPointerArraySizeType num, DataObject *input)
#define itkConceptMacro(name, concept)
GradientImageTypeEnumeration
Represent a diffusion tensor as used in DTI images.
virtual ReferenceImageType * GetReferenceImage()
Templated n-dimensional image class.
GradientDirectionContainerType::Pointer m_GradientDirectionContainer
ReferencePixelType m_Threshold