Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkShiftScaleImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkShiftScaleImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/11 19:39:02 $
00007   Version:   $Revision: 1.3 $
00008 
00009   Copyright (c) 2002 Insight Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkShiftScaleImageFilter_h
00018 #define __itkShiftScaleImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkArray.h"
00022 
00023 namespace itk
00024 {
00025 
00037 template <class TInputImage, class TOutputImage>
00038 class ITK_EXPORT ShiftScaleImageFilter:
00039     public ImageToImageFilter<TInputImage,TOutputImage>
00040 {
00041 public:
00043   typedef ShiftScaleImageFilter         Self;
00044   typedef ImageToImageFilter<TInputImage,TOutputImage>  Superclass;
00045   typedef SmartPointer<Self>  Pointer;
00046   typedef SmartPointer<const Self>  ConstPointer;
00047 
00049   itkNewMacro(Self);  
00050 
00052   typedef typename TInputImage::RegionType InputImageRegionType;
00053   typedef typename TOutputImage::RegionType OutputImageRegionType;
00054 
00056   typedef typename TInputImage::Pointer InputImagePointer;
00057   typedef typename TOutputImage::Pointer OutputImagePointer;
00058 
00060   typedef typename TInputImage::PixelType InputImagePixelType;
00061   typedef typename TOutputImage::PixelType OutputImagePixelType;
00062 
00064   typedef typename TInputImage::IndexType InputImageIndexType;
00065   typedef typename TInputImage::SizeType InputImageSizeType;
00066   typedef typename TInputImage::OffsetType InputImageOffsetType;
00067   typedef typename TOutputImage::IndexType OutputImageIndexType;
00068   typedef typename TOutputImage::SizeType OutputImageSizeType;
00069   typedef typename TOutputImage::OffsetType OutputImageOffsetType;
00070 
00072   typedef typename NumericTraits<OutputImagePixelType>::RealType RealType;
00073       
00075   itkStaticConstMacro(ImageDimension, unsigned int,
00076                       TInputImage::ImageDimension ) ;
00077 
00079   itkTypeMacro(ShiftScaleImageFilter, ImageToImageFilter);
00080 
00082   itkSetMacro(Shift,RealType);
00083   itkGetMacro(Shift,RealType);
00084 
00086   itkSetMacro(Scale,RealType);
00087   itkGetMacro(Scale,RealType);
00088 
00090   itkGetMacro(UnderflowCount,long);
00091   itkGetMacro(OverflowCount,long);
00092 
00094   void BeforeThreadedGenerateData ();
00095   
00097   void AfterThreadedGenerateData ();
00098   
00100   void  ThreadedGenerateData (const OutputImageRegionType& 
00101                               outputRegionForThread,
00102                               int threadId) ;
00103 
00104  protected:
00105   ShiftScaleImageFilter();
00106   ~ShiftScaleImageFilter();
00107   void PrintSelf(std::ostream& os, Indent indent) const;
00108 
00109 private:
00110   ShiftScaleImageFilter(const Self&); //purposely not implemented
00111   void operator=(const Self&); //purposely not implemented
00112 
00113   RealType m_Shift;
00114   RealType m_Scale;
00115 
00116   long m_UnderflowCount;
00117   long m_OverflowCount;
00118   Array<long> m_ThreadUnderflow;
00119   Array<long> m_ThreadOverflow;
00120 };
00121 
00122   
00123 } // end namespace itk
00124   
00125 #ifndef ITK_MANUAL_INSTANTIATION
00126 #include "itkShiftScaleImageFilter.txx"
00127 #endif
00128   
00129 #endif

Generated at Fri May 21 01:15:18 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000