ITK  5.3.0
Insight Toolkit
itkRegistrationParameterScalesFromShiftBase.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 
43 template <typename TMetric>
45  : public RegistrationParameterScalesEstimator<TMetric>
46 {
47 public:
48  ITK_DISALLOW_COPY_AND_MOVE(RegistrationParameterScalesFromShiftBase);
49 
55 
58 
60  using typename Superclass::ScalesType;
61 
63  using typename Superclass::ParametersType;
64  using ParametersValueType = typename ParametersType::ValueType;
65 
67  using typename Superclass::FloatType;
68 
69  using typename Superclass::VirtualPointType;
70  using typename Superclass::VirtualIndexType;
71  using typename Superclass::MovingTransformType;
72  using typename Superclass::FixedTransformType;
73  using typename Superclass::JacobianType;
74  using typename Superclass::VirtualImageConstPointer;
75 
77  void
78  EstimateScales(ScalesType & parameterScales) override;
79 
81  FloatType
82  EstimateStepScale(const ParametersType & step) override;
83 
85  void
86  EstimateLocalStepScales(const ParametersType & step, ScalesType & localStepScales) override;
87 
89  itkSetMacro(SmallParameterVariation, ParametersValueType);
90  itkGetConstMacro(SmallParameterVariation, ParametersValueType);
92 
93 protected:
95  ~RegistrationParameterScalesFromShiftBase() override = default;
96 
97  void
98  PrintSelf(std::ostream & os, Indent indent) const override;
99 
102  virtual FloatType
103  ComputeMaximumVoxelShift(const ParametersType & deltaParameters);
104 
107  virtual void
108  ComputeSampleShifts(const ParametersType & deltaParameters, ScalesType & localShifts) = 0;
109 
110 private:
111  // A small variation of parameters
113 
114 }; // class RegistrationParameterScalesFromShiftBase
115 
116 
117 } // namespace itk
118 
119 
120 #ifndef ITK_MANUAL_INSTANTIATION
121 # include "itkRegistrationParameterScalesFromShiftBase.hxx"
122 #endif
123 
124 #endif /* itkRegistrationParameterScalesFromShiftBase_h */
itk::OptimizerParameters
Class to hold and manage different parameter types used during optimization.
Definition: itkOptimizerParameters.h:36
itk::RegistrationParameterScalesFromShiftBase::m_SmallParameterVariation
ParametersValueType m_SmallParameterVariation
Definition: itkRegistrationParameterScalesFromShiftBase.h:112
itk::RegistrationParameterScalesEstimator
Implements a registration helper class for estimating scales of transform parameters and step sizes.
Definition: itkRegistrationParameterScalesEstimator.h:80
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::RegistrationParameterScalesFromShiftBase
Registration helper base class for estimating scales of transform parameters from the maximum voxel s...
Definition: itkRegistrationParameterScalesFromShiftBase.h:44
itk::RegistrationParameterScalesFromShiftBase::ParametersValueType
typename ParametersType::ValueType ParametersValueType
Definition: itkRegistrationParameterScalesFromShiftBase.h:64
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::OptimizerParameterScalesEstimatorTemplate< TMetric::ParametersValueType >::FloatType
TMetric::ParametersValueType FloatType
Definition: itkOptimizerParameterScalesEstimator.h:60
itkRegistrationParameterScalesEstimator.h