ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkShiftScaleImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkShiftScaleImageFilter_h
19 #define __itkShiftScaleImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkArray.h"
23 
24 namespace itk
25 {
38 template< class TInputImage, class TOutputImage >
39 class ITK_EXPORT ShiftScaleImageFilter:
40  public ImageToImageFilter< TInputImage, TOutputImage >
41 {
42 public:
48 
50  itkNewMacro(Self);
51 
53  typedef typename TInputImage::RegionType InputImageRegionType;
54  typedef typename TOutputImage::RegionType OutputImageRegionType;
55 
57  typedef typename TInputImage::Pointer InputImagePointer;
58  typedef typename TOutputImage::Pointer OutputImagePointer;
59 
61  typedef typename TInputImage::PixelType InputImagePixelType;
62  typedef typename TOutputImage::PixelType OutputImagePixelType;
63 
65  typedef typename TInputImage::IndexType InputImageIndexType;
66  typedef typename TInputImage::SizeType InputImageSizeType;
67  typedef typename TInputImage::OffsetType InputImageOffsetType;
68  typedef typename TOutputImage::IndexType OutputImageIndexType;
69  typedef typename TOutputImage::SizeType OutputImageSizeType;
70  typedef typename TOutputImage::OffsetType OutputImageOffsetType;
71 
74 
76  itkStaticConstMacro(ImageDimension, unsigned int,
77  TInputImage::ImageDimension);
78 
81 
84  itkSetMacro(Shift, RealType);
85  itkGetConstMacro(Shift, RealType);
87 
90  itkSetMacro(Scale, RealType);
91  itkGetConstMacro(Scale, RealType);
93 
95  itkGetConstMacro(UnderflowCount, long);
96  itkGetConstMacro(OverflowCount, long);
98 
99 #ifdef ITK_USE_CONCEPT_CHECKING
100 
101  itkConceptMacro( OutputHasNumericTraitsCheck,
103  itkConceptMacro( InputPlusRealTypeCheck,
105  itkConceptMacro( RealTypeMultiplyOperatorCheck,
107 
109 #endif
110 
111 protected:
114  void PrintSelf(std::ostream & os, Indent indent) const;
115 
117  void BeforeThreadedGenerateData();
118 
120  void AfterThreadedGenerateData();
121 
123  void ThreadedGenerateData(const OutputImageRegionType &
124  outputRegionForThread,
125  ThreadIdType threadId);
126 
127 private:
128  ShiftScaleImageFilter(const Self &); //purposely not implemented
129  void operator=(const Self &); //purposely not implemented
130 
133 
136 
139 
140  const TInputImage *m_InputImage;
141  TOutputImage *m_OutputImage;
142 };
143 } // end namespace itk
144 
145 #ifndef ITK_MANUAL_INSTANTIATION
146 #include "itkShiftScaleImageFilter.hxx"
147 #endif
148 
149 #endif
150