ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkNonThreadedShrinkImageFilter.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 __itkNonThreadedShrinkImageFilter_h
00019 #define __itkNonThreadedShrinkImageFilter_h
00020 
00021 #include "itkShrinkImageFilter.h"
00022 
00023 namespace itk
00024 {
00046 template< class TInputImage, class TOutputImage >
00047 class ITK_EXPORT NonThreadedShrinkImageFilter:
00048   public ShrinkImageFilter< TInputImage, TOutputImage >
00049 {
00050 public:
00052   typedef NonThreadedShrinkImageFilter                    Self;
00053   typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00054   typedef SmartPointer< Self >                            Pointer;
00055   typedef SmartPointer< const Self >                      ConstPointer;
00056 
00058   itkNewMacro(Self);
00059 
00061   itkTypeMacro(NonThreadedShrinkImageFilter, ShrinkImageFilter);
00062 
00063   virtual void SetNumberOfThreads(ThreadIdType)
00064   {
00065     Superclass::SetNumberOfThreads(1);
00066   }
00067 
00068 protected:
00069   NonThreadedShrinkImageFilter()
00070   {
00071     Superclass::SetNumberOfThreads(1);
00072   }
00073 
00074 private:
00075   NonThreadedShrinkImageFilter(const Self &); //purposely not implemented
00076   void operator=(const Self &);               //purposely not implemented
00077 };
00078 } // end namespace itk
00079 
00080 #endif
00081