ITK  4.4.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_EXPORT 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 
79  using Superclass::SetInput;
80  virtual void SetInput(const TInputImage *image);
81  const TInputImage * GetInput(void) const;
83 
84 #ifdef ITK_USE_CONCEPT_CHECKING
85 
86  itkConceptMacro( InputHasNumericTraitsCheck,
88  itkConceptMacro( OutputHasNumericTraitsCheck,
90  itkConceptMacro( RealTypeMultiplyOperatorCheck,
92  itkConceptMacro( RealTypeAdditiveOperatorsCheck,
94 
96 #endif
97 
98 protected:
101 
103  void BeforeThreadedGenerateData(void);
104 
106  void PrintSelf(std::ostream & os, Indent indent) const;
107 
108  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
109  typedef typename TInputImage::RegionType InputImageRegionType;
110 
119  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId);
120 
121 private:
122  StretchIntensityImageFilter(const Self &); //purposely not implemented
123  void operator=(const Self &); //purposely not implemented
124 
127 
130 
133 };
134 } // end namespace Testing
135 } // end namespace itk
136 
137 #ifndef ITK_MANUAL_INSTANTIATION
138 #include "itkTestingStretchIntensityImageFilter.hxx"
139 #endif
140 
141 #endif
142