NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkVectorPhiPlusDeltaTTimesVFilter.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef itkVectorPhiPlusDeltaTTimesVFilter_h
16 #define itkVectorPhiPlusDeltaTTimesVFilter_h
17 
18 #include <itkVector.h>
19 #include <itkImage.h>
20 #include <itkImageToImageFilter.h>
21 #include <itkVectorLinearInterpolateImageFunction.h>
22 
23 namespace itk {
54 template < typename TScalarType, unsigned int NDimensions = 3>
56 public ImageToImageFilter<
57  Image< Vector<TScalarType, NDimensions>, NDimensions>, // Input images
58  Image< Vector<TScalarType, NDimensions>, NDimensions> // Output image
59  >
60 {
61  public:
62 
65  typedef ImageToImageFilter<Image< Vector<TScalarType, NDimensions>, NDimensions>,
68  typedef SmartPointer<Self> Pointer;
69  typedef SmartPointer<const Self> ConstPointer;
70 
72  typedef Vector< TScalarType, NDimensions > InputPixelType;
77  typedef InputPixelType OutputPixelType;
78  typedef InputImageType OutputImageType;
79  typedef VectorLinearInterpolateImageFunction< InputImageType,
81 
83  itkNewMacro(Self);
84 
86  itkTypeMacro(VectorPhiPlusDeltaTTimesVFilter, ImageToImageFilter);
87 
89  itkStaticConstMacro(Dimension, unsigned int, NDimensions);
90 
92  itkSetMacro(SubtractSteps, bool);
93  itkGetMacro(SubtractSteps, bool);
94 
96  itkSetMacro(DeltaT, double);
97  itkGetMacro(DeltaT, double);
98 
100  itkSetMacro(NumberOfSteps, unsigned int);
101  itkGetMacro(NumberOfSteps, unsigned int);
102 
104  void SetTimeZeroTransformation(InputImageType* image) { m_PhiZeroTransformation = image; }
105 
107  void SetThicknessPrior(InputScalarImageType* image) { m_ThicknessPriorImage = image; }
108 
110  InputScalarImageType* GetThicknessImage() { return m_ThicknessImage.GetPointer(); }
111 
112  protected:
115  void PrintSelf(std::ostream& os, Indent indent) const;
116 
117  // Check before we start.
118  virtual void BeforeThreadedGenerateData();
119 
120  // The main method to implement in derived classes, note, its threaded.
121  virtual void ThreadedGenerateData( const InputImageRegionType &outputRegionForThread, ThreadIdType threadId);
122 
123  private:
124 
128  VectorPhiPlusDeltaTTimesVFilter(const Self&);
129  void operator=(const Self&);
130 
132  bool m_SubtractSteps;
133 
135  double m_DeltaT;
136 
138  unsigned int m_NumberOfSteps;
139 
141  typename VectorLinearInterpolatorType::Pointer m_Interpolator;
142 
144  typename InputImageType::Pointer m_PhiZeroTransformation;
145 
147  typename InputScalarImageType::Pointer m_ThicknessPriorImage;
148 
150  typename InputScalarImageType::Pointer m_ThicknessImage;
151 
152 }; // end class
153 
154 } // end namespace
155 
156 #ifndef ITK_MANUAL_INSTANTIATION
157 #include "itkVectorPhiPlusDeltaTTimesVFilter.txx"
158 #endif
159 
160 #endif
Image< TScalarType, NDimensions > InputScalarImageType
Definition: itkVectorPhiPlusDeltaTTimesVFilter.h:74
Vector< TScalarType, NDimensions > InputPixelType
Definition: itkVectorPhiPlusDeltaTTimesVFilter.h:72
void SetThicknessPrior(InputScalarImageType *image)
Definition: itkVectorPhiPlusDeltaTTimesVFilter.h:107
This class basically takes two vector images as input (Phi and V) and calculates Phi + (dt * V)...
Definition: itkVectorPhiPlusDeltaTTimesVFilter.h:55
ImageToImageFilter< Image< Vector< TScalarType, NDimensions >, NDimensions >, Image< Vector< TScalarType, NDimensions >, NDimensions > > Superclass
Definition: itkVectorPhiPlusDeltaTTimesVFilter.h:67
SmartPointer< Self > Pointer
Definition: itkVectorPhiPlusDeltaTTimesVFilter.h:68
GLenum GLsizei GLenum GLenum const GLvoid * image
Definition: glew.h:4052
VectorLinearInterpolateImageFunction< InputImageType, TScalarType > VectorLinearInterpolatorType
Definition: itkVectorPhiPlusDeltaTTimesVFilter.h:80
Definition: niftkITKAffineResampleImage.cxx:74
ImageType::IndexType IndexType
Definition: niftkMakeLapUSProbeBasicModel.cxx:32
void SetTimeZeroTransformation(InputImageType *image)
Definition: itkVectorPhiPlusDeltaTTimesVFilter.h:104
InputPixelType OutputPixelType
Definition: itkVectorPhiPlusDeltaTTimesVFilter.h:77
InputImageType::IndexType InputImageIndexType
Definition: itkVectorPhiPlusDeltaTTimesVFilter.h:75
Image< InputPixelType, NDimensions > InputImageType
Definition: itkVectorPhiPlusDeltaTTimesVFilter.h:73
ImageType::RegionType RegionType
Definition: niftkMakeLapUSProbeBasicModel.cxx:30
InputImageType OutputImageType
Definition: itkVectorPhiPlusDeltaTTimesVFilter.h:78
InputImageType::RegionType InputImageRegionType
Definition: itkVectorPhiPlusDeltaTTimesVFilter.h:76
VectorPhiPlusDeltaTTimesVFilter Self
Definition: itkVectorPhiPlusDeltaTTimesVFilter.h:64
Simultaneous itk::Image and itk::Array (and hence vnl_vector) class.
InputScalarImageType * GetThicknessImage()
Definition: itkVectorPhiPlusDeltaTTimesVFilter.h:110
const unsigned int Dimension
Definition: niftkBreastDCEandADC.cxx:89
~VectorPhiPlusDeltaTTimesVFilter()
Definition: itkVectorPhiPlusDeltaTTimesVFilter.h:114
SmartPointer< const Self > ConstPointer
Definition: itkVectorPhiPlusDeltaTTimesVFilter.h:69