1 #ifndef itkGrowCutSegmentationImageFilter_h 2 #define itkGrowCutSegmentationImageFilter_h 5 #include "itkImageToImageFilter.h" 6 #include "itkSimpleDataObjectDecorator.h" 7 #include "itkVectorContainer.h" 55 template<
class TInputImage,
57 class TWeightPixelType =
float>
64 typedef ImageToImageFilter<TInputImage,TOutputImage>
Superclass;
77 TInputImage::ImageDimension );
85 typedef typename InputImageType::SizeType
SizeType;
101 TInputImage::ImageDimension);
103 TOutputImage::ImageDimension);
106 typedef Index<itkGetStaticConstMacro(InputImageDimension)>
IndexType;
126 typedef Image<TWeightPixelType, itkGetStaticConstMacro(InputImageDimension) >
WeightImageType;
136 this->ProcessObject::SetNthInput(0, const_cast< InputImageType *>(in) );
144 this->ProcessObject::SetNthInput(1, const_cast< OutputImageType *>(f) );
145 m_LabelImage =
static_cast< OutputImageType *
>(this->ProcessObject::GetInput(1));
156 this->ProcessObject::SetNthInput(2,const_cast< WeightImageType *>(w));
277 ThreadIdType threadId ) ITK_OVERRIDE;
283 void PrintSelf (
std::ostream& os, Indent indent ) const ITK_OVERRIDE;
291 void operator=(const
Self&);
295 void InitializeDistancesImage(TInputImage *input,
WeightImageType *distance);
297 void GetRegionOfInterest();
299 void ComputeLabelVolumes(TOutputImage *outputImage,
std::vector<
unsigned > &volumes,
std::vector<
unsigned > &phyVolumes);
301 void MaskSegmentedImageByWeight(
float upperThresh);
308 unsigned int m_Labeled;
309 unsigned int m_LocallySaturated;
310 unsigned int m_Saturated;
312 double m_SeedStrength;
313 bool m_RunOneIteration;
314 bool m_SetStateImage;
315 bool m_SetDistancesImage;
316 bool m_SetMaxSaturationImage;
318 unsigned int m_MaxIterations;
319 unsigned int m_ObjectRadius;
333 #ifndef ITK_MANUAL_INSTANTIATION 334 #include "itkGrowCutSegmentationImageFilter.txx" ~GrowCutSegmentationImageFilter()
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE
void GenerateInputRequestedRegion() ITK_OVERRIDE
itkBooleanMacro(RunOneIteration)
const WeightImagePointer GetStrengthImage()
void SetStrengthImage(const WeightImageType *w)
DataObject::Pointer DataObjectPointer
void SetStateImage(const OutputImageType *l)
WeightImageType::Pointer WeightImagePointer
OutputIndexType GetROIEnd() const
void SetROIEnd(const OutputIndexType &end)
InputImageType::PixelType InputPixelType
GrowCutSegmentationImageFilter()
Simplified inverse ITK transforms.
const OutputImagePointer GetLabelImage()
NodeContainer::Pointer NodeContainerPointer
Image< TWeightPixelType, itkGetStaticConstMacro(InputImageDimension) > WeightImageType
const WeightImagePointer GetMaxSaturationImage()
InputImageType::IndexType InputIndexType
OutputImageType::RegionType OutputImageRegionType
const InputImagePointer GetInputImage()
OutputIndexType GetROIStart() const
itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension)
itkGetMacro(Labeled, unsigned int)
void SetLabelImage(const OutputImageType *f)
InputImageType::SizeType SizeType
InputImageType::SizeType OutputSizeType
void SetMaxSaturationImage(const WeightImageType *w)
SmartPointer< const Self > ConstPointer
void GrowCutSlowROI(TOutputImage *)
itkGetConstMacro(SeedStrength, double)
itkTypeMacro(GrowCutSegmentationImageFilter, ImageToImageFilter)
ImageToImageFilter< TInputImage, TOutputImage > Superclass
void AfterThreadedGenerateData() ITK_OVERRIDE
Index< itkGetStaticConstMacro(InputImageDimension)> IndexType
void SetInputImage(const InputImageType *in)
const OutputImagePointer GetStateImage()
InputImageType::ConstPointer InputImageConstPointer
TInputImage InputImageType
InputImageType::Pointer InputImagePointer
void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
TOutputImage OutputImageType
InputImageType::SizeType InputSizeType
OutputImageType::Pointer OutputImagePointer
const WeightImagePointer GetDistancesImage()
void GenerateData() ITK_OVERRIDE
VectorContainer< unsigned int, IndexType > NodeContainer
void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE
TWeightPixelType WeightPixelType
SmartPointer< Self > Pointer
const WeightImagePointer GetUpdatedStrengthImage()
void SetROIStart(const OutputIndexType &start)
OutputImageType::IndexType OutputIndexType
OutputImageType::PixelType OutputPixelType
GrowCutSegmentationImageFilter Self
void SetDistancesImage(const WeightImageType *d)
void Initialize(OutputImageType *output)
itkSetMacro(SeedStrength, double)