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: 2009-04-25 12:28:09 $
00007   Version:   $Revision: 1.9 $
00008 
00009   Copyright (c) Insight Software 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   itkGetConstMacro(Shift,RealType);
00085 
00087   itkSetMacro(Scale,RealType);
00088   itkGetConstMacro(Scale,RealType);
00090 
00092   itkGetConstMacro(UnderflowCount,long);
00093   itkGetConstMacro(OverflowCount,long);
00095 
00096 #ifdef ITK_USE_CONCEPT_CHECKING
00097 
00098   itkConceptMacro(OutputHasNumericTraitsCheck,
00099                   (Concept::HasNumericTraits<OutputImagePixelType>));
00100   itkConceptMacro(InputPlusRealTypeCheck,
00101                   (Concept::AdditiveOperators<InputImagePixelType, RealType, RealType>));
00102   itkConceptMacro(RealTypeMultiplyOperatorCheck,
00103                   (Concept::MultiplyOperator<RealType>));
00104 
00106 #endif
00107 
00108 protected:
00109   ShiftScaleImageFilter();
00110   ~ShiftScaleImageFilter();
00111   void PrintSelf(std::ostream& os, Indent indent) const;
00112 
00114   void BeforeThreadedGenerateData ();
00115 
00117   void AfterThreadedGenerateData ();
00118 
00120   void  ThreadedGenerateData (const OutputImageRegionType& 
00121                               outputRegionForThread,
00122                               int threadId);
00123 private:
00124   ShiftScaleImageFilter(const Self&); //purposely not implemented
00125   void operator=(const Self&); //purposely not implemented
00127 
00128   RealType m_Shift;
00129   RealType m_Scale;
00130 
00131   long m_UnderflowCount;
00132   long m_OverflowCount;
00133 
00134   Array<long> m_ThreadUnderflow;
00135   Array<long> m_ThreadOverflow;
00136 };
00137 
00138   
00139 } // end namespace itk
00140   
00141 #ifndef ITK_MANUAL_INSTANTIATION
00142 #include "itkShiftScaleImageFilter.txx"
00143 #endif
00144   
00145 #endif
00146 

Generated at Mon Jul 12 2010 19:52:37 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000