ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkMiniPipelineSeparableImageFilter.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 __itkMiniPipelineSeparableImageFilter_h
00019 #define __itkMiniPipelineSeparableImageFilter_h
00020 
00021 #include "itkBoxImageFilter.h"
00022 
00023 namespace itk
00024 {
00049 template< class TInputImage, class TOutputImage, class TFilter >
00050 class ITK_EXPORT MiniPipelineSeparableImageFilter:
00051   public BoxImageFilter< TInputImage, TOutputImage >
00052 {
00053 public:
00055   typedef MiniPipelineSeparableImageFilter            Self;
00056   typedef BoxImageFilter< TInputImage, TOutputImage > Superclass;
00057   typedef SmartPointer< Self >                        Pointer;
00058   typedef SmartPointer< const Self >                  ConstPointer;
00059 
00061   itkNewMacro(Self);
00062 
00064   itkTypeMacro(MiniPipelineSeparableImageFilter,
00065                BoxImageFilter);
00066 
00068   typedef TInputImage                      InputImageType;
00069   typedef typename TInputImage::RegionType RegionType;
00070   typedef typename TInputImage::SizeType   SizeType;
00071   typedef typename TInputImage::IndexType  IndexType;
00072   typedef typename TInputImage::PixelType  PixelType;
00073   typedef typename TInputImage::OffsetType OffsetType;
00074 
00075   typedef TOutputImage                     OutputImageType;
00076   typedef typename TOutputImage::PixelType OutputPixelType;
00077 
00078   typedef TFilter                                            FilterType;
00079   typedef CastImageFilter< InputImageType, OutputImageType > CastType;
00080 
00082   itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension);
00083 
00085   typedef typename TInputImage::SizeType RadiusType;
00086 
00087   virtual void SetRadius(const RadiusType &);
00088 
00089   virtual void SetRadius(const SizeValueType & radius)
00090   {
00091     // needed because of the overloading of the method
00092     Superclass::SetRadius(radius);
00093   }
00094 
00095   virtual void Modified() const;
00096 
00097   virtual void SetNumberOfThreads(ThreadIdType nb);
00098 
00099 protected:
00100   MiniPipelineSeparableImageFilter();
00101   ~MiniPipelineSeparableImageFilter() {}
00102 
00103   void GenerateData();
00104 
00105   typename FilterType::Pointer m_Filters[ImageDimension];
00106   typename CastType::Pointer m_Cast;
00107 private:
00108   MiniPipelineSeparableImageFilter(const Self &); //purposely not implemented
00109   void operator=(const Self &);                   //purposely not implemented
00110 };
00111 }
00112 
00113 #ifndef ITK_MANUAL_INSTANTIATION
00114 #include "itkMiniPipelineSeparableImageFilter.hxx"
00115 #endif
00116 
00117 #endif
00118