ITK  4.9.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<typename TParametersValueType, unsigned int NDimensions>
37  public DisplacementFieldTransform<TParametersValueType, NDimensions>
38 {
39 public:
45 
48 
50  itkNewMacro( Self );
51 
54 
57 
63 
66 
69 
73 
77 
80 
83 
85  itkStaticConstMacro( VelocityFieldDimension, unsigned int, NDimensions + 1 );
86 
88  itkStaticConstMacro( Dimension, unsigned int, NDimensions );
89 
93 
97 
106 
109 
113 
118  virtual void SetVelocityField( VelocityFieldType * );
119  itkGetModifiableObjectMacro(VelocityField, VelocityFieldType );
121 
122  virtual void SetFixedParameters( const FixedParametersType & ) ITK_OVERRIDE;
123 
127  itkGetModifiableObjectMacro(VelocityFieldInterpolator, VelocityFieldInterpolatorType );
129 
131  itkGetConstReferenceMacro( VelocityFieldSetTime, unsigned long );
132 
138  virtual void SetDisplacementField( DisplacementFieldType * displacementField) ITK_OVERRIDE
139  {
140  itkDebugMacro("setting DisplacementField to " << displacementField);
141  if ( this->m_DisplacementField != displacementField )
142  {
143  this->m_DisplacementField = displacementField;
144  this->Modified();
145  }
146  }
148 
149  virtual void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) ITK_OVERRIDE;
150 
152  bool GetInverse( Self *inverse ) const;
153 
155  virtual InverseTransformBasePointer GetInverseTransform() const ITK_OVERRIDE;
156 
158  virtual void IntegrateVelocityField() {};
159 
164  itkSetClampMacro( LowerTimeBound, ScalarType, 0.0, 1.0 );
165 
170  itkGetConstMacro( LowerTimeBound, ScalarType );
171 
176  itkSetClampMacro( UpperTimeBound, ScalarType, 0.0, 1.0 );
177 
182  itkGetConstMacro( UpperTimeBound, ScalarType );
183 
187  itkSetMacro( NumberOfIntegrationSteps, unsigned int );
188 
192  itkGetConstMacro( NumberOfIntegrationSteps, unsigned int );
193 
194 protected:
195 
197  virtual ~VelocityFieldTransform();
198  void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE;
199 
201  virtual typename LightObject::Pointer InternalClone() const ITK_OVERRIDE;
202 
204 
207 
209 
211 
214 
217  unsigned long m_VelocityFieldSetTime;
218 
219 private:
220  VelocityFieldTransform( const Self & ) ITK_DELETE_FUNCTION;
221  void operator=( const Self & ) ITK_DELETE_FUNCTION;
222 
227  virtual void SetFixedParametersFromVelocityField() const;
228 
229 };
230 } // end namespace itk
231 
232 #ifndef ITK_MANUAL_INSTANTIATION
233 #include "itkVelocityFieldTransform.hxx"
234 #endif
235 
236 #endif // itkVelocityFieldTransform_h
Superclass::FixedParametersValueType FixedParametersValueType
Superclass::RegionType RegionType
Definition: itkImage.h:137
SmartPointer< const Self > ConstPointer
Superclass::OutputVectorPixelType OutputVectorPixelType
VelocityFieldType::RegionType RegionType
Light weight base class for most itk classes.
Image< OutputVectorType, Dimension > DisplacementFieldType
Superclass::DisplacementFieldType DisplacementFieldType
Represent the size (bounds) of a n-dimensional image.
Definition: itkSize.h:52
Superclass::ParametersType ParametersType
Superclass::NumberOfParametersType NumberOfParametersType
Provides local/dense/high-dimensionaltiy transformation via a a displacement field.
VelocityFieldType::IndexType IndexType
Superclass::ParametersValueType ParametersValueType
DisplacementFieldType::Pointer m_DisplacementField
Superclass::InputVectorType InputVectorType
Superclass::ParametersValueType ParametersValueType
Superclass::InputVectorPixelType InputVectorPixelType
DisplacementFieldType::Pointer DisplacementFieldPointer
virtual void SetDisplacementField(DisplacementFieldType *displacementField) override
DisplacementFieldTransform< TParametersValueType, NDimensions > Superclass
bool GetInverse(Self *inverse) const
static const unsigned int Dimension
TPixel PixelType
Definition: itkImage.h:89
Superclass::NumberOfParametersType NumberOfParametersType
VelocityFieldType::PixelType PixelType
virtual LightObject::Pointer InternalClone() const override
VelocityFieldInterpolatorType::Pointer VelocityFieldInterpolatorPointer
virtual void UpdateTransformParameters(const DerivativeType &update, ScalarType factor=1.0) override
virtual void SetVelocityField(VelocityFieldType *)
Superclass::InverseTransformBasePointer InverseTransformBasePointer
VelocityFieldType::DirectionType DirectionType
Image< OutputVectorType, VelocityFieldDimension > VelocityFieldType
Class to hold and manage parameters of type Image&lt;Vector&lt;...&gt;,...&gt;, used in Transforms, etc.
Class to hold and manage different parameter types used during optimization.
ImageVectorOptimizerParametersHelper< ScalarType, Dimension, VelocityFieldDimension > OptimizerParametersHelperType
VelocityFieldType::PointType PointType
Superclass::IndexType IndexType
Definition: itkImage.h:119
VelocityFieldType::SpacingType SpacingType
Superclass::FixedParametersType FixedParametersType
virtual void SetFixedParametersFromVelocityField() const
static const unsigned int VelocityFieldDimension
VectorInterpolateImageFunction< VelocityFieldType, ScalarType > VelocityFieldInterpolatorType
VelocityFieldType::SizeType SizeType
virtual void SetFixedParameters(const FixedParametersType &) override
virtual void Modified() const
Superclass::FixedParametersValueType FixedParametersValueType
virtual InverseTransformBasePointer GetInverseTransform() const override
Superclass::InverseTransformBasePointer InverseTransformBasePointer
Superclass::DerivativeType DerivativeType
Superclass::InputPointType InputPointType
Superclass::OutputVectorType OutputVectorType
Superclass::InputVectorPixelType InputVectorPixelType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
VelocityFieldInterpolatorType::Pointer m_VelocityFieldInterpolator
Base class for all vector image interpolaters.
VelocityFieldType::Pointer VelocityFieldPointer
Superclass::OutputPointType OutputPointType
void PrintSelf(std::ostream &os, Indent indent) const override
Superclass::OutputVectorPixelType OutputVectorPixelType
Superclass::TransformCategoryType TransformCategoryType
DisplacementFieldType::Pointer CopyDisplacementField(const DisplacementFieldType *) const
Superclass::OutputVectorType OutputVectorType
virtual void SetVelocityFieldInterpolator(VelocityFieldInterpolatorType *)
Superclass::TransformCategoryType TransformCategoryType
Templated n-dimensional image class.
Definition: itkImage.h:75
Provides local/dense/high-dimensionality transformation via a a velocity field.
Superclass::FixedParametersType FixedParametersType