Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
itkDiffusionTensor3DResample.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Diffusion Applications
4 Module: $HeadURL$
5 Language: C++
6 Date: $Date$
7 Version: $Revision$
8
9 Copyright (c) Brigham and Women's Hospital (BWH) All Rights Reserved.
10
11 See License.txt or http://www.slicer.org/copyright/copyright.txt for details.
12
13==========================================================================*/
14#ifndef itkDiffusionTensor3DResample_h
15#define itkDiffusionTensor3DResample_h
16
17#include <itkObject.h>
18#include <itkImageToImageFilter.h>
21#include <itkImage.h>
22#include <itkDiffusionTensor3D.h>
23#include <itkCastImageFilter.h>
24#include <itkImageRegionIterator.h>
25#include <itkPoint.h>
26
28
29namespace itk
30{
36template <class TInput, class TOutput>
37class DiffusionTensor3DResample : public ImageToImageFilter<Image<DiffusionTensor3D<TInput>, 3>, Image<DiffusionTensor3D<TOutput>, 3>>
38{
39public:
40 typedef TInput InputDataType;
41 typedef TOutput OutputDataType;
42
43 typedef ImageToImageFilter<Image<DiffusionTensor3D<TInput>, 3>, Image<DiffusionTensor3D<TOutput>, 3>> Superclass;
44
45 typedef DiffusionTensor3D<InputDataType> InputTensorDataType;
46 typedef Image<InputTensorDataType, 3> InputImageType;
47 typedef DiffusionTensor3D<OutputDataType> OutputTensorDataType;
48 typedef Image<OutputTensorDataType, 3> OutputImageType;
50 typedef SmartPointer<Self> Pointer;
51 typedef SmartPointer<const Self> ConstPointer;
54 typedef typename InputImageType::Pointer InputImagePointerType;
55 typedef typename OutputImageType::Pointer OutputImagePointerType;
56 typedef itk::ImageRegionIterator<OutputImageType> IteratorType;
57 typedef typename OutputImageType::RegionType OutputImageRegionType;
58 // typedef typename OutputTensorDataType::RealValueType TensorRealType ;
59
62
64 // /Set the transform
66 // /Set the interpolation
68
69 // /Set the output parameters (size, spacing, origin, orientation) from a reference image
71
72 // /Get the time of the last modification of the object
73 ModifiedTimeType GetMTime() const override;
74
75 itkSetMacro(DefaultPixelValue, OutputDataType);
76 itkGetMacro(DefaultPixelValue, OutputDataType);
77
78 itkSetMacro(OutputOrigin, typename OutputImageType::PointType);
79 itkSetMacro(OutputSpacing, typename OutputImageType::SpacingType);
80 itkSetMacro(OutputSize, typename OutputImageType::SizeType);
81 itkSetMacro(OutputDirection, typename OutputImageType::DirectionType);
82 Matrix<double, 3, 3> GetOutputMeasurementFrame();
83
84 itkGetMacro(OutputOrigin, typename OutputImageType::PointType);
85 itkGetMacro(OutputSpacing, typename OutputImageType::SpacingType);
86 itkGetMacro(OutputSize, typename OutputImageType::SizeType);
87 itkGetMacro(OutputDirection, typename OutputImageType::DirectionType);
88
89protected:
91
92 void DynamicThreadedGenerateData(const OutputImageRegionType& outputRegionForThread) override;
93
95
97
99
101
102private:
103 typename InterpolatorType::Pointer m_Interpolator;
104 typename TransformType::Pointer m_Transform;
105 typename OutputImageType::PointType m_OutputOrigin;
106 typename OutputImageType::SpacingType m_OutputSpacing;
107 typename OutputImageType::SizeType m_OutputSize;
108 typename OutputImageType::DirectionType m_OutputDirection;
109 OutputDataType m_DefaultPixelValue;
110 OutputTensorDataType m_DefaultTensor;
111};
112
113} // end namespace itk
114
115#ifndef ITK_MANUAL_INSTANTIATION
116# include "itkDiffusionTensor3DResample.txx"
117#endif
118
119#endif
itk::ImageRegionIterator< OutputImageType > IteratorType
DiffusionTensor3DInterpolateImageFunction< InputDataType > InterpolatorType
void GenerateOutputInformation() override
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
itkSetObjectMacro(Interpolator, InterpolatorType)
void BeforeThreadedGenerateData() override
itkGetMacro(OutputDirection, typename OutputImageType::DirectionType)
itkTypeMacro(DiffusionTensor3DResample, ImageToImageFilter)
itkSetMacro(OutputSpacing, typename OutputImageType::SpacingType)
itkSetObjectMacro(Transform, TransformType)
ImageToImageFilter< Image< DiffusionTensor3D< TInput >, 3 >, Image< DiffusionTensor3D< TOutput >, 3 > > Superclass
Matrix< double, 3, 3 > GetOutputMeasurementFrame()
itkGetMacro(DefaultPixelValue, OutputDataType)
Image< InputTensorDataType, 3 > InputImageType
void GenerateInputRequestedRegion() override
Image< OutputTensorDataType, 3 > OutputImageType
itkGetMacro(OutputSize, typename OutputImageType::SizeType)
itkGetMacro(OutputSpacing, typename OutputImageType::SpacingType)
itkSetMacro(OutputSize, typename OutputImageType::SizeType)
itkSetMacro(DefaultPixelValue, OutputDataType)
ModifiedTimeType GetMTime() const override
itkSetMacro(OutputDirection, typename OutputImageType::DirectionType)
DiffusionTensor3DTransform< InputDataType > TransformType
itkGetMacro(OutputOrigin, typename OutputImageType::PointType)
DiffusionTensor3D< InputDataType > InputTensorDataType
void SetOutputParametersFromImage(InputImagePointerType Image)
DiffusionTensor3D< OutputDataType > OutputTensorDataType
itkSetMacro(OutputOrigin, typename OutputImageType::PointType)
OutputImageType::RegionType OutputImageRegionType
void AfterThreadedGenerateData() override
OutputImageType::Pointer OutputImagePointerType
Simplified inverse ITK transforms.