00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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&);
00111 void operator=(const Self&);
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 }
00124
00125 #ifndef ITK_MANUAL_INSTANTIATION
00126 #include "itkShiftScaleImageFilter.txx"
00127 #endif
00128
00129 #endif