ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkGrayscaleFillholeImageFilter.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 __itkGrayscaleFillholeImageFilter_h
00019 #define __itkGrayscaleFillholeImageFilter_h
00020 
00021 #include "itkImageToImageFilter.h"
00022 
00023 namespace itk
00024 {
00055 template< class TInputImage, class TOutputImage >
00056 class ITK_EXPORT GrayscaleFillholeImageFilter:
00057   public ImageToImageFilter< TInputImage, TOutputImage >
00058 {
00059 public:
00061   typedef GrayscaleFillholeImageFilter                    Self;
00062   typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00063   typedef SmartPointer< Self >                            Pointer;
00064   typedef SmartPointer< const Self >                      ConstPointer;
00065 
00067   typedef TInputImage                            InputImageType;
00068   typedef typename InputImageType::Pointer       InputImagePointer;
00069   typedef typename InputImageType::ConstPointer  InputImageConstPointer;
00070   typedef typename InputImageType::RegionType    InputImageRegionType;
00071   typedef typename InputImageType::PixelType     InputImagePixelType;
00072   typedef TOutputImage                           OutputImageType;
00073   typedef typename OutputImageType::Pointer      OutputImagePointer;
00074   typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
00075   typedef typename OutputImageType::RegionType   OutputImageRegionType;
00076   typedef typename OutputImageType::PixelType    OutputImagePixelType;
00077 
00079   itkStaticConstMacro(InputImageDimension, unsigned int,
00080                       TInputImage::ImageDimension);
00081   itkStaticConstMacro(OutputImageDimension, unsigned int,
00082                       TOutputImage::ImageDimension);
00084 
00086   itkNewMacro(Self);
00087 
00089   itkTypeMacro(GrayscaleFillholeImageFilter,
00090                ImageToImageFilter);
00091 
00098   itkSetMacro(FullyConnected, bool);
00099   itkGetConstReferenceMacro(FullyConnected, bool);
00100   itkBooleanMacro(FullyConnected);
00102 
00103 #ifdef ITK_USE_CONCEPT_CHECKING
00104 
00105   itkConceptMacro( InputOStreamWritableCheck,
00106                    ( Concept::OStreamWritable< InputImagePixelType > ) );
00107 
00109 #endif
00110 protected:
00111   GrayscaleFillholeImageFilter();
00112   ~GrayscaleFillholeImageFilter() {}
00113   void PrintSelf(std::ostream & os, Indent indent) const;
00115 
00119   void GenerateInputRequestedRegion();
00120 
00122   void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) );
00123 
00126   void GenerateData();
00127 
00128 private:
00129   GrayscaleFillholeImageFilter(const Self &); //purposely not implemented
00130   void operator=(const Self &);               //purposely not implemented
00131 
00132   unsigned long m_NumberOfIterationsUsed;
00133 
00134   bool m_FullyConnected;
00135 }; // end of class
00136 } // end namespace itk
00137 
00138 #ifndef ITK_MANUAL_INSTANTIATION
00139 #include "itkGrayscaleFillholeImageFilter.hxx"
00140 #endif
00141 
00142 #endif
00143