ITK  4.8.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< typename TInputImage, typename TOutputImage >
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  // Begin concept checking
101  itkConceptMacro( OutputHasNumericTraitsCheck,
103  itkConceptMacro( InputPlusRealTypeCheck,
105  itkConceptMacro( RealTypeMultiplyOperatorCheck,
107  // End concept checking
108 #endif
109 
110 protected:
113  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
114 
116  void BeforeThreadedGenerateData() ITK_OVERRIDE;
117 
119  void AfterThreadedGenerateData() ITK_OVERRIDE;
120 
123  outputRegionForThread,
124  ThreadIdType threadId) ITK_OVERRIDE;
125 
126 private:
127  ShiftScaleImageFilter(const Self &); //purposely not implemented
128  void operator=(const Self &); //purposely not implemented
129 
132 
135 
138 
139  const TInputImage *m_InputImage;
140  TOutputImage *m_OutputImage;
141 };
142 } // end namespace itk
143 
144 #ifndef ITK_MANUAL_INSTANTIATION
145 #include "itkShiftScaleImageFilter.hxx"
146 #endif
147 
148 #endif
Array class with size defined at construction time.
Definition: itkArray.h:50
void PrintSelf(std::ostream &os, Indent indent) const override
TInputImage::RegionType InputImageRegionType
void AfterThreadedGenerateData() override
TInputImage::PixelType InputImagePixelType
TInputImage::Pointer InputImagePointer
Shift and scale the pixels in an image.
TInputImage::OffsetType InputImageOffsetType
TOutputImage::IndexType OutputImageIndexType
TOutputImage::PixelType OutputImagePixelType
TInputImage::SizeType InputImageSizeType
Base class for all process objects that output image data.
static const unsigned int ImageDimension
void BeforeThreadedGenerateData() override
SmartPointer< const Self > ConstPointer
TOutputImage::RegionType OutputImageRegionType
TOutputImage::SizeType OutputImageSizeType
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
TOutputImage::OffsetType OutputImageOffsetType
ImageToImageFilter< TInputImage, TOutputImage > Superclass
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
TInputImage::IndexType InputImageIndexType
NumericTraits< OutputImagePixelType >::RealType RealType
Base class for filters that take an image as input and produce an image as output.
OutputImageType::RegionType OutputImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Define additional traits for native types such as int or float.
TOutputImage::Pointer OutputImagePointer
#define itkConceptMacro(name, concept)