ITK  6.0.0
Insight Toolkit
itkMinimumMaximumImageCalculator.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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 "itkNumericTraits.h"
22#include "itkObject.h"
23#include "itkObjectFactory.h"
24
25namespace itk
26{
44template <typename TInputImage>
45class ITK_TEMPLATE_EXPORT MinimumMaximumImageCalculator : public Object
46{
47public:
48 ITK_DISALLOW_COPY_AND_MOVE(MinimumMaximumImageCalculator);
49
55
57 itkNewMacro(Self);
58
60 itkOverrideGetNameOfClassMacro(MinimumMaximumImageCalculator);
61
63 using ImageType = TInputImage;
64
67
70
72 using PixelType = typename TInputImage::PixelType;
73
76
79
81 itkSetConstObjectMacro(Image, ImageType);
82
84 void
86
88 void
90
92 void
94
96 itkGetConstMacro(Minimum, PixelType);
97
99 itkGetConstMacro(Maximum, PixelType);
100
102 itkGetConstReferenceMacro(IndexOfMinimum, IndexType);
103
105 itkGetConstReferenceMacro(IndexOfMaximum, IndexType);
106
108 void
109 SetRegion(const RegionType & region);
110
111protected:
113 ~MinimumMaximumImageCalculator() override = default;
114 void
115 PrintSelf(std::ostream & os, Indent indent) const override;
116
117private:
121
122 IndexType m_IndexOfMinimum{};
123 IndexType m_IndexOfMaximum{};
124
125 RegionType m_Region{};
126 bool m_RegionSetByUser{};
127};
128} // end namespace itk
129
130#ifndef ITK_MANUAL_INSTANTIATION
131# include "itkMinimumMaximumImageCalculator.hxx"
132#endif
133
134#endif /* itkMinimumMaximumImageCalculator_h */
Templated n-dimensional image class.
Definition: itkImage.h:89
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Computes the minimum and the maximum intensity values of an image.
void PrintSelf(std::ostream &os, Indent indent) const override
typename TInputImage::ConstPointer ImageConstPointer
void SetRegion(const RegionType &region)
~MinimumMaximumImageCalculator() override=default
static constexpr T NonpositiveMin()
static constexpr T max(const T &)
Base class for most ITK classes.
Definition: itkObject.h:62
SmartPointer< const Self > ConstPointer
static Pointer New()
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....