ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkMedianImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 {
51 template< typename TInputImage, typename TOutputImage >
52 class ITK_TEMPLATE_EXPORT MedianImageFilter:
53  public BoxImageFilter< TInputImage, TOutputImage >
54 {
55 public:
56  ITK_DISALLOW_COPY_AND_ASSIGN(MedianImageFilter);
57 
59  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
60  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
61 
63  using InputImageType = TInputImage;
64  using OutputImageType = TOutputImage;
65 
71 
73  itkNewMacro(Self);
74 
76  itkTypeMacro(MedianImageFilter, BoxImageFilter);
77 
79  using InputPixelType = typename InputImageType::PixelType;
80  using OutputPixelType = typename OutputImageType::PixelType;
81 
84 
86 
87 #ifdef ITK_USE_CONCEPT_CHECKING
88  // Begin concept checking
89  itkConceptMacro( SameDimensionCheck,
91  itkConceptMacro( InputConvertibleToOutputCheck,
93  itkConceptMacro( InputLessThanComparableCheck,
95  // End concept checking
96 #endif
97 
98 protected:
100  ~MedianImageFilter() override = default;
101 
112  void DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
113 
114 };
115 } // end namespace itk
116 
117 #ifndef ITK_MANUAL_INSTANTIATION
118 #include "itkMedianImageFilter.hxx"
119 #endif
120 
121 #endif
typename TOutputImage::PixelType OutputPixelType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
Applies a median filter to an image.
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
typename TInputImage::PixelType InputPixelType
A base class for all the filters working on a box neighborhood.
typename InputImageType::RegionType InputImageRegionType
typename InputImageType::SizeType InputSizeType
Base class for filters that take an image as input and produce an image as output.
#define itkConceptMacro(name, concept)