14 #ifndef itkDiffusionTensor3DZeroCorrection_h 15 #define itkDiffusionTensor3DZeroCorrection_h 17 #include "itkUnaryFunctorImageFilter.h" 18 #include "vnl/vnl_math.h" 19 #include <itkMatrix.h> 47 template <
class TInput,
class TOutput>
55 return *
this != other;
60 return !( *
this != other );
63 inline DiffusionTensor3D<TOutput> operator()
64 (
const DiffusionTensor3D<TInput> & A )
66 DiffusionTensor3D<TOutput> tensor;
67 Matrix<double, 3, 3> mat;
68 Matrix<double, 3, 3> matcorrect;
72 tensorDouble.ComputeEigenAnalysis( eigenValues, eigenVectors );
73 for(
int i = 0; i < 3; i++ )
77 eigenVectors = eigenVectors.GetTranspose();
78 matcorrect = eigenVectors * mat * eigenVectors.GetInverse();
80 for(
int i = 0; i < 6; i++ )
82 tensor[i] = ( TOutput ) tensorDouble[i];
90 template <
class TInputImage,
class TOutputImage>
93 UnaryFunctorImageFilter<TInputImage, TOutputImage,
94 Functor::DiffusionTensor3DZero<
95 typename TInputImage::PixelType::ComponentType,
96 typename TOutputImage::PixelType::ComponentType> >
101 typedef UnaryFunctorImageFilter<TInputImage, TOutputImage,
117 #ifdef ITK_USE_CONCEPT_CHECKING 120 ( Concept::SameType<DiffusionTensor3D<typename TInputImage::PixelType::ComponentType>,
121 typename TInputImage::PixelType> ) );
123 ( Concept::SameType<DiffusionTensor3D<typename TOutputImage::PixelType::ComponentType>,
124 typename TOutputImage::PixelType> ) );
bool operator==(const DiffusionTensor3DZero &other) const
itkTypeMacro(DiffusionTensor3DZeroCorrectionFilter, UnaryFunctorImageFilter)
void operator=(const Self &)=delete
void SetTensorFromMatrix(Matrix< C, 3, 3 > matrix)
Simplified inverse ITK transforms.
* itkConceptMacro(OutputEqualityComparableCheck, *(Concept::EqualityComparable< OutputImagePixelType >))
~DiffusionTensor3DZeroCorrectionFilter() override=default
SmartPointer< Self > Pointer
DiffusionTensor3DZeroCorrectionFilter()=default
~DiffusionTensor3DZero()=default
DiffusionTensor3DZero()=default
bool operator!=(const DiffusionTensor3DZero &other) const
#define ITK_DIFFUSION_TENSOR_3D_ZERO
DiffusionTensor3DZeroCorrectionFilter Self
UnaryFunctorImageFilter< TInputImage, TOutputImage, Functor::DiffusionTensor3DZero< typename TInputImage::PixelType, typename TOutputImage::PixelType > > Superclass
SmartPointer< const Self > ConstPointer