ITK  4.8.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 StretchIntensityImageFilter: public ImageSource< TOutputImage >
42 {
43 public:
49 
50  typedef typename TOutputImage::PixelType OutputPixelType;
51  typedef typename TInputImage::PixelType InputPixelType;
53 
55  itkNewMacro(Self);
56 
59 
60  itkSetMacro(OutputMinimum, OutputPixelType);
61  itkSetMacro(OutputMaximum, OutputPixelType);
62  itkGetConstReferenceMacro(OutputMinimum, OutputPixelType);
63  itkGetConstReferenceMacro(OutputMaximum, OutputPixelType);
64 
68  itkGetConstReferenceMacro(Scale, RealType);
69  itkGetConstReferenceMacro(Shift, RealType);
71 
74  itkGetConstReferenceMacro(InputMinimum, InputPixelType);
75  itkGetConstReferenceMacro(InputMaximum, InputPixelType);
77 
80  virtual void SetInput(const TInputImage *image);
81  const TInputImage * GetInput() const;
83 
84 #ifdef ITK_USE_CONCEPT_CHECKING
85  // Begin concept checking
86  itkConceptMacro( InputHasNumericTraitsCheck,
88  itkConceptMacro( OutputHasNumericTraitsCheck,
90  itkConceptMacro( RealTypeMultiplyOperatorCheck,
92  itkConceptMacro( RealTypeAdditiveOperatorsCheck,
94  // End concept checking
95 #endif
96 
97 protected:
100 
102  void BeforeThreadedGenerateData(void) ITK_OVERRIDE;
103 
105  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
106 
108  typedef typename TInputImage::RegionType InputImageRegionType;
109 
118  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE;
119 
120 private:
121  StretchIntensityImageFilter(const Self &); //purposely not implemented
122  void operator=(const Self &); //purposely not implemented
123 
126 
129 
132 };
133 } // end namespace Testing
134 } // end namespace itk
135 
136 #ifndef ITK_MANUAL_INSTANTIATION
137 #include "itkTestingStretchIntensityImageFilter.hxx"
138 #endif
139 
140 #endif
NumericTraits< InputPixelType >::RealType RealType
void BeforeThreadedGenerateData(void) override
const TInputImage * GetInput() const
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.
typedef(Concept::HasNumericTraits< InputPixelType >) InputHasNumericTraitsCheck
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
Protected method for setting indexed and named inputs.
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
OutputImageType::RegionType OutputImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual void SetInput(const TInputImage *image)
Define additional traits for native types such as int or float.
void PrintSelf(std::ostream &os, Indent indent) const override
#define itkConceptMacro(name, concept)