13 #ifndef __itkAdaptiveThresholdIterator_h
14 #define __itkAdaptiveThresholdIterator_h
16 #include "itkConditionalConstIterator.h"
36 template <
class TImage,
class TFunction>
83 itkStaticConstMacro(NDimensions,
unsigned int, TImage::ImageDimension);
104 void InitializeIterator();
107 void DoExtendedFloodStep();
110 void SetExpansionDirection(
bool upwards);
113 void InitRegionGrowingState();
115 void SetMinTH(
int min);
117 void SetMaxTH(
int max);
119 int GetSeedPointValue(
void);
124 m_FineDetectionMode = fine;
125 m_DetectionStop =
false;
134 return (*m_QueueMap.find(m_RegionGrowingState)).second.front();
139 return const_cast<ImageType *
>(this->m_Image.GetPointer())
140 ->GetPixel((*m_QueueMap.find(m_RegionGrowingState)).second.front());
146 const_cast<ImageType *
>(this->m_Image.GetPointer())
147 ->GetPixel((*m_QueueMap.find(m_RegionGrowingState)).second.front()) = value;
153 bool IsAtEnd()
const override {
return this->m_IsAtEnd; };
161 this->m_Image = it.m_Image;
162 this->m_Region = it.m_Region;
164 this->m_RegionGrowingState = it.m_RegionGrowingState;
165 this->m_MinTH = it.m_MinTH;
166 this->m_MaxTH = it.m_MaxTH;
167 this->m_SeedPointValue = it.m_SeedPointValue;
168 this->m_VoxelCounter = it.m_VoxelCounter;
169 this->m_LastVoxelNumber = it.m_LastVoxelNumber;
170 this->m_DetectedLeakagePoint = it.m_DetectedLeakagePoint;
171 this->m_CurrentLeakageRatio = it.m_CurrentLeakageRatio;
176 bool IsPixelIncluded(
const IndexType &index)
const override;
205 void ExpandThresholdUpwards();
207 void ExpandThresholdDownwards();
209 void IncrementRegionGrowingState();
215 unsigned int CalculateMaxRGS();
218 void InsertIndexTypeIntoQueueMap(
unsigned int key,
IndexType index);
220 int m_RegionGrowingState;
228 int m_SeedPointValue;
230 unsigned int m_VoxelCounter;
231 unsigned int m_LastVoxelNumber;
233 int m_DetectedLeakagePoint;
234 float m_CurrentLeakageRatio;
236 void CheckSeedPointValue();
241 bool m_FineDetectionMode;
242 bool m_DetectionStop;
246 #ifndef ITK_MANUAL_INSTANTIATION
247 #include "itkAdaptiveThresholdIterator.txx"