ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkNormalizeToConstantImageFilter.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 itkNormalizeToConstantImageFilter_h
19 #define itkNormalizeToConstantImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkConceptChecking.h"
23 
24 namespace itk {
25 
54 template<typename TInputImage, typename TOutputImage>
56  public ImageToImageFilter<TInputImage, TOutputImage>
57 {
58 public:
61 
63 
66 
68  typedef TInputImage InputImageType;
69  typedef TOutputImage OutputImageType;
70  typedef typename InputImageType::Pointer InputImagePointer;
71  typedef typename InputImageType::ConstPointer InputImageConstPointer;
72  typedef typename InputImageType::PixelType InputImagePixelType;
73  typedef typename OutputImageType::Pointer OutputImagePointer;
74  typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
75  typedef typename OutputImageType::PixelType OutputImagePixelType;
76  typedef typename InputImageType::RegionType RegionType;
77  typedef typename InputImageType::IndexType IndexType;
78  typedef typename InputImageType::SizeType SizeType;
79 
81 
83  itkStaticConstMacro(InputImageDimension, unsigned int,
84  TInputImage::ImageDimension);
85  itkStaticConstMacro(OutputImageDimension, unsigned int,
86  TOutputImage::ImageDimension);
87  itkStaticConstMacro(ImageDimension, unsigned int,
88  TOutputImage::ImageDimension);
90 
92  itkNewMacro(Self);
93 
96 
98  itkSetMacro(Constant, RealType);
99  itkGetConstMacro(Constant, RealType);
101 
102 #ifdef ITK_USE_CONCEPT_CHECKING
103  // Begin concept checking
104  itkConceptMacro(InputHasPixelTraitsCheck,
106  itkConceptMacro(InputHasNumericTraitsCheck,
108  // End concept checking
109 #endif
110 
111 protected:
114  void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
115 
116  void GenerateInputRequestedRegion() ITK_OVERRIDE;
117 
118  void GenerateData() ITK_OVERRIDE;
119 
120 private:
121  NormalizeToConstantImageFilter(const Self&); //purposely not implemented
122  void operator=(const Self&); //purposely not implemented
123 
125 
126 }; // end of class
127 } // end namespace itk
128 
129 #ifndef ITK_MANUAL_INSTANTIATION
130 #include "itkNormalizeToConstantImageFilter.hxx"
131 #endif
132 
133 #endif
Base class for all process objects that output image data.
void PrintSelf(std::ostream &os, Indent indent) const override
NumericTraits< InputImagePixelType >::RealType RealType
void GenerateInputRequestedRegion() override
Scales image pixel intensities to make the sum of all pixels equal a user-defined constant...
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Define additional traits for native types such as int or float.
#define itkConceptMacro(name, concept)