ITK  5.4.0
Insight Toolkit
itkMinimumProjectionImageFilter.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 itkMinimumProjectionImageFilter_h
19#define itkMinimumProjectionImageFilter_h
20
22#include "itkConceptChecking.h"
23
24namespace itk
25{
45namespace Functor
46{
47template <typename TInputPixel>
49{
50public:
53
54 inline void
56 {
58 }
59
60 inline void
61 operator()(const TInputPixel & input)
62 {
63 m_Minimum = std::min(m_Minimum, input);
64 }
65
66 inline TInputPixel
68 {
69 return m_Minimum;
70 }
71
72 TInputPixel m_Minimum;
73};
74} // namespace Functor
75
76template <typename TInputImage, typename TOutputImage>
78 : public ProjectionImageFilter<TInputImage,
79 TOutputImage,
80 Functor::MinimumAccumulator<typename TInputImage::PixelType>>
81{
82public:
83 ITK_DISALLOW_COPY_AND_MOVE(MinimumProjectionImageFilter);
84
86 using Superclass =
88
89 using InputImageType = TInputImage;
90 using InputPixelType = typename InputImageType::PixelType;
91
94
96 itkOverrideGetNameOfClassMacro(MinimumProjectionImageFilter);
97
99 itkNewMacro(Self);
100
101#ifdef ITK_USE_CONCEPT_CHECKING
102 // Begin concept checking
103 itkConceptMacro(InputPixelTypeGreaterThanComparable, (Concept::LessThanComparable<InputPixelType>));
104 itkConceptMacro(InputHasNumericTraitsCheck, (Concept::HasNumericTraits<InputPixelType>));
105 // End concept checking
106#endif
107
108protected:
110 ~MinimumProjectionImageFilter() override = default;
111}; // end
112 // MinimumProjectionImageFilter
113} // end namespace itk
114
115#endif
Base class for all process objects that output image data.
~MinimumProjectionImageFilter() override=default
typename InputImageType::PixelType InputPixelType
static constexpr T max(const T &)
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Implements an accumulation of an image along a selected direction.
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition: itkIntTypes.h:83