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 > >
160 typedef typename Superclass::OutputImageRegionType
207 if ( m_GradientImageTypeEnumeration == GradientIsInASingleImage )
209 itkExceptionMacro(<<
"Cannot call both methods:"
210 <<
"AddGradientImage and SetGradientImage. Please call only one of them.");
215 m_GradientImageTypeEnumeration = GradientIsInManyImages;
225 if ( idx >= m_NumberOfGradientDirections )
227 itkExceptionMacro(<<
"Gradient direction " << idx <<
"does not exist");
229 return m_GradientDirectionContainer->ElementAt(idx + 1);
234 void SetMaskImage(MaskImageType *maskImage);
237 void SetMaskSpatialObject(MaskSpatialObjectType *maskSpatialObject);
243 itkSetMacro(Threshold, ReferencePixelType);
244 itkGetConstMacro(Threshold, ReferencePixelType);
253 itkSetMacro(BValue, TTensorPixelType);
257 itkGetConstReferenceMacro(BValue, TTensorPixelType);
260 #ifdef ITK_USE_CONCEPT_CHECKING
272 ReferencePixelType > ) );
275 ReferencePixelType > ) );
287 void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
289 void ComputeTensorBasis();
291 void BeforeThreadedGenerateData() ITK_OVERRIDE;
293 void ThreadedGenerateData(const
294 OutputImageRegionType & outputRegionForThread,
ThreadIdType) ITK_OVERRIDE;
296 void VerifyPreconditions() ITK_OVERRIDE;
301 GradientIsInASingleImage = 1,
304 } GradientImageTypeEnumeration;
336 #ifndef ITK_MANUAL_INSTANTIATION
337 #include "itkDiffusionTensor3DReconstructionImageFilter.hxx"
SmartPointer< const Self > ConstPointer
Light weight base class for most itk classes.
CoefficientMatrixType m_BMatrix
DiffusionTensor3DReconstructionImageFilter Self
virtual GradientDirectionType GetGradientDirection(unsigned int idx) const
TensorBasisMatrixType m_TensorBasis
unsigned int m_NumberOfGradientDirections
Templated n-dimensional vector image class.
~DiffusionTensor3DReconstructionImageFilter() override
TReferenceImagePixelType ReferencePixelType
Image< GradientPixelType, 3 > GradientImageType
vnl_matrix< double > CoefficientMatrixType
VectorImage< GradientPixelType, 3 > GradientImagesType
vnl_matrix_fixed< double, 6, 6 > TensorBasisMatrixType
TGradientImagePixelType GradientPixelType
DiffusionTensor3D< TTensorPixelType > TensorPixelType
TMaskImageType MaskImageType
Superclass::OutputImageRegionType OutputImageRegionType
TTensorPixelType m_BValue
unsigned int ThreadIdType
DataObject * GetInput(const DataObjectIdentifierType &key)
Return an input.
SmartPointer< Self > Pointer
Image< TensorPixelType, 3 > TensorImageType
GradientImageTypeEnumeration m_GradientImageTypeEnumeration
This class takes as input one or more reference image (acquired in the absence of diffusion sensitizi...
void SetReferenceImage(ReferenceImageType *referenceImage)
SpatialObject< 3 > MaskSpatialObjectType
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.
unsigned int m_NumberOfBaselineImages
TensorImageType OutputImageType
virtual void SetNthInput(DataObjectPointerArraySizeType num, DataObject *input)
vnl_vector_fixed< double, 3 > GradientDirectionType
#define itkConceptMacro(name, concept)
GradientImageTypeEnumeration
Represent a diffusion tensor as used in DTI images.
ImageToImageFilter< Image< TReferenceImagePixelType, 3 >, Image< DiffusionTensor3D< TTensorPixelType >, 3 > > Superclass
virtual ReferenceImageType * GetReferenceImage()
Templated n-dimensional image class.
GradientDirectionContainerType::Pointer m_GradientDirectionContainer
VectorContainer< unsigned int, GradientDirectionType > GradientDirectionContainerType
ReferencePixelType m_Threshold
Superclass::InputImageType ReferenceImageType