ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkMovingHistogramMorphologyImageFilter.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 __itkMovingHistogramMorphologyImageFilter_h
00019 #define __itkMovingHistogramMorphologyImageFilter_h
00020 
00021 #include "itkMorphologyHistogram.h"
00022 #include "itkMovingHistogramImageFilter.h"
00023 #include <list>
00024 #include <map>
00025 
00026 namespace itk
00027 {
00028 
00041 template< class TInputImage, class TOutputImage, class TKernel, class THistogram >
00042 class ITK_EXPORT MovingHistogramMorphologyImageFilter:
00043   public MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >
00044 {
00045 public:
00047   typedef MovingHistogramMorphologyImageFilter Self;
00048   typedef MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >
00049   Superclass;
00050   typedef SmartPointer< Self >       Pointer;
00051   typedef SmartPointer< const Self > ConstPointer;
00052 
00054   itkNewMacro(Self);
00055 
00057   itkTypeMacro(MovingHistogramMorphologyImageFilter,
00058                ImageToImageFilter);
00059 
00061   typedef TInputImage                                InputImageType;
00062   typedef TOutputImage                               OutputImageType;
00063   typedef typename TInputImage::RegionType           RegionType;
00064   typedef typename TInputImage::SizeType             SizeType;
00065   typedef typename TInputImage::IndexType            IndexType;
00066   typedef typename TInputImage::PixelType            PixelType;
00067   typedef typename TInputImage::OffsetType           OffsetType;
00068   typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00069   typedef typename TOutputImage::PixelType           OutputPixelType;
00070 
00072   itkStaticConstMacro(ImageDimension, unsigned int,
00073                       TInputImage::ImageDimension);
00074 
00076   typedef TKernel KernelType;
00077 
00079   typedef typename KernelType::ConstIterator KernelIteratorType;
00080 
00082   typedef typename KernelType::SizeType RadiusType;
00083 
00084   typedef typename std::list< OffsetType > OffsetListType;
00085 
00086   typedef typename std::map< OffsetType, OffsetListType, typename OffsetType::LexicographicCompare > OffsetMapType;
00087 
00089   itkSetMacro(Boundary, PixelType);
00090   itkGetConstMacro(Boundary, PixelType);
00092 
00095   static bool GetUseVectorBasedAlgorithm()
00096   { return THistogram::UseVectorBasedAlgorithm(); }
00097 protected:
00098   MovingHistogramMorphologyImageFilter();
00099   ~MovingHistogramMorphologyImageFilter() {}
00100   void PrintSelf(std::ostream & os, Indent indent) const;
00102 
00104 //   void  ThreadedGenerateData (const OutputImageRegionType&
00105 //                               outputRegionForThread,
00106 //                               ThreadIdType threadId);
00107 
00109   virtual void ConfigureHistogram(THistogram & histogram);
00110 
00111   PixelType m_Boundary;
00112 private:
00113   MovingHistogramMorphologyImageFilter(const Self &); //purposely not
00114                                                       // implemented
00115   void operator=(const Self &);                       //purposely not
00116                                                       // implemented
00117 };                                                    // end of class
00118 } // end namespace itk
00119 
00120 #ifndef ITK_MANUAL_INSTANTIATION
00121 #include "itkMovingHistogramMorphologyImageFilter.hxx"
00122 #endif
00123 
00124 #endif
00125