17 #ifndef __itkAdaptiveThresholdIterator_h
18 #define __itkAdaptiveThresholdIterator_h
20 #include "itkConditionalConstIterator.h"
40 template <
class TImage,
class TFunction>
87 itkStaticConstMacro(NDimensions,
unsigned int, TImage::ImageDimension);
108 void InitializeIterator();
111 void DoExtendedFloodStep();
114 void SetExpansionDirection(
bool upwards);
117 void InitRegionGrowingState();
119 void SetMinTH(
int min);
121 void SetMaxTH(
int max);
123 int GetSeedPointValue(
void);
128 m_FineDetectionMode = fine;
129 m_DetectionStop =
false;
138 return (*m_QueueMap.find(m_RegionGrowingState)).second.front();
141 const PixelType
Get(
void)
const
143 return const_cast<ImageType *
>(this->m_Image.GetPointer())
144 ->GetPixel((*m_QueueMap.find(m_RegionGrowingState)).second.front());
148 void Set(
const PixelType &value)
150 const_cast<ImageType *
>(this->m_Image.GetPointer())
151 ->GetPixel((*m_QueueMap.find(m_RegionGrowingState)).second.front()) = value;
165 this->m_Image = it.m_Image;
166 this->m_Region = it.m_Region;
171 bool IsPixelIncluded(
const IndexType &index)
const;
200 void ExpandThresholdUpwards();
202 void ExpandThresholdDownwards();
204 void IncrementRegionGrowingState();
207 int EstimateDistance(IndexType);
210 unsigned int CalculateMaxRGS();
213 void InsertIndexTypeIntoQueueMap(
unsigned int key, IndexType index);
215 int m_RegionGrowingState;
217 QueueMapType m_QueueMap;
223 int m_SeedPointValue;
225 unsigned int m_VoxelCounter;
226 unsigned int m_LastVoxelNumber;
228 int m_DetectedLeakagePoint;
229 float m_CurrentLeakageRatio;
231 void CheckSeedPointValue();
236 bool m_FineDetectionMode;
237 bool m_DetectionStop;
241 #ifndef ITK_MANUAL_INSTANTIATION
std::vector< IndexType > m_StartIndices
SmartPointer< FunctionType > m_Function
ImageType::PointType m_ImageOrigin
itk::SmartPointer< Self > Pointer
const IndexType GetIndex()
TFunction::InputType FunctionInputType
ConditionalConstIterator< TImage > Superclass
TImage::SizeType SizeType
SmartPointer< ImageType > m_OutputImage
std::queue< IndexType > IndexQueueType
static int CalculateInitializeValue(int lower, int upper)
void Set(const PixelType &value)
AdaptiveThresholdIterator Self
Iterates over an image using a variable image function, which threshold can be varied during the iter...
int GetLeakagePoint(void)
TImage::InternalPixelType InternalPixelType
TImage::RegionType RegionType
TImage::IndexType IndexType
ImageType::SpacingType m_ImageSpacing
std::map< unsigned int, IndexQueueType > QueueMapType
virtual SmartPointer< FunctionType > GetFunction() const
const PixelType Get(void) const
TImage::PixelType PixelType
virtual ~AdaptiveThresholdIterator()
Self & operator=(const Self &it)
void SetFineDetectionMode(bool fine=false)
TTempImage::Pointer tempPtr