ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkIterateNeighborhoodOptimizer.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkIterateNeighborhoodOptimizer.h,v $
5  Language: C++
6  Date: $Date$
7  Version: $Revision$
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef itkIterateNeighborhoodOptimizer_h
18 #define itkIterateNeighborhoodOptimizer_h
19 
20 #include "itkArray.h"
22 
23 namespace itk
24 {
25 
40 {
41 public:
47 
49  itkNewMacro( Self );
50 
53 
56  itkGetConstReferenceMacro( Maximize, bool );
57  itkSetMacro( Maximize, bool );
58  itkBooleanMacro( Maximize );
59  bool GetMinimize( ) const
60  { return !m_Maximize; }
61  void SetMinimize(bool v)
62  { this->SetMaximize(!v); }
63  void MinimizeOn()
64  { this->MaximizeOff(); }
65  void MinimizeOff()
66  { this->MaximizeOn(); }
68 
70  virtual void AdvanceOneStep( void );
71 
73  void StartOptimization( void );
74 
77  void ResumeOptimization( void );
78 
81  void StopOptimization( void );
82 
87  itkSetMacro(FullyConnected, bool);
88  itkGetConstReferenceMacro(FullyConnected, bool);
89  itkBooleanMacro(FullyConnected);
91 
96  itkSetMacro( NeighborhoodSize, NeighborhoodSizeType );
97  itkGetConstReferenceMacro( NeighborhoodSize, NeighborhoodSizeType );
99 
101  itkGetConstMacro( CurrentIteration, unsigned int );
102 
104  itkGetConstReferenceMacro( CurrentValue, double );
105 
106 protected:
109  void PrintSelf(std::ostream& os, Indent indent) const;
110 
111 private:
112  IterateNeighborhoodOptimizer(const Self&); //purposely not implemented
113  void operator=(const Self&); //purposely not implemented
114 
115  bool m_Stop;
119  unsigned long m_CurrentIteration;
121 
122 };
123 
124 } // end namespace itk
125 
126 #endif
Light weight base class for most itk classes.
virtual void SetMaximize(bool _arg)
This class is a base for the Optimization methods that optimize a single valued function.
Finds the local minima/maxima by iteratively choosing the minimum/maximum value in a neighborhood...
virtual void AdvanceOneStep(void)
Control indentation during Print() invocation.
Definition: itkIndent.h:49
void PrintSelf(std::ostream &os, Indent indent) const