itkShiftScaleInPlaceImageFilter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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&);
00133 void operator=(const Self&);
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 }
00147
00148 #ifndef ITK_MANUAL_INSTANTIATION
00149 #include "itkShiftScaleInPlaceImageFilter.txx"
00150 #endif
00151
00152 #endif
00153