ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkTimeVaryingVelocityFieldIntegrationImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkTimeVaryingVelocityFieldIntegrationImageFilter_h
19 #define itkTimeVaryingVelocityFieldIntegrationImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 
24 
25 namespace itk
26 {
52 template<typename TTimeVaryingVelocityField, typename TDisplacementField =
53  Image<typename TTimeVaryingVelocityField::PixelType,
54  TTimeVaryingVelocityField::ImageDimension - 1> >
56  public ImageToImageFilter<TTimeVaryingVelocityField, TDisplacementField>
57 {
58 public:
60  typedef ImageToImageFilter
61  <TTimeVaryingVelocityField, TDisplacementField> Superclass;
64 
66  itkNewMacro( Self );
67 
70 
74  itkStaticConstMacro( InputImageDimension, unsigned int,
75  TTimeVaryingVelocityField::ImageDimension );
76 
77  itkStaticConstMacro( OutputImageDimension, unsigned int,
78  TDisplacementField::ImageDimension );
79 
80  typedef TTimeVaryingVelocityField TimeVaryingVelocityFieldType;
81  typedef TDisplacementField DisplacementFieldType;
82  typedef typename DisplacementFieldType::Pointer DisplacementFieldPointer;
83  typedef typename DisplacementFieldType::PixelType VectorType;
84  typedef typename VectorType::RealValueType RealType;
85  typedef typename VectorType::ValueType ScalarType;
86  typedef typename DisplacementFieldType::PointType PointType;
87  typedef typename DisplacementFieldType::RegionType OutputRegionType;
88 
93 
96 
98  itkSetObjectMacro( VelocityFieldInterpolator, VelocityFieldInterpolatorType );
99  itkGetModifiableObjectMacro(VelocityFieldInterpolator, VelocityFieldInterpolatorType );
101 
106  itkSetObjectMacro( DisplacementFieldInterpolator, DisplacementFieldInterpolatorType );
107  itkGetModifiableObjectMacro(DisplacementFieldInterpolator, DisplacementFieldInterpolatorType );
109 
113  itkSetObjectMacro( InitialDiffeomorphism, DisplacementFieldType );
114  itkGetModifiableObjectMacro(InitialDiffeomorphism, DisplacementFieldType );
116 
121  itkSetClampMacro( LowerTimeBound, RealType, 0, 1 );
122 
127  itkGetConstMacro( LowerTimeBound, RealType );
128 
133  itkSetClampMacro( UpperTimeBound, RealType, 0, 1 );
134 
139  itkGetConstMacro( UpperTimeBound, RealType );
140 
145  itkSetMacro( NumberOfIntegrationSteps, unsigned int );
146 
151  itkGetConstMacro( NumberOfIntegrationSteps, unsigned int );
152 
153 protected:
156 
157  void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE;
158 
159  virtual void GenerateOutputInformation() ITK_OVERRIDE;
160 
161  virtual void BeforeThreadedGenerateData() ITK_OVERRIDE;
162 
163  virtual void ThreadedGenerateData( const OutputRegionType &, ThreadIdType ) ITK_OVERRIDE;
164 
165  VectorType IntegrateVelocityAtPoint( const PointType &initialSpatialPoint, const TimeVaryingVelocityFieldType * inputField );
166 
169 
171 
173 
174  unsigned int m_NumberOfTimePoints;
175 
177 
178 private:
179  TimeVaryingVelocityFieldIntegrationImageFilter( const Self & ) ITK_DELETE_FUNCTION;
180  void operator=( const Self & ) ITK_DELETE_FUNCTION;
181 
183 };
184 }
185 
186 #ifndef ITK_MANUAL_INSTANTIATION
187 #include "itkTimeVaryingVelocityFieldIntegrationImageFilter.hxx"
188 #endif
189 
190 #endif
Light weight base class for most itk classes.
ImageToImageFilter< TTimeVaryingVelocityField, TDisplacementField > Superclass
virtual void ThreadedGenerateData(const OutputRegionType &, ThreadIdType) override
void PrintSelf(std::ostream &os, Indent indent) const override
VectorInterpolateImageFunction< DisplacementFieldType, ScalarType > DisplacementFieldInterpolatorType
Integrate a time-varying velocity field using 4th order Runge-Kutta.
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
VectorInterpolateImageFunction< TimeVaryingVelocityFieldType, ScalarType > VelocityFieldInterpolatorType
Base class for all vector image interpolaters.
VectorType IntegrateVelocityAtPoint(const PointType &initialSpatialPoint, const TimeVaryingVelocityFieldType *inputField)