ITK  5.2.0
Insight Toolkit
itkMedianImageFilter.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 itkMedianImageFilter_h
19 #define itkMedianImageFilter_h
20 
21 #include "itkBoxImageFilter.h"
22 #include "itkImage.h"
23 
24 namespace itk
25 {
52 template <typename TInputImage, typename TOutputImage>
53 class ITK_TEMPLATE_EXPORT MedianImageFilter : public BoxImageFilter<TInputImage, TOutputImage>
54 {
55 public:
56  ITK_DISALLOW_COPY_AND_MOVE(MedianImageFilter);
58 
60  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
61  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
62 
64  using InputImageType = TInputImage;
65  using OutputImageType = TOutputImage;
66 
72 
74  itkNewMacro(Self);
75 
77  itkTypeMacro(MedianImageFilter, BoxImageFilter);
78 
80  using InputPixelType = typename InputImageType::PixelType;
81  using OutputPixelType = typename OutputImageType::PixelType;
82 
85 
87 
88 #ifdef ITK_USE_CONCEPT_CHECKING
89  // Begin concept checking
92  itkConceptMacro(InputLessThanComparableCheck, (Concept::LessThanComparable<InputPixelType>));
93  // End concept checking
94 #endif
95 
96 protected:
98  ~MedianImageFilter() override = default;
99 
110  void
111  DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
112 };
113 } // end namespace itk
115 
116 #ifndef ITK_MANUAL_INSTANTIATION
117 # include "itkMedianImageFilter.hxx"
118 #endif
119 
120 #endif
itk::BoxImageFilter::OutputPixelType
typename TOutputImage::PixelType OutputPixelType
Definition: itkBoxImageFilter.h:67
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itkImage.h
itk::SmartPointer< Self >
itk::BoxImageFilter
A base class for all the filters working on a box neighborhood.
Definition: itkBoxImageFilter.h:40
itk::Concept::SameDimension
Definition: itkConceptChecking.h:694
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::BoxImageFilter::InputPixelType
typename TInputImage::PixelType InputPixelType
Definition: itkBoxImageFilter.h:64
itk::MedianImageFilter::InputSizeType
typename InputImageType::SizeType InputSizeType
Definition: itkMedianImageFilter.h:86
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
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::Concept::Convertible
Definition: itkConceptChecking.h:216
itkBoxImageFilter.h
itk::MedianImageFilter
Applies a median filter to an image.
Definition: itkMedianImageFilter.h:53
itk::ImageToImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkImageToImageFilter.h:132
itk::Concept::LessThanComparable
Definition: itkConceptChecking.h:262
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90