ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkRegistrationParameterScalesFromShiftBase.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 itkRegistrationParameterScalesFromShiftBase_h
19 #define itkRegistrationParameterScalesFromShiftBase_h
20 
22 
23 namespace itk
24 {
25 
42 template < typename TMetric >
43 class ITK_TEMPLATE_EXPORT RegistrationParameterScalesFromShiftBase :
44  public RegistrationParameterScalesEstimator< TMetric >
45 {
46 public:
47  ITK_DISALLOW_COPY_AND_ASSIGN(RegistrationParameterScalesFromShiftBase);
48 
54 
57 
59  using ScalesType = typename Superclass::ScalesType;
60 
62  using ParametersType = typename Superclass::ParametersType;
63  using ParametersValueType = typename ParametersType::ValueType;
64 
66  using FloatType = typename Superclass::FloatType;
67 
68  using VirtualPointType = typename Superclass::VirtualPointType;
69  using VirtualIndexType = typename Superclass::VirtualIndexType;
70  using MovingTransformType = typename Superclass::MovingTransformType;
71  using FixedTransformType = typename Superclass::FixedTransformType;
72  using JacobianType = typename Superclass::JacobianType;
73  using VirtualImageConstPointer = typename Superclass::VirtualImageConstPointer;
74 
76  void EstimateScales(ScalesType &scales) override;
77 
79  FloatType EstimateStepScale(const ParametersType &step) override;
80 
82  void EstimateLocalStepScales(const ParametersType &step,
83  ScalesType &localStepScales) override;
84 
86  itkSetMacro( SmallParameterVariation, ParametersValueType );
87  itkGetConstMacro( SmallParameterVariation, ParametersValueType );
89 
90 protected:
92  ~RegistrationParameterScalesFromShiftBase() override = default;
93 
94  void PrintSelf(std::ostream & os, Indent indent) const override;
95 
98  virtual FloatType ComputeMaximumVoxelShift(const ParametersType &deltaParameters);
99 
102  virtual void ComputeSampleShifts(const ParametersType &deltaParameters, ScalesType &localShifts) = 0;
103 
104 private:
105  //A small variation of parameters
107 
108 }; //class RegistrationParameterScalesFromShiftBase
109 
110 
111 } // namespace itk
112 
113 
114 #ifndef ITK_MANUAL_INSTANTIATION
115 #include "itkRegistrationParameterScalesFromShiftBase.hxx"
116 #endif
117 
118 #endif /* itkRegistrationParameterScalesFromShiftBase_h */
Light weight base class for most itk classes.
typename MetricType::MovingTransformType MovingTransformType
Registration helper base class for estimating scales of transform parameters from the maximum voxel s...
typename MetricType::FixedTransformType FixedTransformType
typename TMetric::VirtualImageConstPointer VirtualImageConstPointer
Implements a registration helper class for estimating scales of transform parameters and step sizes...
Control indentation during Print() invocation.
Definition: itkIndent.h:49