go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkFullSearchOptimizer.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
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
19#ifndef __itkFullSearchOptimizer_h
20#define __itkFullSearchOptimizer_h
21
22#include "itkSingleValuedNonLinearOptimizer.h"
23#include "itkMapContainer.h"
24#include "itkImage.h"
25#include "itkArray.h"
26#include "itkFixedArray.h"
27
28namespace itk
29{
30
47{
48public:
49
54 typedef SmartPointer< const Self > ConstPointer;
55
57 itkNewMacro( Self );
58
61
63 typedef enum {
67
68 /* Typedefs inherited from superclass */
69 typedef Superclass::ParametersType ParametersType;
70 typedef Superclass::CostFunctionType CostFunctionType;
71 typedef Superclass::CostFunctionPointer CostFunctionPointer;
72 typedef Superclass::MeasureType MeasureType;
73
74 typedef ParametersType::ValueType ParameterValueType; // = double
76 typedef FixedArray< RangeValueType, 3 > RangeType;
77 typedef MapContainer< unsigned int, RangeType > SearchSpaceType;
78 typedef SearchSpaceType::Pointer SearchSpacePointer;
79 typedef SearchSpaceType::ConstIterator SearchSpaceIteratorType;
80
83 typedef Array< ParameterValueType > SearchSpacePointType;
84
87 typedef Array< IndexValueType > SearchSpaceIndexType;
88
90 typedef Array< SizeValueType > SearchSpaceSizeType;
91
95 itkGetConstMacro( Maximize, bool );
96 itkSetMacro( Maximize, bool );
97 itkBooleanMacro( Maximize );
98 bool GetMinimize() const
99 { return !m_Maximize; }
100 void SetMinimize( bool v )
101 { this->SetMaximize( !v ); }
103 { this->MaximizeOff(); }
105 { this->MaximizeOn(); }
106
121 virtual void UpdateCurrentPosition( void );
122
126 void StartOptimization( void ) override;
127
131 virtual void ResumeOptimization( void );
132
136 virtual void StopOptimization( void );
137
148 itkSetObjectMacro( SearchSpace, SearchSpaceType );
150
152 virtual void AddSearchDimension( unsigned int param_nr,
153 RangeValueType minimum, RangeValueType maximum, RangeValueType step );
154
155 virtual void RemoveSearchDimension( unsigned int param_nr );
156
158 virtual unsigned long GetNumberOfIterations( void );
159
161 virtual unsigned int GetNumberOfSearchSpaceDimensions( void );
162
165
168
170
173
175 itkGetConstMacro( CurrentIteration, unsigned long );
176
178 itkGetConstReferenceMacro( CurrentPointInSearchSpace, SearchSpacePointType );
179 itkGetConstReferenceMacro( CurrentIndexInSearchSpace, SearchSpaceIndexType );
180
182 itkGetConstReferenceMacro( BestPointInSearchSpace, SearchSpacePointType );
183 itkGetConstReferenceMacro( BestIndexInSearchSpace, SearchSpaceIndexType );
184
186 itkGetConstMacro( Value, double );
187
189 itkGetConstMacro( BestValue, double );
190
192 itkGetConstMacro( StopCondition, StopConditionType );
193
194protected:
195
198
199 //void PrintSelf(std::ostream& os, Indent indent) const;
200
202 bool m_Stop;
203 double m_Value;
206
214
216 virtual void ProcessSearchSpaceChanges( void );
217
218private:
219
220 FullSearchOptimizer( const Self & ); // purposely not implemented
221 void operator=( const Self & ); // purposely not implemented
222
223 unsigned long m_CurrentIteration;
224
225};
226
227} // end namespace itk
228
229#endif
An optimizer based on full search.
virtual void ProcessSearchSpaceChanges(void)
virtual void UpdateCurrentPosition(void)
Superclass::CostFunctionPointer CostFunctionPointer
Superclass::MeasureType MeasureType
virtual void RemoveSearchDimension(unsigned int param_nr)
void StartOptimization(void) override
Array< SizeValueType > SearchSpaceSizeType
virtual ParametersType PointToPosition(const SearchSpacePointType &point)
Array< IndexValueType > SearchSpaceIndexType
virtual unsigned int GetNumberOfSearchSpaceDimensions(void)
SearchSpaceSizeType m_SearchSpaceSize
MapContainer< unsigned int, RangeType > SearchSpaceType
SearchSpaceType::ConstIterator SearchSpaceIteratorType
ParametersType::ValueType ParameterValueType
virtual unsigned long GetNumberOfIterations(void)
Array< ParameterValueType > SearchSpacePointType
SmartPointer< Self > Pointer
virtual void MaximizeOff()
SearchSpaceIndexType m_CurrentIndexInSearchSpace
FixedArray< RangeValueType, 3 > RangeType
itkGetModifiableObjectMacro(SearchSpace, SearchSpaceType)
ParameterValueType RangeValueType
Superclass::ParametersType ParametersType
SingleValuedNonLinearOptimizer Superclass
SearchSpaceIndexType m_BestIndexInSearchSpace
virtual void SetMaximize(bool _arg)
virtual void ResumeOptimization(void)
SearchSpacePointType m_CurrentPointInSearchSpace
Superclass::CostFunctionType CostFunctionType
virtual void StopOptimization(void)
SearchSpacePointType m_BestPointInSearchSpace
virtual ParametersType IndexToPosition(const SearchSpaceIndexType &index)
FullSearchOptimizer(const Self &)
void operator=(const Self &)
SmartPointer< const Self > ConstPointer
virtual void AddSearchDimension(unsigned int param_nr, RangeValueType minimum, RangeValueType maximum, RangeValueType step)
virtual void MaximizeOn()
virtual SearchSpacePointType IndexToPoint(const SearchSpaceIndexType &index)
virtual const SearchSpaceSizeType & GetSearchSpaceSize(void)
SearchSpaceType::Pointer SearchSpacePointer


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo