13 #ifndef __itkAdaptiveThresholdIterator_h
14 #define __itkAdaptiveThresholdIterator_h
16 #include "itkConditionalConstIterator.h"
36 template <
class TImage,
class TFunction>
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;
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"
Iterates over an image using a variable image function, which threshold can be varied during the iter...
TImage::InternalPixelType InternalPixelType
void SetExpansionDirection(bool upwards)
unsigned int CalculateMaxRGS()
bool IsAtEnd() const override
int GetSeedPointValue(void)
void SetFineDetectionMode(bool fine=false)
TTempImage::Pointer tempPtr
void IncrementRegionGrowingState()
TFunction::InputType FunctionInputType
itkStaticConstMacro(NDimensions, unsigned int, TImage::ImageDimension)
SmartPointer< FunctionType > m_Function
AdaptiveThresholdIterator(ImageType *imagePtr, FunctionType *fnPtr, IndexType startIndex)
TImage::SizeType SizeType
void operator++() override
std::map< unsigned int, IndexQueueType > QueueMapType
SmartPointer< ImageType > m_OutputImage
TImage::IndexType IndexType
int GetLeakagePoint(void)
void ExpandThresholdUpwards()
void DoExtendedFloodStep()
void ExpandThresholdDownwards()
AdaptiveThresholdIterator(ImageType *imagePtr, FunctionType *fnPtr, std::vector< IndexType > &startIndex)
void InitializeIterator()
TImage::RegionType RegionType
bool IsPixelIncluded(const IndexType &index) const override
void Set(const PixelType &value)
static int CalculateInitializeValue(int lower, int upper)
std::vector< IndexType > m_StartIndices
const PixelType Get(void) const override
ImageType::SpacingType m_ImageSpacing
ImageType::PointType m_ImageOrigin
std::queue< IndexType > IndexQueueType
~AdaptiveThresholdIterator() override
int EstimateDistance(IndexType)
AdaptiveThresholdIterator Self
Self & operator=(const Self &it)
TImage::PixelType PixelType
const IndexType GetIndex() override
void InitRegionGrowingState()
virtual SmartPointer< FunctionType > GetFunction() const
ConditionalConstIterator< TImage > Superclass
AdaptiveThresholdIterator(ImageType *imagePtr, FunctionType *fnPtr)