ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkBinaryMorphologicalOpeningImageFilter.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 __itkBinaryMorphologicalOpeningImageFilter_h
00019 #define __itkBinaryMorphologicalOpeningImageFilter_h
00020 
00021 #include "itkKernelImageFilter.h"
00022 
00023 namespace itk
00024 {
00054 template< class TInputImage, class TOutputImage, class TKernel >
00055 class ITK_EXPORT BinaryMorphologicalOpeningImageFilter:
00056   public KernelImageFilter< TInputImage, TOutputImage, TKernel >
00057 {
00058 public:
00060   typedef BinaryMorphologicalOpeningImageFilter                   Self;
00061   typedef KernelImageFilter< TInputImage, TOutputImage, TKernel > Superclass;
00062   typedef SmartPointer< Self >                                    Pointer;
00063   typedef SmartPointer< const Self >                              ConstPointer;
00064 
00066   itkNewMacro(Self);
00067 
00069   itkTypeMacro(BinaryMorphologicalOpeningImageFilter,
00070                KernelImageFilter);
00071 
00072   typedef TInputImage                          InputImageType;
00073   typedef TOutputImage                         OutputImageType;
00074   typedef typename InputImageType::Pointer     InputImagePointer;
00075   typedef typename OutputImageType::RegionType OutputImageRegionType;
00076 
00078   typedef typename TInputImage::PixelType PixelType;
00079 
00081   typedef TKernel KernelType;
00082 
00085   itkSetMacro(ForegroundValue, PixelType);
00086 
00089   itkGetConstMacro(ForegroundValue, PixelType);
00090 
00092   itkSetMacro(BackgroundValue, PixelType);
00093 
00095   itkGetConstMacro(BackgroundValue, PixelType);
00096 protected:
00097   BinaryMorphologicalOpeningImageFilter();
00098   ~BinaryMorphologicalOpeningImageFilter() {}
00099   void PrintSelf(std::ostream & os, Indent indent) const;
00101 
00104   void  GenerateData();
00105 
00106 private:
00107   BinaryMorphologicalOpeningImageFilter(const Self &); //purposely not
00108                                                        // implemented
00109   void operator=(const Self &);                        //purposely not
00110                                                        // implemented
00111 
00112   PixelType m_ForegroundValue;
00113 
00114   PixelType m_BackgroundValue;
00115 }; // end of class
00116 } // end namespace itk
00117 
00118 #ifndef ITK_MANUAL_INSTANTIATION
00119 #include "itkBinaryMorphologicalOpeningImageFilter.hxx"
00120 #endif
00121 
00122 #endif
00123