15 #ifndef itkMIDASRegionGrowingImageFilter_h
16 #define itkMIDASRegionGrowingImageFilter_h
21 #include <itkImageToImageFilter.h>
22 #include <itkImageRegionConstIteratorWithIndex.h>
23 #include <itkPolyLineParametricPath.h>
24 #include <itkContinuousIndex.h>
32 template <
class TInputImage,
class TOutputImage,
class TPo
intSet>
39 typedef ImageToImageFilter<TInputImage, TOutputImage>
Superclass;
69 itkSetMacro(LowerThreshold, InputPixelType);
70 itkGetConstMacro(LowerThreshold, InputPixelType);
75 itkSetMacro(UpperThreshold, InputPixelType);
76 itkGetConstMacro(UpperThreshold, InputPixelType);
81 itkSetMacro(ForegroundValue, OutputPixelType);
82 itkGetConstMacro(ForegroundValue, OutputPixelType);
87 itkSetMacro(BackgroundValue, OutputPixelType);
88 itkGetConstMacro(BackgroundValue, OutputPixelType);
93 itkSetMacro(RegionOfInterest, OutputImageRegionType);
94 itkGetConstMacro(RegionOfInterest, OutputImageRegionType);
99 itkSetMacro(UseRegionOfInterest,
bool);
100 itkGetConstMacro(UseRegionOfInterest,
bool);
107 itkSetMacro(ProjectSeedsIntoRegion,
bool);
108 itkGetConstMacro(ProjectSeedsIntoRegion,
bool);
110 itkSetMacro(MaximumSeedProjectionDistanceInVoxels,
unsigned int);
111 itkGetMacro(MaximumSeedProjectionDistanceInVoxels,
unsigned int);
113 itkSetMacro(SegmentationContourImageInsideValue, OutputPixelType);
114 itkGetConstMacro(SegmentationContourImageInsideValue, OutputPixelType);
116 itkSetMacro(SegmentationContourImageBorderValue, OutputPixelType);
117 itkGetConstMacro(SegmentationContourImageBorderValue, OutputPixelType);
119 itkSetMacro(SegmentationContourImageOutsideValue, OutputPixelType);
120 itkGetConstMacro(SegmentationContourImageOutsideValue, OutputPixelType);
122 itkSetMacro(ManualContourImageBorderValue, OutputPixelType);
123 itkGetConstMacro(ManualContourImageBorderValue, OutputPixelType);
135 itkSetMacro(EraseFullSlice,
bool);
136 itkGetConstMacro(EraseFullSlice,
bool);
138 itkSetMacro(PropMask, OutputImageIndexType);
139 itkGetConstMacro(PropMask, OutputImageIndexType);
141 itkSetMacro(UsePropMaskMode,
bool);
142 itkGetConstMacro(UsePropMaskMode,
bool);
147 void SetManualContours(ParametricPathVectorType* contours);
154 return *mspc_SeedPoints;
162 mspc_SeedPoints = &seeds;
171 return m_SegmentationContourImage;
182 itkSetObjectMacro(SegmentationContourImage, OutputImageType);
189 return m_ManualContourImage;
204 itkSetObjectMacro(ManualContourImage, OutputImageType);
211 virtual void GenerateData(
void);
214 std::cerr <<
"Not supported.\n";
221 void operator=(
const Self&);
230 void ConditionalAddPixel(
231 std::stack<typename OutputImageType::IndexType> &r_stack,
234 const bool &isFullyConnected
241 bool IsFullyConnected(
254 const ParametricPathVectorType* contours,
259 InputPixelType m_LowerThreshold;
260 InputPixelType m_UpperThreshold;
261 OutputPixelType m_ForegroundValue;
262 OutputPixelType m_BackgroundValue;
263 typename PointSetType::ConstPointer mspc_SeedPoints;
264 OutputImageRegionType m_RegionOfInterest;
265 bool m_UseRegionOfInterest;
266 bool m_ProjectSeedsIntoRegion;
267 unsigned int m_MaximumSeedProjectionDistanceInVoxels;
268 typename OutputImageType::ConstPointer m_SegmentationContourImage;
269 OutputPixelType m_SegmentationContourImageInsideValue;
270 OutputPixelType m_SegmentationContourImageBorderValue;
271 OutputPixelType m_SegmentationContourImageOutsideValue;
272 typename OutputImageType::ConstPointer m_ManualContourImage;
273 OutputPixelType m_ManualContourImageBorderValue;
274 OutputPixelType m_ManualContourImageNonBorderValue;
275 ParametricPathVectorType* m_ManualContours;
276 bool m_EraseFullSlice;
277 OutputImageIndexType m_PropMask;
278 bool m_UsePropMaskMode;
281 #ifndef ITK_MANUAL_INSTANTIATION
282 #include "itkMIDASRegionGrowingImageFilter.txx"
OutputImageType::IndexType OutputImageIndexType
Definition: itkMIDASRegionGrowingImageFilter.h:52
TInputImage InputImageType
Definition: itkMIDASRegionGrowingImageFilter.h:45
ImageType::SizeType SizeType
Definition: niftkMakeLapUSProbeBasicModel.cxx:31
OutputImageType::SizeType OutputImageSizeType
Definition: itkMIDASRegionGrowingImageFilter.h:51
SmartPointer< Self > Pointer
Definition: itkMIDASRegionGrowingImageFilter.h:38
MIDASRegionGrowingImageFilter Self
Definition: itkMIDASRegionGrowingImageFilter.h:36
void SetSeedPoints(const PointSetType &seeds)
Set the seeds, as region growing starts from each seed point.
Definition: itkMIDASRegionGrowingImageFilter.h:160
OutputImageType::Pointer OutputImagePointerType
Definition: itkMIDASRegionGrowingImageFilter.h:53
SmartPointer< const Self > ConstPointer
Definition: itkMIDASRegionGrowingImageFilter.h:37
TOutputImage OutputImageType
Definition: itkMIDASRegionGrowingImageFilter.h:49
Definition: niftkITKAffineResampleImage.cxx:74
ImageType::IndexType IndexType
Definition: niftkMakeLapUSProbeBasicModel.cxx:32
OutputImageType::ConstPointer OutputImageConstPointerType
Definition: itkMIDASRegionGrowingImageFilter.h:54
const OutputImageType * GetManualContourImage(void) const
Retrieve the "manual" contour image.
Definition: itkMIDASRegionGrowingImageFilter.h:187
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Definition: itkMIDASRegionGrowingImageFilter.h:39
InputImageType::PixelType InputPixelType
Definition: itkMIDASRegionGrowingImageFilter.h:48
const PointSetType & GetSeedPoints(void) const
Retrieve the seeds.
Definition: itkMIDASRegionGrowingImageFilter.h:152
ParametricPathType::VertexType ParametricPathVertexType
Definition: itkMIDASRegionGrowingImageFilter.h:64
itk::ContinuousIndex< double, TInputImage::ImageDimension > ContinuousIndexType
Definition: itkMIDASRegionGrowingImageFilter.h:58
TPointSet PointSetType
Definition: itkMIDASRegionGrowingImageFilter.h:56
float PixelType
Definition: niftkBreastDCEandADC.cxx:88
OutputImageType::RegionType OutputImageRegionType
Definition: itkMIDASRegionGrowingImageFilter.h:50
ImageType::RegionType RegionType
Definition: niftkMakeLapUSProbeBasicModel.cxx:30
const OutputImageType * GetSegmentationContourImage(void) const
Retrieve the contour image.
Definition: itkMIDASRegionGrowingImageFilter.h:169
virtual void ThreadedGenerateData(const typename OutputImageType::RegionType &outputRegionForThread, ThreadIdType threadId)
Definition: itkMIDASRegionGrowingImageFilter.h:213
OutputImageType::PixelType OutputPixelType
Definition: itkMIDASRegionGrowingImageFilter.h:55
std::vector< ParametricPathPointer > ParametricPathVectorType
Definition: itkMIDASRegionGrowingImageFilter.h:62
ParametricPathType::Pointer ParametricPathPointer
Definition: itkMIDASRegionGrowingImageFilter.h:61
virtual ~MIDASRegionGrowingImageFilter(void)
Definition: itkMIDASRegionGrowingImageFilter.h:209
itk::PolyLineParametricPath< TInputImage::ImageDimension > ParametricPathType
Definition: itkMIDASRegionGrowingImageFilter.h:59
ParametricPathType::VertexListType ParametricPathVertexListType
Definition: itkMIDASRegionGrowingImageFilter.h:63
Implements region growing limited by contours.
Definition: itkMIDASRegionGrowingImageFilter.h:33