ITK  5.0.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:
44  ITK_DISALLOW_COPY_AND_ASSIGN(IterateNeighborhoodOptimizer);
45 
51 
53  itkNewMacro( Self );
54 
57 
60  itkGetConstReferenceMacro( Maximize, bool );
61  itkSetMacro( Maximize, bool );
62  itkBooleanMacro( Maximize );
63  bool GetMinimize( ) const
64  { return !m_Maximize; }
65  void SetMinimize(bool v)
66  { this->SetMaximize(!v); }
67  void MinimizeOn()
68  { this->MaximizeOff(); }
69  void MinimizeOff()
70  { this->MaximizeOn(); }
72 
74  virtual void AdvanceOneStep( void );
75 
77  void StartOptimization( void ) override;
78 
81  void ResumeOptimization( void );
82 
85  void StopOptimization( void );
86 
91  itkSetMacro(FullyConnected, bool);
92  itkGetConstReferenceMacro(FullyConnected, bool);
93  itkBooleanMacro(FullyConnected);
95 
100  itkSetMacro( NeighborhoodSize, NeighborhoodSizeType );
101  itkGetConstReferenceMacro( NeighborhoodSize, NeighborhoodSizeType );
103 
105  itkGetConstMacro( CurrentIteration, unsigned int );
106 
108  itkGetConstReferenceMacro( CurrentValue, double );
109 
110 protected:
113  void PrintSelf(std::ostream& os, Indent indent) const override;
114 
115 private:
116  bool m_Stop;
120  unsigned long m_CurrentIteration;
122 
123 };
124 
125 } // end namespace itk
126 
127 #endif
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