ITK  6.0.0
Insight Toolkit
itkMaximumProjectionImageFilter.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 itkMaximumProjectionImageFilter_h
19#define itkMaximumProjectionImageFilter_h
20
22#include "itkConceptChecking.h"
23
24namespace itk
25{
46namespace Functor
47{
48template <typename TInputPixel>
50{
51public:
54
55 inline void
57 {
59 }
60
61 inline void
62 operator()(const TInputPixel & input)
63 {
64 m_Maximum = std::max(m_Maximum, input);
65 }
66
67 inline TInputPixel
69 {
70 return m_Maximum;
71 }
72
73 TInputPixel m_Maximum;
74};
75} // namespace Functor
76
77template <typename TInputImage, typename TOutputImage>
79 : public ProjectionImageFilter<TInputImage,
80 TOutputImage,
81 Functor::MaximumAccumulator<typename TInputImage::PixelType>>
82{
83public:
84 ITK_DISALLOW_COPY_AND_MOVE(MaximumProjectionImageFilter);
85
87 using Superclass =
89
90 using InputImageType = TInputImage;
91 using InputPixelType = typename InputImageType::PixelType;
92
95
97 itkOverrideGetNameOfClassMacro(MaximumProjectionImageFilter);
98
100 itkNewMacro(Self);
101
102#ifdef ITK_USE_CONCEPT_CHECKING
103 // Begin concept checking
104 itkConceptMacro(InputPixelTypeGreaterThanComparable, (Concept::GreaterThanComparable<InputPixelType>));
105 itkConceptMacro(InputHasNumericTraitsCheck, (Concept::HasNumericTraits<InputPixelType>));
106 // End concept checking
107#endif
108
109protected:
111 ~MaximumProjectionImageFilter() override = default;
112}; // end
113 // MaximumProjectionImageFilter
114} // end namespace itk
115
116#endif
Base class for all process objects that output image data.
~MaximumProjectionImageFilter() override=default
typename InputImageType::PixelType InputPixelType
static constexpr T NonpositiveMin()
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:86