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"
53 extern ITKDiffusionTensorImage_EXPORT std::ostream &
145 template <
typename TReferenceImagePixelType,
146 typename TGradientImagePixelType = TReferenceImagePixelType,
147 typename TTensorPixelType = double,
148 typename TMaskImageType = Image<unsigned char, 3>>
150 :
public ImageToImageFilter<Image<TReferenceImagePixelType, 3>, Image<DiffusionTensor3D<TTensorPixelType>, 3>>
211 GetGradientImage(
unsigned index)
const;
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 + 1);
261 SetMaskImage(MaskImageType * maskImage);
265 SetMaskSpatialObject(MaskSpatialObjectType * maskSpatialObject);
271 itkSetMacro(Threshold, ReferencePixelType);
272 itkGetConstMacro(Threshold, ReferencePixelType);
281 itkSetMacro(BValue, TTensorPixelType);
285 itkGetConstReferenceMacro(BValue, TTensorPixelType);
288 #ifdef ITK_USE_CONCEPT_CHECKING
308 PrintSelf(std::ostream & os,
Indent indent)
const override;
311 ComputeTensorBasis();
314 BeforeThreadedGenerateData()
override;
317 DynamicThreadedGenerateData(
const OutputImageRegionType & outputRegionForThread)
override;
320 VerifyPreconditions() ITKv5_CONST override;
324 #if !defined(ITK_LEGACY_REMOVE)
328 GradientImageTypeEnumeration::GradientIsInASingleImage;
330 GradientImageTypeEnumeration::GradientIsInManyImages;
363 #ifndef ITK_MANUAL_INSTANTIATION
364 # include "itkDiffusionTensor3DReconstructionImageFilter.hxx"