Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkMorphologicalWatershedFromMarkersImageFilter_h
00018 #define __itkMorphologicalWatershedFromMarkersImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021
00022 namespace itk {
00023
00071 template<class TInputImage, class TLabelImage>
00072 class ITK_EXPORT MorphologicalWatershedFromMarkersImageFilter :
00073 public ImageToImageFilter<TInputImage, TLabelImage>
00074 {
00075 public:
00077 typedef MorphologicalWatershedFromMarkersImageFilter Self;
00078 typedef ImageToImageFilter<TInputImage, TLabelImage> Superclass;
00079 typedef SmartPointer<Self> Pointer;
00080 typedef SmartPointer<const Self> ConstPointer;
00081
00083 typedef TInputImage InputImageType;
00084 typedef TLabelImage LabelImageType;
00085 typedef typename InputImageType::Pointer InputImagePointer;
00086 typedef typename InputImageType::ConstPointer InputImageConstPointer;
00087 typedef typename InputImageType::RegionType InputImageRegionType;
00088 typedef typename InputImageType::PixelType InputImagePixelType;
00089 typedef typename LabelImageType::Pointer LabelImagePointer;
00090 typedef typename LabelImageType::ConstPointer LabelImageConstPointer;
00091 typedef typename LabelImageType::RegionType LabelImageRegionType;
00092 typedef typename LabelImageType::PixelType LabelImagePixelType;
00093
00094 typedef typename LabelImageType::IndexType IndexType;
00095
00097 itkStaticConstMacro(ImageDimension, unsigned int,
00098 TInputImage::ImageDimension);
00099
00101 itkNewMacro(Self);
00102
00104 itkTypeMacro(MorphologicalWatershedFromMarkersImageFilter,
00105 ImageToImageFilter);
00106
00107
00109 void SetMarkerImage(const TLabelImage *input)
00110 {
00111
00112 this->SetNthInput( 1, const_cast<TLabelImage *>(input) );
00113 }
00114
00116 const LabelImageType * GetMarkerImage() const
00117 {
00118 return static_cast<LabelImageType*>(
00119 const_cast<DataObject *>(this->ProcessObject::GetInput(1)));
00120 }
00121
00123 void SetInput1(const TInputImage *input)
00124 {
00125 this->SetInput( input );
00126 }
00127
00129 void SetInput2(const TLabelImage *input)
00130 {
00131 this->SetMarkerImage( input );
00132 }
00133
00140 itkSetMacro(FullyConnected, bool);
00141 itkGetConstReferenceMacro(FullyConnected, bool);
00142 itkBooleanMacro(FullyConnected);
00144
00150 itkSetMacro(MarkWatershedLine, bool);
00151 itkGetConstReferenceMacro(MarkWatershedLine, bool);
00152 itkBooleanMacro(MarkWatershedLine);
00154
00155 protected:
00156 MorphologicalWatershedFromMarkersImageFilter();
00157 ~MorphologicalWatershedFromMarkersImageFilter() {};
00158 void PrintSelf(std::ostream& os, Indent indent) const;
00159
00163 void GenerateInputRequestedRegion();
00164
00168 void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00169
00171 void GenerateData();
00172
00173 private:
00174
00175 MorphologicalWatershedFromMarkersImageFilter(const Self&);
00176 void operator=(const Self&);
00177
00178 bool m_FullyConnected;
00179
00180 bool m_MarkWatershedLine;
00181
00182 };
00183
00184 }
00185
00186 #ifndef ITK_MANUAL_INSTANTIATION
00187 #include "itkMorphologicalWatershedFromMarkersImageFilter.txx"
00188 #endif
00189
00190 #endif
00191