ITK  4.4.0
Insight Segmentation and Registration Toolkit
itkVelocityFieldTransform.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 __itkVelocityFieldTransform_h
19 #define __itkVelocityFieldTransform_h
20 
22 
23 namespace itk
24 {
25 
35 template
36 <class TScalar, unsigned int NDimensions>
37 class ITK_EXPORT VelocityFieldTransform :
38  public DisplacementFieldTransform<TScalar, NDimensions>
39 {
40 public:
46 
49 
51  itkNewMacro( Self );
52 
54  typedef typename Superclass:: InverseTransformBasePointer InverseTransformBasePointer;
55 
57  typedef typename Superclass::ScalarType ScalarType;
58 
60  typedef typename Superclass::ParametersType ParametersType;
61  typedef typename Superclass::ParametersValueType ParametersValueType;
62 
64  typedef typename Superclass::TransformCategoryType TransformCategoryType;
65 
67  typedef typename Superclass::NumberOfParametersType NumberOfParametersType;
68 
70  typedef typename Superclass::InputPointType InputPointType;
71  typedef typename Superclass::OutputPointType OutputPointType;
72 
74  typedef typename Superclass::InputVectorType InputVectorType;
75  typedef typename Superclass::OutputVectorType OutputVectorType;
76 
77  typedef typename Superclass::InputVectorPixelType InputVectorPixelType;
78  typedef typename Superclass::OutputVectorPixelType OutputVectorPixelType;
79 
81  typedef typename Superclass::DerivativeType DerivativeType;
82 
84  itkStaticConstMacro( VelocityFieldDimension, unsigned int, NDimensions + 1 );
85 
87  itkStaticConstMacro( Dimension, unsigned int, NDimensions );
88 
90  typedef typename Superclass::DisplacementFieldType DisplacementFieldType;
92 
96 
105 
108 
112 
117  virtual void SetVelocityField( VelocityFieldType * );
118  itkGetModifiableObjectMacro(VelocityField, VelocityFieldType );
120 
121  virtual void SetFixedParameters( const ParametersType & );
122 
125  virtual void SetVelocityFieldInterpolator( VelocityFieldInterpolatorType * );
126  itkGetModifiableObjectMacro(VelocityFieldInterpolator, VelocityFieldInterpolatorType );
128 
130  itkGetConstReferenceMacro( VelocityFieldSetTime, unsigned long );
131 
137  itkSetObjectMacro( DisplacementField, DisplacementFieldType );
138 
139  virtual void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 );
140 
142  bool GetInverse( Self *inverse ) const;
143 
145  virtual InverseTransformBasePointer GetInverseTransform() const;
146 
148  virtual void IntegrateVelocityField() {};
149 
154  itkSetClampMacro( LowerTimeBound, ScalarType, 0.0, 1.0 );
155 
160  itkGetConstMacro( LowerTimeBound, ScalarType );
161 
166  itkSetClampMacro( UpperTimeBound, ScalarType, 0.0, 1.0 );
167 
172  itkGetConstMacro( UpperTimeBound, ScalarType );
173 
177  itkSetMacro( NumberOfIntegrationSteps, unsigned int );
178 
182  itkGetConstMacro( NumberOfIntegrationSteps, unsigned int );
183 
184 protected:
185 
187  virtual ~VelocityFieldTransform();
188  void PrintSelf( std::ostream& os, Indent indent ) const;
189 
191  virtual typename LightObject::Pointer InternalClone() const;
192 
193  typename DisplacementFieldType::Pointer CopyDisplacementField( const DisplacementFieldType * ) const;
194 
197 
199 
201 
204 
207  unsigned long m_VelocityFieldSetTime;
208 
209 private:
210  VelocityFieldTransform( const Self & ); // purposely not implemented
211  void operator=( const Self & ); // purposely not implemented
212 
217  virtual void SetFixedParametersFromVelocityField() const;
218 
219 };
220 } // end namespace itk
221 
222 #ifndef ITK_MANUAL_INSTANTIATION
223 #include "itkVelocityFieldTransform.hxx"
224 #endif
225 
226 #endif // __itkVelocityFieldTransform_h
227