ITK  5.0.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:
47  ITK_DISALLOW_COPY_AND_ASSIGN(MinimumMaximumImageCalculator);
48 
51  using Superclass = Object;
54 
56  itkNewMacro(Self);
57 
60 
62  using ImageType = TInputImage;
63 
65  using ImagePointer = typename TInputImage::Pointer;
66 
68  using ImageConstPointer = typename TInputImage::ConstPointer;
69 
71  using PixelType = typename TInputImage::PixelType;
72 
75 
78 
80  itkSetConstObjectMacro(Image, ImageType);
81 
83  void ComputeMinimum();
84 
86  void ComputeMaximum();
87 
89  void Compute();
90 
92  itkGetConstMacro(Minimum, PixelType);
93 
95  itkGetConstMacro(Maximum, PixelType);
96 
98  itkGetConstReferenceMacro(IndexOfMinimum, IndexType);
99 
101  itkGetConstReferenceMacro(IndexOfMaximum, IndexType);
102 
104  void SetRegion(const RegionType & region);
105 
106 protected:
108  ~MinimumMaximumImageCalculator() override = default;
109  void PrintSelf(std::ostream & os, Indent indent) const override;
110 
111 private:
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:60
Templated n-dimensional image class.
Definition: itkImage.h:75
typename TInputImage::ConstPointer ImageConstPointer