00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef __itkShiftScaleImageInPlaceFilter_h
00018
#define __itkShiftScaleImageInPlaceFilter_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
itkGetMacro(Shift,
RealType);
00091
00093
itkSetMacro(Scale,
RealType);
00094
itkGetMacro(Scale,
RealType);
00095
00097
itkGetMacro(UnderflowCount,
long);
00098
itkGetMacro(OverflowCount,
long);
00099
00100
protected:
00101 ShiftScaleInPlaceImageFilter();
00102 ~ShiftScaleInPlaceImageFilter();
00103
void PrintSelf(std::ostream& os,
Indent indent)
const;
00104
00106
void BeforeThreadedGenerateData ();
00107
00109
void AfterThreadedGenerateData ();
00110
00112
void ThreadedGenerateData (
const OutputImageRegionType&
00113 outputRegionForThread,
00114
int threadId) ;
00115
00116
private:
00117 ShiftScaleInPlaceImageFilter(
const Self&);
00118
void operator=(
const Self&);
00119
00120
RealType m_Shift;
00121
RealType m_Scale;
00122
00123
long m_UnderflowCount;
00124
long m_OverflowCount;
00125
Array<long> m_ThreadUnderflow;
00126
Array<long> m_ThreadOverflow;
00127 };
00128
00129
00130 }
00131
00132
#ifndef ITK_MANUAL_INSTANTIATION
00133
#include "itkShiftScaleInPlaceImageFilter.txx"
00134
#endif
00135
00136
#endif