ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkHMaximaImageFilter.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 __itkHMaximaImageFilter_h
00019 #define __itkHMaximaImageFilter_h
00020 
00021 #include "itkImageToImageFilter.h"
00022 
00023 namespace itk
00024 {
00056 template< class TInputImage, class TOutputImage >
00057 class ITK_EXPORT HMaximaImageFilter:
00058   public ImageToImageFilter< TInputImage, TOutputImage >
00059 {
00060 public:
00062   typedef HMaximaImageFilter                              Self;
00063   typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00064   typedef SmartPointer< Self >                            Pointer;
00065   typedef SmartPointer< const Self >                      ConstPointer;
00066 
00068   typedef TInputImage                            InputImageType;
00069   typedef typename InputImageType::Pointer       InputImagePointer;
00070   typedef typename InputImageType::ConstPointer  InputImageConstPointer;
00071   typedef typename InputImageType::RegionType    InputImageRegionType;
00072   typedef typename InputImageType::PixelType     InputImagePixelType;
00073   typedef TOutputImage                           OutputImageType;
00074   typedef typename OutputImageType::Pointer      OutputImagePointer;
00075   typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
00076   typedef typename OutputImageType::RegionType   OutputImageRegionType;
00077   typedef typename OutputImageType::PixelType    OutputImagePixelType;
00078 
00080   itkStaticConstMacro(InputImageDimension, unsigned int,
00081                       TInputImage::ImageDimension);
00082   itkStaticConstMacro(OutputImageDimension, unsigned int,
00083                       TOutputImage::ImageDimension);
00085 
00087   itkNewMacro(Self);
00088 
00090   itkTypeMacro(HMaximaImageFilter,
00091                ImageToImageFilter);
00092 
00097   itkSetMacro(Height, InputImagePixelType);
00098   itkGetConstMacro(Height, InputImagePixelType);
00100 
00107   itkSetMacro(FullyConnected, bool);
00108   itkGetConstReferenceMacro(FullyConnected, bool);
00109   itkBooleanMacro(FullyConnected);
00111 
00112 #ifdef ITK_USE_CONCEPT_CHECKING
00113 
00114   itkConceptMacro( InputEqualityComparableCheck,
00115                    ( Concept::EqualityComparable< InputImagePixelType > ) );
00116   itkConceptMacro( IntConvertibleToInputCheck,
00117                    ( Concept::Convertible< int, InputImagePixelType > ) );
00118   itkConceptMacro( InputOStreamWritableCheck,
00119                    ( Concept::OStreamWritable< InputImagePixelType > ) );
00120 
00122 #endif
00123 protected:
00124   HMaximaImageFilter();
00125   ~HMaximaImageFilter() {}
00126   void PrintSelf(std::ostream & os, Indent indent) const;
00128 
00132   void GenerateInputRequestedRegion();
00133 
00135   void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) );
00136 
00138   void GenerateData();
00139 
00140 private:
00141   HMaximaImageFilter(const Self &); //purposely not implemented
00142   void operator=(const Self &);     //purposely not implemented
00143 
00144   InputImagePixelType m_Height;
00145   unsigned long       m_NumberOfIterationsUsed;
00146   bool                m_FullyConnected;
00147 }; // end of class
00148 } // end namespace itk
00149 
00150 #ifndef ITK_MANUAL_INSTANTIATION
00151 #include "itkHMaximaImageFilter.hxx"
00152 #endif
00153 
00154 #endif
00155