ITK  6.0.0
Insight Toolkit
itkTestingStretchIntensityImageFilter.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 itkTestingStretchIntensityImageFilter_h
19#define itkTestingStretchIntensityImageFilter_h
20
22
23namespace itk
24{
25namespace Testing
26{
27
41template <typename TInputImage, typename TOutputImage = TInputImage>
42class ITK_TEMPLATE_EXPORT StretchIntensityImageFilter : public ImageSource<TOutputImage>
43{
44public:
45 ITK_DISALLOW_COPY_AND_MOVE(StretchIntensityImageFilter);
46
52
53 using OutputPixelType = typename TOutputImage::PixelType;
54 using InputPixelType = typename TInputImage::PixelType;
56
58 itkNewMacro(Self);
59
61 itkOverrideGetNameOfClassMacro(StretchIntensityImageFilter);
62
63 itkSetMacro(OutputMinimum, OutputPixelType);
64 itkSetMacro(OutputMaximum, OutputPixelType);
65 itkGetConstReferenceMacro(OutputMinimum, OutputPixelType);
66 itkGetConstReferenceMacro(OutputMaximum, OutputPixelType);
67
71 itkGetConstReferenceMacro(Scale, RealType);
72 itkGetConstReferenceMacro(Shift, RealType);
77 itkGetConstReferenceMacro(InputMinimum, InputPixelType);
78 itkGetConstReferenceMacro(InputMaximum, InputPixelType);
82 using Superclass::SetInput;
83 virtual void
84 SetInput(const TInputImage * input);
85 const TInputImage *
86 GetInput() const;
89#ifdef ITK_USE_CONCEPT_CHECKING
90 // Begin concept checking
92 itkConceptMacro(OutputHasNumericTraitsCheck, (Concept::HasNumericTraits<OutputPixelType>));
93 itkConceptMacro(RealTypeMultiplyOperatorCheck, (Concept::MultiplyOperator<RealType>));
94 itkConceptMacro(RealTypeAdditiveOperatorsCheck, (Concept::AdditiveOperators<RealType>));
95 // End concept checking
96#endif
97
98protected:
100 ~StretchIntensityImageFilter() override = default;
101
103 void
105
107 void
108 PrintSelf(std::ostream & os, Indent indent) const override;
109
110 using typename Superclass::OutputImageRegionType;
112
121 void
122 DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
123
124private:
125 RealType m_Scale{};
126 RealType m_Shift{};
127
128 InputPixelType m_InputMinimum{};
129 InputPixelType m_InputMaximum{};
130
131 OutputPixelType m_OutputMinimum{};
132 OutputPixelType m_OutputMaximum{};
133};
134} // end namespace Testing
135} // end namespace itk
136
137#ifndef ITK_MANUAL_INSTANTIATION
138# include "itkTestingStretchIntensityImageFilter.hxx"
139#endif
140
141#endif
Base class for all process objects that output image data.
typename OutputImageType::RegionType OutputImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Define additional traits for native types such as int or float.
Applies a linear transformation to the intensity levels of the input Image.
virtual void SetInput(const TInputImage *input)
void PrintSelf(std::ostream &os, Indent indent) const override
const TInputImage * GetInput() const
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
typename NumericTraits< InputPixelType >::RealType RealType
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....