ITK  4.3.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<class TTimeVaryingVelocityField, class 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 DisplacementFieldType::PointType PointType;
86  typedef typename DisplacementFieldType::RegionType OutputRegionType;
87 
92 
95 
97  itkSetObjectMacro( VelocityFieldInterpolator, VelocityFieldInterpolatorType );
98 
100  itkGetObjectMacro( VelocityFieldInterpolator, VelocityFieldInterpolatorType );
101 
106  itkSetObjectMacro( DisplacementFieldInterpolator, DisplacementFieldInterpolatorType );
107 
112  itkGetObjectMacro( DisplacementFieldInterpolator, DisplacementFieldInterpolatorType );
113 
117  itkSetObjectMacro( InitialDiffeomorphism, DisplacementFieldType );
118 
122  itkGetObjectMacro( InitialDiffeomorphism, DisplacementFieldType );
123 
128  itkSetClampMacro( LowerTimeBound, RealType, 0, 1 );
129 
134  itkGetConstMacro( LowerTimeBound, RealType );
135 
140  itkSetClampMacro( UpperTimeBound, RealType, 0, 1 );
141 
146  itkGetConstMacro( UpperTimeBound, RealType );
147 
152  itkSetMacro( NumberOfIntegrationSteps, unsigned int );
153 
158  itkGetConstMacro( NumberOfIntegrationSteps, unsigned int );
159 
160 protected:
163 
164  void PrintSelf( std::ostream & os, Indent indent ) const;
165 
166  virtual void GenerateOutputInformation();
167 
168  virtual void BeforeThreadedGenerateData();
169 
170  virtual void ThreadedGenerateData( const OutputRegionType &, ThreadIdType );
171 
172  VectorType IntegrateVelocityAtPoint( const PointType &initialSpatialPoint, const TimeVaryingVelocityFieldType * inputField );
173 
176 
178 
180 
181  unsigned int m_NumberOfTimePoints;
182 
184 
185 private:
186  TimeVaryingVelocityFieldIntegrationImageFilter( const Self & ); //purposely not implemented
187  void operator=( const Self & ); //purposely not implemented
188 
190 };
191 }
192 
193 #ifndef ITK_MANUAL_INSTANTIATION
194 #include "itkTimeVaryingVelocityFieldIntegrationImageFilter.hxx"
195 #endif
196 
197 #endif
198