-
Notifications
You must be signed in to change notification settings - Fork 3
/
itkTransformDeformationFieldFilter.h
86 lines (72 loc) · 3.23 KB
/
itkTransformDeformationFieldFilter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#ifndef __itkTransformDeformationFieldFilter_h
#define __itkTransformDeformationFieldFilter_h
#include <itkObject.h>
#include <itkImageToImageFilter.h>
#include <itkImage.h>
#include <itkImageRegionIteratorWithIndex.h>
#include <itkImageRegionConstIteratorWithIndex.h>
#include <itkTransform.h>
namespace itk
{
/** \class TransformDeformationFieldFilter
*
* Resample diffusion tensor images
* A transformation and a interpolation have to be set
*/
template <class TInput, class TOutput, int NDimensions>
class TransformDeformationFieldFilter
: public ImageToImageFilter
<Image<itk::Vector<TInput, NDimensions>, NDimensions>,
Image<itk::Vector<TOutput, NDimensions>, NDimensions> >
{
public:
typedef TInput InputDataType;
typedef TOutput OutputDataType;
typedef ImageToImageFilter
<Image<itk::Vector<InputDataType, NDimensions>, NDimensions>,
Image<itk::Vector<OutputDataType, NDimensions>, NDimensions> >
Superclass;
typedef itk::Vector<InputDataType, NDimensions> InputDeformationPixelType;
typedef Image<InputDeformationPixelType, NDimensions> InputDeformationFieldType;
typedef itk::Vector<OutputDataType, NDimensions> OutputDeformationPixelType;
typedef Image<OutputDeformationPixelType, NDimensions> OutputDeformationFieldType;
typedef TransformDeformationFieldFilter Self;
typedef SmartPointer<Self> Pointer;
typedef SmartPointer<const Self> ConstPointer;
typedef typename InputDeformationFieldType::Pointer InputDeformationFieldPointerType;
typedef typename OutputDeformationFieldType::Pointer OutputDeformationFieldPointerType;
typedef ImageRegionConstIteratorWithIndex<InputDeformationFieldType> InputIteratorType;
typedef ImageRegionIteratorWithIndex<OutputDeformationFieldType> OutputIteratorType;
typedef typename OutputDeformationFieldType::RegionType OutputDeformationFieldRegionType;
typedef Transform<OutputDataType, NDimensions, NDimensions> TransformType;
typedef typename OutputDeformationFieldType::RegionType OutputImageRegionType;
itkNewMacro( Self );
///Set the transform
itkSetObjectMacro( Transform, TransformType );
///Set the input deformation field
void SetInput( InputDeformationFieldPointerType inputDeformationField );
///Get the time of the last modification of the object
unsigned long GetMTime() const;
#ifdef ITK_USE_CONCEPT_CHECKING
/** Begin concept checking */
itkConceptMacro( InputConvertibleToDoubleCheck,
( Concept::Convertible<InputDataType, double> ) );
itkConceptMacro( DoubleConvertibleToOutputCheck,
( Concept::Convertible<double, OutputDataType> ) );
/** End concept checking */
#endif
protected:
TransformDeformationFieldFilter();
void ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId );
void BeforeThreadedGenerateData();
void GenerateOutputInformation();
void GenerateInputRequestedRegion();
private:
typename TransformType::Pointer m_Transform;
// InputDeformationFieldPointerType m_Input ;
};
} // end namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
#include "itkTransformDeformationFieldFilter.hxx"
#endif
#endif