ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkTestingStretchIntensityImageFilter.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 itkTestingStretchIntensityImageFilter_h
19  #define itkTestingStretchIntensityImageFilter_h
20 
22 
23  namespace itk
24  {
25  namespace Testing
26  {
27 
40 template< typename TInputImage, typename TOutputImage = TInputImage >
41 class ITK_TEMPLATE_EXPORT StretchIntensityImageFilter: public ImageSource< TOutputImage >
42 {
43 public:
44  ITK_DISALLOW_COPY_AND_ASSIGN(StretchIntensityImageFilter);
45 
51 
52  using OutputPixelType = typename TOutputImage::PixelType;
53  using InputPixelType = typename TInputImage::PixelType;
55 
57  itkNewMacro(Self);
58 
61 
62  itkSetMacro(OutputMinimum, OutputPixelType);
63  itkSetMacro(OutputMaximum, OutputPixelType);
64  itkGetConstReferenceMacro(OutputMinimum, OutputPixelType);
65  itkGetConstReferenceMacro(OutputMaximum, OutputPixelType);
66 
70  itkGetConstReferenceMacro(Scale, RealType);
71  itkGetConstReferenceMacro(Shift, RealType);
73 
76  itkGetConstReferenceMacro(InputMinimum, InputPixelType);
77  itkGetConstReferenceMacro(InputMaximum, InputPixelType);
79 
81  using Superclass::SetInput;
82  virtual void SetInput(const TInputImage *image);
83  const TInputImage * GetInput() const;
85 
86 #ifdef ITK_USE_CONCEPT_CHECKING
87  // Begin concept checking
88  itkConceptMacro( InputHasNumericTraitsCheck,
90  itkConceptMacro( OutputHasNumericTraitsCheck,
92  itkConceptMacro( RealTypeMultiplyOperatorCheck,
94  itkConceptMacro( RealTypeAdditiveOperatorsCheck,
96  // End concept checking
97 #endif
98 
99 protected:
101  ~StretchIntensityImageFilter() override = default;
102 
104  void BeforeThreadedGenerateData() override;
105 
107  void PrintSelf(std::ostream & os, Indent indent) const override;
108 
109  using OutputImageRegionType = typename Superclass::OutputImageRegionType;
111 
120  void DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
121 
122 private:
125 
128 
131 };
132 } // end namespace Testing
133 } // end namespace itk
134 
135 #ifndef ITK_MANUAL_INSTANTIATION
136 #include "itkTestingStretchIntensityImageFilter.hxx"
137 #endif
138 
139 #endif
Define numeric traits for std::vector.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
Applies a linear transformation to the intensity levels of the input Image.
typename NumericTraits< InputPixelType >::RealType RealType
typename OutputImageType::RegionType OutputImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)