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>
59 return *
this != other;
64 return !( *
this != other );
67 inline DiffusionTensor3D<TOutput> operator()
68 (
const DiffusionTensor3D<TInput> & A )
70 DiffusionTensor3D<TOutput> tensor;
71 Matrix<double, 3, 3> mat;
72 Matrix<double, 3, 3> matcorrect;
76 tensorDouble.ComputeEigenAnalysis( eigenValues, eigenVectors );
77 for(
int i = 0; i < 3; i++ )
81 eigenVectors = eigenVectors.GetTranspose();
82 matcorrect = eigenVectors * mat * eigenVectors.GetInverse();
84 for(
int i = 0; i < 6; i++ )
86 tensor[i] = ( TOutput ) tensorDouble[i];
94 template <
class TInputImage,
class TOutputImage>
97 UnaryFunctorImageFilter<TInputImage, TOutputImage,
98 Functor::DiffusionTensor3DZero<
99 typename TInputImage::PixelType::ComponentType,
100 typename TOutputImage::PixelType::ComponentType> >
105 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> ) );
137 void operator=(
const Self & );
bool operator==(const DiffusionTensor3DZero &other) const
itkTypeMacro(DiffusionTensor3DZeroCorrectionFilter, UnaryFunctorImageFilter)
void SetTensorFromMatrix(Matrix< C, 3, 3 > matrix)
Simplified inverse ITK transforms.
* itkConceptMacro(OutputEqualityComparableCheck, *(Concept::EqualityComparable< OutputImagePixelType >))
SmartPointer< Self > Pointer
virtual ~DiffusionTensor3DZeroCorrectionFilter()
bool operator!=(const DiffusionTensor3DZero &other) const
DiffusionTensor3DZeroCorrectionFilter()
#define ITK_DIFFUSION_TENSOR_3D_ZERO
DiffusionTensor3DZeroCorrectionFilter Self
UnaryFunctorImageFilter< TInputImage, TOutputImage, Functor::DiffusionTensor3DZero< typename TInputImage::PixelType, typename TOutputImage::PixelType > > Superclass
SmartPointer< const Self > ConstPointer