ITK  5.4.0
Insight Toolkit
itkShiftScaleImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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
22#include "itkArray.h"
23#include <mutex>
24
25namespace itk
26{
39template <typename TInputImage, typename TOutputImage>
40class ITK_TEMPLATE_EXPORT ShiftScaleImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
41{
42public:
43 ITK_DISALLOW_COPY_AND_MOVE(ShiftScaleImageFilter);
44
50
52 itkNewMacro(Self);
53
57
61
63 using InputImagePixelType = typename TInputImage::PixelType;
64 using OutputImagePixelType = typename TOutputImage::PixelType;
65
69 using InputImageOffsetType = typename TInputImage::OffsetType;
72 using OutputImageOffsetType = typename TOutputImage::OffsetType;
73
76
78 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
79
81 itkOverrideGetNameOfClassMacro(ShiftScaleImageFilter);
82
85 itkSetMacro(Shift, RealType);
86 itkGetConstMacro(Shift, RealType);
91 itkSetMacro(Scale, RealType);
92 itkGetConstMacro(Scale, RealType);
96 itkGetConstMacro(UnderflowCount, SizeValueType);
97 itkGetConstMacro(OverflowCount, SizeValueType);
100#ifdef ITK_USE_CONCEPT_CHECKING
101 // Begin concept checking
104 itkConceptMacro(RealTypeMultiplyOperatorCheck, (Concept::MultiplyOperator<RealType>));
105 // End concept checking
106#endif
107
108protected:
110 ~ShiftScaleImageFilter() override = default;
111
112 void
113 PrintSelf(std::ostream & os, Indent indent) const override;
114
116 void
118
119 void
121
122private:
123 RealType m_Shift{};
125
126 SizeValueType m_UnderflowCount{ 0 };
127 SizeValueType m_OverflowCount{ 0 };
128
129 std::mutex m_Mutex{};
130};
131} // end namespace itk
132
133#ifndef ITK_MANUAL_INSTANTIATION
134# include "itkShiftScaleImageFilter.hxx"
135#endif
136
137#endif
Base class for all process objects that output image data.
typename OutputImageType::PixelType OutputImagePixelType
typename OutputImageType::RegionType OutputImageRegionType
typename OutputImageType::Pointer OutputImagePointer
Base class for filters that take an image as input and produce an image as output.
typename InputImageType::Pointer InputImagePointer
typename InputImageType::PixelType InputImagePixelType
typename InputImageType::RegionType InputImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Define additional traits for native types such as int or float.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Shift and scale the pixels in an image.
typename TOutputImage::OffsetType OutputImageOffsetType
typename TInputImage::SizeType InputImageSizeType
void DynamicThreadedGenerateData(const OutputImageRegionType &) override
typename TInputImage::OffsetType InputImageOffsetType
void PrintSelf(std::ostream &os, Indent indent) const override
typename TInputImage::IndexType InputImageIndexType
void BeforeThreadedGenerateData() override
typename TOutputImage::IndexType OutputImageIndexType
~ShiftScaleImageFilter() override=default
typename TOutputImage::SizeType OutputImageSizeType
typename NumericTraits< OutputImagePixelType >::RealType RealType
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition: itkIntTypes.h:83