ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkMorphologicalWatershedImageFilter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkMorphologicalWatershedImageFilter_h
00019 #define __itkMorphologicalWatershedImageFilter_h
00020 
00021 #include "itkImageToImageFilter.h"
00022 
00023 namespace itk
00024 {
00053 template< class TInputImage, class TOutputImage >
00054 class ITK_EXPORT MorphologicalWatershedImageFilter:
00055   public ImageToImageFilter< TInputImage, TOutputImage >
00056 {
00057 public:
00059   typedef MorphologicalWatershedImageFilter               Self;
00060   typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00061   typedef SmartPointer< Self >                            Pointer;
00062   typedef SmartPointer< const Self >                      ConstPointer;
00063 
00065   typedef TInputImage                            InputImageType;
00066   typedef TOutputImage                           OutputImageType;
00067   typedef typename InputImageType::Pointer       InputImagePointer;
00068   typedef typename InputImageType::ConstPointer  InputImageConstPointer;
00069   typedef typename InputImageType::RegionType    InputImageRegionType;
00070   typedef typename InputImageType::PixelType     InputImagePixelType;
00071   typedef typename OutputImageType::Pointer      OutputImagePointer;
00072   typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
00073   typedef typename OutputImageType::RegionType   OutputImageRegionType;
00074   typedef typename OutputImageType::PixelType    OutputImagePixelType;
00075 
00077   itkStaticConstMacro(InputImageDimension, unsigned int,
00078                       TInputImage::ImageDimension);
00079   itkStaticConstMacro(OutputImageDimension, unsigned int,
00080                       TOutputImage::ImageDimension);
00082 
00084   itkNewMacro(Self);
00085 
00087   itkTypeMacro(MorphologicalWatershedImageFilter,
00088                ImageToImageFilter);
00089 
00096   itkSetMacro(FullyConnected, bool);
00097   itkGetConstReferenceMacro(FullyConnected, bool);
00098   itkBooleanMacro(FullyConnected);
00100 
00106   itkSetMacro(MarkWatershedLine, bool);
00107   itkGetConstReferenceMacro(MarkWatershedLine, bool);
00108   itkBooleanMacro(MarkWatershedLine);
00110 
00113   itkSetMacro(Level, InputImagePixelType);
00114   itkGetConstMacro(Level, InputImagePixelType);
00115 protected:
00116   MorphologicalWatershedImageFilter();
00117   ~MorphologicalWatershedImageFilter() {}
00118   void PrintSelf(std::ostream & os, Indent indent) const;
00120 
00124   void GenerateInputRequestedRegion();
00125 
00127   void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) );
00128 
00131   void GenerateData();
00132 
00133 private:
00134   MorphologicalWatershedImageFilter(const Self &); //purposely not implemented
00135   void operator=(const Self &);                    //purposely not implemented
00136 
00137   bool m_FullyConnected;
00138 
00139   bool m_MarkWatershedLine;
00140 
00141   InputImagePixelType m_Level;
00142 }; // end of class
00143 } // end namespace itk
00144 
00145 #ifndef ITK_MANUAL_INSTANTIATION
00146 #include "itkMorphologicalWatershedImageFilter.hxx"
00147 #endif
00148 
00149 #endif
00150