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

itkShiftScaleInPlaceImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkShiftScaleInPlaceImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-25 12:28:09 $
00007   Version:   $Revision: 1.6 $
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 __itkShiftScaleInPlaceImageFilter_h
00018 #define __itkShiftScaleInPlaceImageFilter_h
00019 
00020 #include "itkInPlaceImageFilter.h"
00021 #include "itkArray.h"
00022 
00023 namespace itk
00024 {
00025 
00044 template <class TInputImage>
00045 class ITK_EXPORT ShiftScaleInPlaceImageFilter:
00046     public InPlaceImageFilter<TInputImage>
00047 {
00048 public:
00050   typedef ShiftScaleInPlaceImageFilter     Self;
00051   typedef InPlaceImageFilter<TInputImage>  Superclass;
00052   typedef SmartPointer<Self>               Pointer;
00053   typedef SmartPointer<const Self>         ConstPointer;
00054 
00056   itkNewMacro(Self);  
00057 
00059   typedef typename TInputImage::RegionType InputImageRegionType;
00060   typedef typename TInputImage::RegionType OutputImageRegionType;
00061 
00063   typedef typename TInputImage::Pointer InputImagePointer;
00064   typedef typename TInputImage::Pointer OutputImagePointer;
00065 
00067   typedef typename TInputImage::PixelType InputImagePixelType;
00068   typedef typename TInputImage::PixelType OutputImagePixelType;
00069 
00071   typedef typename TInputImage::IndexType  InputImageIndexType;
00072   typedef typename TInputImage::SizeType   InputImageSizeType;
00073   typedef typename TInputImage::OffsetType InputImageOffsetType;
00074   typedef typename TInputImage::IndexType  OutputImageIndexType;
00075   typedef typename TInputImage::SizeType   OutputImageSizeType;
00076   typedef typename TInputImage::OffsetType OutputImageOffsetType;
00077 
00079   typedef typename NumericTraits<OutputImagePixelType>::RealType RealType;
00080 
00082   itkStaticConstMacro(ImageDimension, unsigned int,
00083                       TInputImage::ImageDimension );
00084 
00086   itkTypeMacro(ShiftScaleInPlaceImageFilter, InPlaceImageFilter);
00087 
00089   itkSetMacro(Shift,RealType);
00090   itkGetConstMacro(Shift,RealType);
00092 
00094   itkSetMacro(Scale,RealType);
00095   itkGetConstMacro(Scale,RealType);
00097 
00099   itkGetConstMacro(UnderflowCount,long);
00100   itkGetConstMacro(OverflowCount,long);
00102 
00103 #ifdef ITK_USE_CONCEPT_CHECKING
00104 
00105   itkConceptMacro(InputHasNumericTraitsCheck,
00106                   (Concept::HasNumericTraits<InputImagePixelType>));
00107   itkConceptMacro(InputPlusRealTypeCheck,
00108                   (Concept::AdditiveOperators<InputImagePixelType, RealType, RealType>));
00109   itkConceptMacro(RealTypeMultiplyOperatorCheck,
00110                   (Concept::MultiplyOperator<RealType>));
00111 
00113 #endif
00114 
00115 protected:
00116   ShiftScaleInPlaceImageFilter();
00117   ~ShiftScaleInPlaceImageFilter();
00118   void PrintSelf(std::ostream& os, Indent indent) const;
00119 
00121   void BeforeThreadedGenerateData ();
00122 
00124   void AfterThreadedGenerateData ();
00125 
00127   void  ThreadedGenerateData (const OutputImageRegionType& 
00128                               outputRegionForThread,
00129                               int threadId);
00130 
00131 private:
00132   ShiftScaleInPlaceImageFilter(const Self&); //purposely not implemented
00133   void operator=(const Self&); //purposely not implemented
00134 
00135   RealType m_Shift;
00136   RealType m_Scale;
00137 
00138   long m_UnderflowCount;
00139   long m_OverflowCount;
00140 
00141   Array<long> m_ThreadUnderflow;
00142   Array<long> m_ThreadOverflow;
00143 };
00144 
00145   
00146 } // end namespace itk
00147   
00148 #ifndef ITK_MANUAL_INSTANTIATION
00149 #include "itkShiftScaleInPlaceImageFilter.txx"
00150 #endif
00151   
00152 #endif
00153 

Generated at Tue Sep 15 04:56:51 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000