ITK  5.0.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:
59  ITK_DISALLOW_COPY_AND_ASSIGN(TimeVaryingVelocityFieldIntegrationImageFilter);
60 
63  <TTimeVaryingVelocityField, TDisplacementField>;
66 
68  itkNewMacro( Self );
69 
72 
76  static constexpr unsigned int InputImageDimension = TTimeVaryingVelocityField::ImageDimension;
77 
78  static constexpr unsigned int OutputImageDimension = TDisplacementField::ImageDimension;
79 
80  using TimeVaryingVelocityFieldType = TTimeVaryingVelocityField;
81  using DisplacementFieldType = TDisplacementField;
82  using DisplacementFieldPointer = typename DisplacementFieldType::Pointer;
83  using VectorType = typename DisplacementFieldType::PixelType;
84  using RealType = typename VectorType::RealValueType;
85  using ScalarType = typename VectorType::ValueType;
88 
92 
95 
97  itkSetObjectMacro( VelocityFieldInterpolator, VelocityFieldInterpolatorType );
98  itkGetModifiableObjectMacro(VelocityFieldInterpolator, VelocityFieldInterpolatorType );
100 
105  itkSetObjectMacro( DisplacementFieldInterpolator, DisplacementFieldInterpolatorType );
106  itkGetModifiableObjectMacro(DisplacementFieldInterpolator, DisplacementFieldInterpolatorType );
108 
112  itkSetObjectMacro( InitialDiffeomorphism, DisplacementFieldType );
113  itkGetModifiableObjectMacro(InitialDiffeomorphism, DisplacementFieldType );
115 
120  itkSetClampMacro( LowerTimeBound, RealType, 0, 1 );
121 
126  itkGetConstMacro( LowerTimeBound, RealType );
127 
132  itkSetClampMacro( UpperTimeBound, RealType, 0, 1 );
133 
138  itkGetConstMacro( UpperTimeBound, RealType );
139 
144  itkSetMacro( NumberOfIntegrationSteps, unsigned int );
145 
150  itkGetConstMacro( NumberOfIntegrationSteps, unsigned int );
151 
152 protected:
155 
156  void PrintSelf( std::ostream & os, Indent indent ) const override;
157 
158  void GenerateOutputInformation() override;
159 
160  void BeforeThreadedGenerateData() override;
161 
162  void DynamicThreadedGenerateData( const OutputRegionType & ) override;
163 
164 
165  VectorType IntegrateVelocityAtPoint( const PointType &initialSpatialPoint, const TimeVaryingVelocityFieldType * inputField );
166 
169 
171 
173 
174  unsigned int m_NumberOfTimePoints;
175 
177 
178 private:
180 };
181 }
182 
183 #ifndef ITK_MANUAL_INSTANTIATION
184 #include "itkTimeVaryingVelocityFieldIntegrationImageFilter.hxx"
185 #endif
186 
187 #endif
Light weight base class for most itk classes.
Integrate a time-varying velocity field using 4th order Runge-Kutta.
typename DisplacementFieldInterpolatorType::Pointer DisplacementFieldInterpolatorPointer
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
Base class for all vector image interpolaters.