12 #ifndef itkConnectedAdaptiveThresholdImageFilter_h
13 #define itkConnectedAdaptiveThresholdImageFilter_h
15 #include <itkConnectedThresholdImageFilter.h>
27 template <
class TInputImage,
class TOutputImage>
29 :
public ConnectedThresholdImageFilter<TInputImage, TOutputImage>
34 typedef ConnectedThresholdImageFilter<TInputImage, TOutputImage>
Superclass;
39 itkFactorylessNewMacro(
Self);
48 typedef typename InputImageType::IndexType
IndexType;
49 typedef typename InputImageType::PixelType
PixelType;
61 m_FineDetectionMode = fine;
62 m_DiscardLastPreview =
false;
102 unsigned int adjLowerTh,
103 unsigned int adjUpperTh,
104 itk::Index<3> seedPoint,
105 bool discardLeafSegmentation);
118 bool m_GrowingDirectionIsUpwards;
122 unsigned int m_AdjLowerTh;
123 unsigned int m_AdjUpperTh;
124 itk::Index<3> m_SeedPointIndex;
127 bool m_FineDetectionMode;
129 bool m_DiscardLastPreview;
130 bool m_SegmentationCancelled;
135 #ifndef ITK_MANUAL_INSTANTIATION
136 #include <itkConnectedAdaptiveThresholdImageFilter.tpp>
ImageFilter for region growing with an adaptive threshold iterator.
InputImageType::PixelType PixelType
ConnectedAdaptiveThresholdImageFilter Self
void SetGrowingDirectionIsUpwards(bool upwards)
Set the growing direction for adaptive thresholding.
int GetSeedpointValue(void)
Get the pixel value at the seed point.
unsigned int AdjustIteratorMask()
Modify the iterator mask to accumulate previous segmentation results.
void SetFineDetectionMode(bool fine)
Switch between fine and raw leakage detection mode.
OutputImageType::Pointer OutputImagePointer
TOutputImage OutputImageType
SmartPointer< const Self > ConstPointer
ConnectedAdaptiveThresholdImageFilter()
int GetLeakagePoint(void)
Get the detected leakage point value.
TInputImage InputImageType
TOutputImage * GetResultImage()
Get the result image after filter execution.
ConnectedThresholdImageFilter< TInputImage, TOutputImage > Superclass
InputImageType::IndexType IndexType
void SetParameterForFineSegmentation(TOutputImage *iteratorMaskForFineSegmentation, unsigned int adjLowerTh, unsigned int adjUpperTh, itk::Index< 3 > seedPoint, bool discardLeafSegmentation)
Configure parameters for fine segmentation (bronchial tree leaf analysis).
void GenerateData() override
~ConnectedAdaptiveThresholdImageFilter() override
SmartPointer< Self > Pointer
IndexType CorrectSeedPointPosition(unsigned int sizeOfVolume, int lowerTh, int upperTh)
Correct the seed point position if its value is outside the threshold range.
void CropMask(unsigned int croppingSize)
Set all voxels in a cubic region around the seed point to zero.