ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkTimeVaryingVelocityFieldTransform.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 __itkTimeVaryingVelocityFieldTransform_h
19 #define __itkTimeVaryingVelocityFieldTransform_h
20 
22 
24 
25 namespace itk
26 {
27 
55 template<class TScalar, unsigned int NDimensions>
57  public DisplacementFieldTransform<TScalar, NDimensions>
58 {
59 public:
65 
68 
70  itkNewMacro( Self );
71 
73  typedef typename Superclass:: InverseTransformBasePointer InverseTransformBasePointer;
74 
76  typedef typename Superclass::ScalarType ScalarType;
77 
79  typedef typename Superclass::ParametersType ParametersType;
81  typedef typename Superclass::NumberOfParametersType NumberOfParametersType;
82 
84  typedef typename Superclass::JacobianType JacobianType;
85 
87  typedef typename Superclass::InputPointType InputPointType;
88  typedef typename Superclass::OutputPointType OutputPointType;
89 
91  typedef typename Superclass::InputVectorType InputVectorType;
92  typedef typename Superclass::OutputVectorType OutputVectorType;
93 
95  typedef typename Superclass::DerivativeType DerivativeType;
96 
98 
100  itkStaticConstMacro( Dimension, unsigned int, NDimensions );
101 
103  itkStaticConstMacro( TimeVaryingVelocityFieldDimension, unsigned int, NDimensions+1 );
104 
114 
117 
122 
123  typedef typename Superclass::DisplacementFieldType DisplacementFieldType;
125 
128  <ScalarType, OutputVectorType::Dimension,
129  itkGetStaticConstMacro( Dimension ) + 1> OptimizerParametersHelperType;
130 
132  itkGetObjectMacro( TimeVaryingVelocityField, TimeVaryingVelocityFieldType );
133 
135  virtual void SetTimeVaryingVelocityField( TimeVaryingVelocityFieldType * );
136 
138  itkSetObjectMacro( TimeVaryingVelocityFieldInterpolator,
140 
142  itkGetConstObjectMacro( TimeVaryingVelocityFieldInterpolator,
144 
150  itkSetObjectMacro( DisplacementField, DisplacementFieldType );
151 
156  virtual void SetParameters( const ParametersType & );
157 
160  virtual void IntegrateVelocityField();
161 
163  virtual void SetFixedParameters( const ParametersType & );
164 
167  virtual void UpdateTransformParameters( const DerivativeType &, ScalarType factor = 1.0 );
168 
170  bool GetInverse( Self *inverse ) const;
171 
173  virtual InverseTransformBasePointer GetInverseTransform() const;
174 
176  virtual bool IsLinear() const { return false; }
177 
179  NumberOfParametersType GetNumberOfLocalParameters() const
180  {
181  return Dimension;
182  }
183 
185  virtual bool HasLocalSupport() const
186  {
187  return true;
188  }
189 
194  itkSetClampMacro( LowerTimeBound, ScalarType, 0, 1 );
195 
200  itkGetConstMacro( LowerTimeBound, ScalarType );
201 
206  itkSetClampMacro( UpperTimeBound, ScalarType, 0, 1 );
207 
212  itkGetConstMacro( UpperTimeBound, ScalarType );
213 
218  itkSetMacro( NumberOfIntegrationSteps, unsigned int );
219 
224  itkGetConstMacro( NumberOfIntegrationSteps, unsigned int );
225 
226 protected:
229  void PrintSelf( std::ostream& os, Indent indent ) const;
230 
233 
235  virtual typename LightObject::Pointer InternalClone() const;
236 
238  CopyDisplacementField(const DisplacementFieldType *toCopy) const;
243  virtual void SetFixedParametersFromTimeVaryingVelocityField();
244 
249 
250 private:
251  TimeVaryingVelocityFieldTransform( const Self& ); //purposely not implemented
252  void operator=( const Self& ); //purposely not implemented
253 };
254 
255 } // end namespace itk
256 
257 #if ITK_TEMPLATE_EXPLICIT
258 # include "Templates/itkTimeVaryingVelocityFieldTransform+-.h"
259 #endif
260 
261 #if ITK_TEMPLATE_TXX
262 # include "itkTimeVaryingVelocityFieldTransform.hxx"
263 #endif
264 
265 #endif // __itkTimeVaryingVelocityFieldTransform_h
266