ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkClosingByReconstructionImageFilter.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 __itkClosingByReconstructionImageFilter_h
00019 #define __itkClosingByReconstructionImageFilter_h
00020 
00021 #include "itkImageToImageFilter.h"
00022 
00023 namespace itk
00024 {
00051 template< class TInputImage, class TOutputImage, class TKernel >
00052 class ITK_EXPORT ClosingByReconstructionImageFilter:
00053   public ImageToImageFilter< TInputImage, TOutputImage >
00054 {
00055 public:
00057   typedef ClosingByReconstructionImageFilter              Self;
00058   typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00059   typedef SmartPointer< Self >                            Pointer;
00060   typedef SmartPointer< const Self >                      ConstPointer;
00061 
00063   typedef TInputImage                           InputImageType;
00064   typedef typename InputImageType::Pointer      InputImagePointer;
00065   typedef typename InputImageType::ConstPointer InputImageConstPointer;
00066   typedef typename InputImageType::RegionType   InputImageRegionType;
00067   typedef typename InputImageType::PixelType    InputImagePixelType;
00068 
00069   typedef TOutputImage                           OutputImageType;
00070   typedef typename OutputImageType::Pointer      OutputImagePointer;
00071   typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
00072   typedef typename OutputImageType::RegionType   OutputImageRegionType;
00073   typedef typename OutputImageType::PixelType    OutputImagePixelType;
00074 
00076   typedef TKernel KernelType;
00077 
00079   itkStaticConstMacro(InputImageDimension, unsigned int,
00080                       TInputImage::ImageDimension);
00081   itkStaticConstMacro(OutputImageDimension, unsigned int,
00082                       TOutputImage::ImageDimension);
00084 
00086   itkNewMacro(Self);
00087 
00089   itkTypeMacro(ClosingByReconstructionImageFilter,
00090                ImageToImageFilter);
00091 
00093   itkSetMacro(Kernel, KernelType);
00094 
00096   itkGetConstReferenceMacro(Kernel, KernelType);
00097 
00104   itkSetMacro(FullyConnected, bool);
00105   itkGetConstReferenceMacro(FullyConnected, bool);
00106   itkBooleanMacro(FullyConnected);
00108 
00113   itkSetMacro(PreserveIntensities, bool);
00114   itkGetConstReferenceMacro(PreserveIntensities, bool);
00115   itkBooleanMacro(PreserveIntensities);
00117 
00118 #ifdef ITK_USE_CONCEPT_CHECKING
00119 
00120   itkConceptMacro( InputConvertibleToOutputCheck,
00121                    ( Concept::Convertible< InputImagePixelType, OutputImagePixelType > ) );
00122 
00124 #endif
00125 protected:
00126   ClosingByReconstructionImageFilter();
00127   ~ClosingByReconstructionImageFilter() {}
00128   void PrintSelf(std::ostream & os, Indent indent) const;
00130 
00134   void GenerateInputRequestedRegion();
00135 
00137   void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) );
00138 
00139   void GenerateData();
00140 
00141 private:
00142   ClosingByReconstructionImageFilter(const Self &); //purposely not implemented
00143   void operator=(const Self &);                     //purposely not implemented
00144 
00146   KernelType m_Kernel;
00147   bool       m_FullyConnected;
00148   bool       m_PreserveIntensities;
00149 }; // end of class
00150 } // end namespace itk
00151 
00152 #ifndef ITK_MANUAL_INSTANTIATION
00153 #include "itkClosingByReconstructionImageFilter.hxx"
00154 #endif
00155 
00156 #endif
00157