ITK  4.4.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  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;
157 
158  virtual void GenerateOutputInformation();
159 
160  virtual void BeforeThreadedGenerateData();
161 
162  virtual void ThreadedGenerateData( const OutputRegionType &, ThreadIdType );
163 
164  VectorType IntegrateVelocityAtPoint( const PointType &initialSpatialPoint, const TimeVaryingVelocityFieldType * inputField );
165 
168 
170 
172 
173  unsigned int m_NumberOfTimePoints;
174 
176 
177 private:
178  TimeVaryingVelocityFieldIntegrationImageFilter( const Self & ); //purposely not implemented
179  void operator=( const Self & ); //purposely not implemented
180 
182 };
183 }
184 
185 #ifndef ITK_MANUAL_INSTANTIATION
186 #include "itkTimeVaryingVelocityFieldIntegrationImageFilter.hxx"
187 #endif
188 
189 #endif
190