ITK  5.2.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  * 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 itkMinimumProjectionImageFilter_h
19 #define itkMinimumProjectionImageFilter_h
20 
22 #include "itkConceptChecking.h"
23 
24 namespace itk
25 {
45 namespace Functor
46 {
47 template <typename TInputPixel>
49 {
50 public:
52  ~MinimumAccumulator() = default;
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 
76 template <typename TInputImage, typename TOutputImage>
78  : public ProjectionImageFilter<TInputImage,
79  TOutputImage,
80  Functor::MinimumAccumulator<typename TInputImage::PixelType>>
81 {
82 public:
83  ITK_DISALLOW_COPY_AND_MOVE(MinimumProjectionImageFilter);
84 
86  using Superclass =
88 
89  using InputImageType = TInputImage;
90  using InputPixelType = typename InputImageType::PixelType;
91 
94 
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 
108 protected:
109  MinimumProjectionImageFilter() = default;
110  ~MinimumProjectionImageFilter() override = default;
111 }; // end
112  // MinimumProjectionImageFilter
113 } // end namespace itk
114 
115 #endif
itkProjectionImageFilter.h
itk::Concept::HasNumericTraits
Definition: itkConceptChecking.h:714
itk::Functor::MinimumAccumulator::operator()
void operator()(const TInputPixel &input)
Definition: itkMinimumProjectionImageFilter.h:61
itk::MinimumProjectionImageFilter::InputPixelType
typename InputImageType::PixelType InputPixelType
Definition: itkMinimumProjectionImageFilter.h:90
itkConceptChecking.h
itk::SmartPointer< Self >
itk::ProjectionImageFilter
Implements an accumulation of an image along a selected direction.
Definition: itkProjectionImageFilter.h:57
itk::Functor::MinimumAccumulator
Definition: itkMinimumProjectionImageFilter.h:48
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::Functor::MinimumAccumulator::GetValue
TInputPixel GetValue()
Definition: itkMinimumProjectionImageFilter.h:67
itk::MinimumProjectionImageFilter::MinimumProjectionImageFilter
MinimumProjectionImageFilter()=default
itk::Functor::MinimumAccumulator::~MinimumAccumulator
~MinimumAccumulator()=default
itk::Functor::MinimumAccumulator::MinimumAccumulator
MinimumAccumulator(SizeValueType)
Definition: itkMinimumProjectionImageFilter.h:51
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::Functor::MinimumAccumulator::m_Minimum
TInputPixel m_Minimum
Definition: itkMinimumProjectionImageFilter.h:72
itk::MinimumProjectionImageFilter
Minimum projection.
Definition: itkMinimumProjectionImageFilter.h:77
itk::NumericTraits::max
static constexpr T max(const T &)
Definition: itkNumericTraits.h:167
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::Functor::MinimumAccumulator::Initialize
void Initialize()
Definition: itkMinimumProjectionImageFilter.h:55
itk::MinimumProjectionImageFilter::~MinimumProjectionImageFilter
~MinimumProjectionImageFilter() override=default
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83
itk::Concept::LessThanComparable
Definition: itkConceptChecking.h:262