ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkConstantVelocityFieldTransform.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 itkConstantVelocityFieldTransform_h
19 #define itkConstantVelocityFieldTransform_h
20 
22 
23 namespace itk
24 {
25 
35 template
36 <typename TParametersValueType, unsigned int NDimensions>
38  public DisplacementFieldTransform<TParametersValueType, NDimensions>
39 {
40 public:
46 
49 
51  itkNewMacro( Self );
52 
55 
58 
64 
67 
70 
74 
78 
81 
84 
86  itkStaticConstMacro( ConstantVelocityFieldDimension, unsigned int, NDimensions );
87 
89  itkStaticConstMacro( Dimension, unsigned int, NDimensions );
90 
93  typedef typename DisplacementFieldType::Pointer DisplacementFieldPointer;
94 
98 
107 
109 
114 
118 
124  itkGetModifiableObjectMacro(ConstantVelocityField, ConstantVelocityFieldType );
126 
127  virtual void SetFixedParameters( const FixedParametersType & ) ITK_OVERRIDE;
128 
132  itkGetModifiableObjectMacro(ConstantVelocityFieldInterpolator, ConstantVelocityFieldInterpolatorType );
134 
136  itkGetConstReferenceMacro( ConstantVelocityFieldSetTime, ModifiedTimeType );
137 
138  virtual void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) ITK_OVERRIDE;
139 
141  bool GetInverse( Self *inverse ) const;
142 
144  virtual InverseTransformBasePointer GetInverseTransform() const ITK_OVERRIDE;
145 
148  virtual void IntegrateVelocityField();
149 
150  // Set/get compute number of exp. integration steps automatically
151  itkSetMacro( CalculateNumberOfIntegrationStepsAutomatically, bool );
152  itkGetConstMacro( CalculateNumberOfIntegrationStepsAutomatically, bool );
153  itkBooleanMacro( CalculateNumberOfIntegrationStepsAutomatically );
154 
159  itkSetClampMacro( LowerTimeBound, ScalarType, 0, 1 );
160 
165  itkGetConstMacro( LowerTimeBound, ScalarType );
166 
171  itkSetClampMacro( UpperTimeBound, ScalarType, 0, 1 );
172 
177  itkGetConstMacro( UpperTimeBound, ScalarType );
178 
182  itkSetMacro( NumberOfIntegrationSteps, unsigned int );
183 
187  itkGetConstMacro( NumberOfIntegrationSteps, unsigned int );
188 
189 protected:
190 
192  virtual ~ConstantVelocityFieldTransform();
193  void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE;
194 
196  virtual typename LightObject::Pointer InternalClone() const ITK_OVERRIDE;
197 
199 
201 
203 
206 
210 
211  ScalarType m_LowerTimeBound;
212  ScalarType m_UpperTimeBound;
213 
215 
216 private:
217  ConstantVelocityFieldTransform( const Self & ) ITK_DELETE_FUNCTION;
218  void operator=( const Self & ) ITK_DELETE_FUNCTION;
219 
224  virtual void SetFixedParametersFromConstantVelocityField() const;
225 
226 };
227 
228 } // end namespace itk
229 
230 #ifndef ITK_MANUAL_INSTANTIATION
231 #include "itkConstantVelocityFieldTransform.hxx"
232 #endif
233 
234 #endif // itkConstantVelocityFieldTransform_h
ConstantVelocityFieldType::IndexType IndexType
Provides local/dense/high-dimensionality transformation via a a constant velocity field...
DisplacementFieldType::Pointer CopyDisplacementField(const DisplacementFieldType *) const
Superclass::RegionType RegionType
Definition: itkImage.h:137
Superclass::OutputVectorPixelType OutputVectorPixelType
ConstantVelocityFieldType::DirectionType DirectionType
Light weight base class for most itk classes.
Image< OutputVectorType, Dimension > DisplacementFieldType
Superclass::NumberOfParametersType NumberOfParametersType
Provides local/dense/high-dimensionaltiy transformation via a a displacement field.
Superclass::NumberOfParametersType NumberOfParametersType
unsigned long ModifiedTimeType
Definition: itkIntTypes.h:164
Superclass::InputVectorPixelType InputVectorPixelType
virtual void SetFixedParameters(const FixedParametersType &) override
Superclass::ParametersValueType ParametersValueType
Superclass::InputVectorPixelType InputVectorPixelType
ConstantVelocityFieldType::PixelType PixelType
Superclass::OutputVectorPixelType OutputVectorPixelType
ImageVectorOptimizerParametersHelper< ScalarType, Dimension, ConstantVelocityFieldDimension > OptimizerParametersHelperType
ConstantVelocityFieldType::Pointer ConstantVelocityFieldPointer
virtual void UpdateTransformParameters(const DerivativeType &update, ScalarType factor=1.0) override
TPixel PixelType
Definition: itkImage.h:89
virtual void SetConstantVelocityFieldInterpolator(ConstantVelocityFieldInterpolatorType *)
virtual void SetFixedParametersFromConstantVelocityField() const
virtual void SetConstantVelocityField(ConstantVelocityFieldType *)
Superclass::InverseTransformBasePointer InverseTransformBasePointer
ConstantVelocityFieldType::PointType PointType
Class to hold and manage parameters of type Image&lt;Vector&lt;...&gt;,...&gt;, used in Transforms, etc.
VectorInterpolateImageFunction< ConstantVelocityFieldType, ScalarType > ConstantVelocityFieldInterpolatorType
ConstantVelocityFieldType::SizeType SizeType
Class to hold and manage different parameter types used during optimization.
void PrintSelf(std::ostream &os, Indent indent) const override
Superclass::IndexType IndexType
Definition: itkImage.h:119
Superclass::SizeType SizeType
Definition: itkImage.h:126
Superclass::FixedParametersType FixedParametersType
Superclass::FixedParametersValueType FixedParametersValueType
Superclass::FixedParametersType FixedParametersType
virtual LightObject::Pointer InternalClone() const override
bool GetInverse(Self *inverse) const
ConstantVelocityFieldInterpolatorType::Pointer ConstantVelocityFieldInterpolatorPointer
Superclass::InverseTransformBasePointer InverseTransformBasePointer
Superclass::ParametersValueType ParametersValueType
Superclass::OutputVectorType OutputVectorType
ConstantVelocityFieldType::SpacingType SpacingType
DisplacementFieldTransform< TParametersValueType, NDimensions > Superclass
DisplacementFieldType::Pointer DisplacementFieldPointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::DisplacementFieldType DisplacementFieldType
Base class for all vector image interpolaters.
Superclass::TransformCategoryType TransformCategoryType
Image< OutputVectorType, ConstantVelocityFieldDimension > ConstantVelocityFieldType
virtual InverseTransformBasePointer GetInverseTransform() const override
Superclass::FixedParametersValueType FixedParametersValueType
ConstantVelocityFieldInterpolatorPointer m_ConstantVelocityFieldInterpolator
ConstantVelocityFieldType::RegionType RegionType
Superclass::TransformCategoryType TransformCategoryType
Templated n-dimensional image class.
Definition: itkImage.h:75