ITK  5.2.0
Insight Toolkit
itkTimeVaryingVelocityFieldIntegrationImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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,
53  typename TDisplacementField =
54  Image<typename TTimeVaryingVelocityField::PixelType, TTimeVaryingVelocityField::ImageDimension - 1>>
56  : public ImageToImageFilter<TTimeVaryingVelocityField, TDisplacementField>
57 {
58 public:
59  ITK_DISALLOW_COPY_AND_MOVE(TimeVaryingVelocityFieldIntegrationImageFilter);
60 
65 
67  itkNewMacro(Self);
68 
71 
75  static constexpr unsigned int InputImageDimension = TTimeVaryingVelocityField::ImageDimension;
76 
77  static constexpr unsigned int OutputImageDimension = TDisplacementField::ImageDimension;
78 
79  using TimeVaryingVelocityFieldType = TTimeVaryingVelocityField;
80  using DisplacementFieldType = TDisplacementField;
81  using DisplacementFieldPointer = typename DisplacementFieldType::Pointer;
82  using VectorType = typename DisplacementFieldType::PixelType;
83  using RealType = typename VectorType::RealValueType;
84  using ScalarType = typename VectorType::ValueType;
87 
90 
93 
95  itkSetObjectMacro(VelocityFieldInterpolator, VelocityFieldInterpolatorType);
96  itkGetModifiableObjectMacro(VelocityFieldInterpolator, VelocityFieldInterpolatorType);
98 
103  itkSetObjectMacro(DisplacementFieldInterpolator, DisplacementFieldInterpolatorType);
104  itkGetModifiableObjectMacro(DisplacementFieldInterpolator, DisplacementFieldInterpolatorType);
106 
110  itkSetObjectMacro(InitialDiffeomorphism, DisplacementFieldType);
111  itkGetModifiableObjectMacro(InitialDiffeomorphism, DisplacementFieldType);
113 
118  itkSetClampMacro(LowerTimeBound, RealType, 0, 1);
119 
124  itkGetConstMacro(LowerTimeBound, RealType);
125 
130  itkSetClampMacro(UpperTimeBound, RealType, 0, 1);
131 
136  itkGetConstMacro(UpperTimeBound, RealType);
137 
142  itkSetMacro(NumberOfIntegrationSteps, unsigned int);
143 
148  itkGetConstMacro(NumberOfIntegrationSteps, unsigned int);
149 
150 protected:
153 
154  void
155  PrintSelf(std::ostream & os, Indent indent) const override;
156 
157  void
158  GenerateOutputInformation() override;
159 
160  void
161  BeforeThreadedGenerateData() override;
162 
163  void
164  DynamicThreadedGenerateData(const OutputRegionType &) override;
165 
166 
167  VectorType
168  IntegrateVelocityAtPoint(const PointType & initialSpatialPoint, const TimeVaryingVelocityFieldType * inputField);
169 
172 
174 
176 
177  unsigned int m_NumberOfTimePoints;
178 
180 
181 private:
183 };
184 } // namespace itk
185 
186 #ifndef ITK_MANUAL_INSTANTIATION
187 # include "itkTimeVaryingVelocityFieldIntegrationImageFilter.hxx"
188 #endif
189 
190 #endif
itk::TimeVaryingVelocityFieldIntegrationImageFilter
Integrate a time-varying velocity field using 4th order Runge-Kutta.
Definition: itkTimeVaryingVelocityFieldIntegrationImageFilter.h:55
itk::TimeVaryingVelocityFieldIntegrationImageFilter::RealType
typename VectorType::RealValueType RealType
Definition: itkTimeVaryingVelocityFieldIntegrationImageFilter.h:83
itk::TimeVaryingVelocityFieldIntegrationImageFilter::m_VelocityFieldInterpolator
VelocityFieldInterpolatorPointer m_VelocityFieldInterpolator
Definition: itkTimeVaryingVelocityFieldIntegrationImageFilter.h:182
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::TimeVaryingVelocityFieldIntegrationImageFilter::OutputRegionType
typename DisplacementFieldType::RegionType OutputRegionType
Definition: itkTimeVaryingVelocityFieldIntegrationImageFilter.h:86
itk::TimeVaryingVelocityFieldIntegrationImageFilter::m_NumberOfIntegrationSteps
unsigned int m_NumberOfIntegrationSteps
Definition: itkTimeVaryingVelocityFieldIntegrationImageFilter.h:175
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::VectorInterpolateImageFunction
Base class for all vector image interpolators.
Definition: itkVectorInterpolateImageFunction.h:47
itk::TimeVaryingVelocityFieldIntegrationImageFilter::DisplacementFieldInterpolatorPointer
typename DisplacementFieldInterpolatorType::Pointer DisplacementFieldInterpolatorPointer
Definition: itkTimeVaryingVelocityFieldIntegrationImageFilter.h:92
itk::TimeVaryingVelocityFieldIntegrationImageFilter::PointType
typename DisplacementFieldType::PointType PointType
Definition: itkTimeVaryingVelocityFieldIntegrationImageFilter.h:85
itk::TimeVaryingVelocityFieldIntegrationImageFilter::DisplacementFieldPointer
typename DisplacementFieldType::Pointer DisplacementFieldPointer
Definition: itkTimeVaryingVelocityFieldIntegrationImageFilter.h:81
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::TimeVaryingVelocityFieldIntegrationImageFilter::ScalarType
typename VectorType::ValueType ScalarType
Definition: itkTimeVaryingVelocityFieldIntegrationImageFilter.h:84
itk::TimeVaryingVelocityFieldIntegrationImageFilter::VectorType
typename DisplacementFieldType::PixelType VectorType
Definition: itkTimeVaryingVelocityFieldIntegrationImageFilter.h:82
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::TimeVaryingVelocityFieldIntegrationImageFilter::m_UpperTimeBound
RealType m_UpperTimeBound
Definition: itkTimeVaryingVelocityFieldIntegrationImageFilter.h:171
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::TimeVaryingVelocityFieldIntegrationImageFilter::VelocityFieldInterpolatorPointer
typename VelocityFieldInterpolatorType::Pointer VelocityFieldInterpolatorPointer
Definition: itkTimeVaryingVelocityFieldIntegrationImageFilter.h:89
itkVectorInterpolateImageFunction.h
itkImageToImageFilter.h
itk::TimeVaryingVelocityFieldIntegrationImageFilter::TimeVaryingVelocityFieldType
TTimeVaryingVelocityField TimeVaryingVelocityFieldType
Definition: itkTimeVaryingVelocityFieldIntegrationImageFilter.h:79
itk::TimeVaryingVelocityFieldIntegrationImageFilter::m_LowerTimeBound
RealType m_LowerTimeBound
Definition: itkTimeVaryingVelocityFieldIntegrationImageFilter.h:170
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::TimeVaryingVelocityFieldIntegrationImageFilter::m_InitialDiffeomorphism
DisplacementFieldPointer m_InitialDiffeomorphism
Definition: itkTimeVaryingVelocityFieldIntegrationImageFilter.h:173
itk::TimeVaryingVelocityFieldIntegrationImageFilter::m_NumberOfTimePoints
unsigned int m_NumberOfTimePoints
Definition: itkTimeVaryingVelocityFieldIntegrationImageFilter.h:177
itk::TimeVaryingVelocityFieldIntegrationImageFilter::DisplacementFieldType
TDisplacementField DisplacementFieldType
Definition: itkTimeVaryingVelocityFieldIntegrationImageFilter.h:80
itk::TimeVaryingVelocityFieldIntegrationImageFilter::m_DisplacementFieldInterpolator
DisplacementFieldInterpolatorPointer m_DisplacementFieldInterpolator
Definition: itkTimeVaryingVelocityFieldIntegrationImageFilter.h:179