ITK  4.2.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<class TInputImage, class 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 
104  itkConceptMacro(InputHasPixelTraitsCheck,
106  itkConceptMacro(InputHasNumericTraitsCheck,
108 
110 #endif
111 
112 protected:
115  void PrintSelf(std::ostream& os, Indent indent) const;
116 
117  void GenerateInputRequestedRegion();
118 
119  void GenerateData();
120 
121 
122 private:
123  NormalizeToConstantImageFilter(const Self&); //purposely not implemented
124  void operator=(const Self&); //purposely not implemented
125 
127 
128 }; // end of class
129 } // end namespace itk
130 
131 #ifndef ITK_MANUAL_INSTANTIATION
132 #include "itkNormalizeToConstantImageFilter.hxx"
133 #endif
134 
135 #endif
136