ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkBinaryFillholeImageFilter.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 __itkBinaryFillholeImageFilter_h
00019 #define __itkBinaryFillholeImageFilter_h
00020 
00021 #include "itkImageToImageFilter.h"
00022 
00023 namespace itk {
00024 
00044 template<class TInputImage>
00045 class ITK_EXPORT BinaryFillholeImageFilter :
00046     public ImageToImageFilter<TInputImage, TInputImage>
00047 {
00048 public:
00050   typedef BinaryFillholeImageFilter                    Self;
00051   typedef ImageToImageFilter<TInputImage, TInputImage> Superclass;
00052   typedef SmartPointer<Self>                           Pointer;
00053   typedef SmartPointer<const Self>                     ConstPointer;
00054 
00056   typedef TInputImage                              InputImageType;
00057   typedef TInputImage                              OutputImageType;
00058   typedef typename InputImageType::Pointer         InputImagePointer;
00059   typedef typename InputImageType::ConstPointer    InputImageConstPointer;
00060   typedef typename InputImageType::RegionType      InputImageRegionType;
00061   typedef typename InputImageType::PixelType       InputImagePixelType;
00062   typedef typename OutputImageType::Pointer        OutputImagePointer;
00063   typedef typename OutputImageType::ConstPointer   OutputImageConstPointer;
00064   typedef typename OutputImageType::RegionType     OutputImageRegionType;
00065   typedef typename OutputImageType::PixelType      OutputImagePixelType;
00066 
00068   itkStaticConstMacro(InputImageDimension, unsigned int,
00069                       TInputImage::ImageDimension);
00070   itkStaticConstMacro(OutputImageDimension, unsigned int,
00071                       OutputImageType::ImageDimension);
00073 
00075   itkNewMacro(Self);
00076 
00078   itkTypeMacro(BinaryFillholeImageFilter,
00079                ImageToImageFilter);
00080 
00087   itkSetMacro(FullyConnected, bool);
00088   itkGetConstReferenceMacro(FullyConnected, bool);
00089   itkBooleanMacro(FullyConnected);
00091 
00092 #ifdef ITK_USE_CONCEPT_CHECKING
00093 
00094   itkConceptMacro(InputOStreamWritableCheck,
00095                   (Concept::OStreamWritable<InputImagePixelType>));
00096 
00098 #endif
00099 
00102   itkSetMacro(ForegroundValue, InputImagePixelType);
00103 
00106   itkGetMacro(ForegroundValue, InputImagePixelType);
00107 
00108 
00109 protected:
00110   BinaryFillholeImageFilter();
00111   ~BinaryFillholeImageFilter() {};
00112   void PrintSelf(std::ostream& os, Indent indent) const;
00113 
00117   void GenerateInputRequestedRegion();
00118 
00120   void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00121 
00124   void GenerateData();
00125 
00126 
00127 private:
00128   BinaryFillholeImageFilter(const Self&); //purposely not implemented
00129   void operator=(const Self&); //purposely not implemented
00130 
00131   InputImagePixelType m_ForegroundValue;
00132 
00133   bool                m_FullyConnected;
00134 
00135 }; // end of class
00136 
00137 } // end namespace itk
00138 
00139 #ifndef ITK_MANUAL_INSTANTIATION
00140 #include "itkBinaryFillholeImageFilter.hxx"
00141 #endif
00142 
00143 #endif
00144