ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkMinimumMaximumImageCalculator.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 itkMinimumMaximumImageCalculator_h
19 #define itkMinimumMaximumImageCalculator_h
20 
21 #include "itkObject.h"
22 #include "itkObjectFactory.h"
23 
24 namespace itk
25 {
43 template< typename TInputImage >
44 class ITK_TEMPLATE_EXPORT MinimumMaximumImageCalculator:public Object
45 {
46 public:
49  typedef Object Superclass;
52 
54  itkNewMacro(Self);
55 
58 
60  typedef TInputImage ImageType;
61 
63  typedef typename TInputImage::Pointer ImagePointer;
64 
66  typedef typename TInputImage::ConstPointer ImageConstPointer;
67 
69  typedef typename TInputImage::PixelType PixelType;
70 
73 
75  typedef typename TInputImage::RegionType RegionType;
76 
78  itkSetConstObjectMacro(Image, ImageType);
79 
81  void ComputeMinimum();
82 
84  void ComputeMaximum();
85 
87  void Compute();
88 
90  itkGetConstMacro(Minimum, PixelType);
91 
93  itkGetConstMacro(Maximum, PixelType);
94 
96  itkGetConstReferenceMacro(IndexOfMinimum, IndexType);
97 
99  itkGetConstReferenceMacro(IndexOfMaximum, IndexType);
100 
102  void SetRegion(const RegionType & region);
103 
104 protected:
106  virtual ~MinimumMaximumImageCalculator() ITK_OVERRIDE {}
107  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
108 
109 private:
110  ITK_DISALLOW_COPY_AND_ASSIGN(MinimumMaximumImageCalculator);
111 
115 
118 
121 };
122 } // end namespace itk
123 
124 #ifndef ITK_MANUAL_INSTANTIATION
125 #include "itkMinimumMaximumImageCalculator.hxx"
126 #endif
127 
128 #endif /* itkMinimumMaximumImageCalculator_h */
Light weight base class for most itk classes.
Computes the minimum and the maximum intensity values of an image.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for most ITK classes.
Definition: itkObject.h:59
Templated n-dimensional image class.
Definition: itkImage.h:75