ITK  4.13.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 "MinimalPathExtractionExport.h"
21 
22 #include "itkArray.h"
24 
25 namespace itk
26 {
27 
40 class MinimalPathExtraction_EXPORT IterateNeighborhoodOptimizer :
42 {
43 public:
49 
51  itkNewMacro( Self );
52 
55 
58  itkGetConstReferenceMacro( Maximize, bool );
59  itkSetMacro( Maximize, bool );
60  itkBooleanMacro( Maximize );
61  bool GetMinimize( ) const
62  { return !m_Maximize; }
63  void SetMinimize(bool v)
64  { this->SetMaximize(!v); }
65  void MinimizeOn()
66  { this->MaximizeOff(); }
67  void MinimizeOff()
68  { this->MaximizeOn(); }
70 
72  virtual void AdvanceOneStep( void );
73 
75  void StartOptimization( void ) ITK_OVERRIDE;
76 
79  void ResumeOptimization( void );
80 
83  void StopOptimization( void );
84 
89  itkSetMacro(FullyConnected, bool);
90  itkGetConstReferenceMacro(FullyConnected, bool);
91  itkBooleanMacro(FullyConnected);
93 
97  typedef Array<double> NeighborhoodSizeType;
98  itkSetMacro( NeighborhoodSize, NeighborhoodSizeType );
99  itkGetConstReferenceMacro( NeighborhoodSize, NeighborhoodSizeType );
101 
103  itkGetConstMacro( CurrentIteration, unsigned int );
104 
106  itkGetConstReferenceMacro( CurrentValue, double );
107 
108 protected:
110  virtual ~IterateNeighborhoodOptimizer() {};
111  void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
112 
113 private:
114  ITK_DISALLOW_COPY_AND_ASSIGN(IterateNeighborhoodOptimizer);
115 
116  bool m_Stop;
120  unsigned long m_CurrentIteration;
122 
123 };
124 
125 } // end namespace itk
126 
127 #endif
Array class with size defined at construction time.
Definition: itkArray.h:50
Light weight base class for most itk classes.
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...
Control indentation during Print() invocation.
Definition: itkIndent.h:49