RTK  2.6.0
Reconstruction Toolkit
rtkConditionalMedianImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright RTK 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  * 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 rtkConditionalMedianImageFilter_h
19 #define rtkConditionalMedianImageFilter_h
20 
21 #include <itkInPlaceImageFilter.h>
23 #include <itkVectorImage.h>
24 
25 #include "RTKExport.h"
26 #include "rtkMacro.h"
27 
28 namespace rtk
29 {
48 template <typename TInputImage>
49 class ITK_TEMPLATE_EXPORT ConditionalMedianImageFilter : public itk::InPlaceImageFilter<TInputImage>
50 {
51 public:
52  ITK_DISALLOW_COPY_AND_MOVE(ConditionalMedianImageFilter);
53 
59 
61  itkNewMacro(Self);
62 
64 #ifdef itkOverrideGetNameOfClassMacro
65  itkOverrideGetNameOfClassMacro(ConditionalMedianImageFilter);
66 #else
68 #endif
69 
70 
73  itkGetMacro(Radius, MedianRadiusType);
75 
77  itkSetMacro(ThresholdMultiplier, double);
78  itkGetMacro(ThresholdMultiplier, double);
80 
81 protected:
83  ~ConditionalMedianImageFilter() override = default;
84 
85  void
86  GenerateInputRequestedRegion() override;
87 
89  void
90  DynamicThreadedGenerateData(const typename TInputImage::RegionType & outputRegionForThread) override;
91 
94 };
95 
96 template <>
97 RTK_EXPORT void
99  const itk::VectorImage<float, 3>::RegionType & outputRegionForThread);
100 
101 } // namespace rtk
102 
103 
104 #ifndef ITK_MANUAL_INSTANTIATION
105 # include "rtkConditionalMedianImageFilter.hxx"
106 #endif
107 
108 #endif // rtkConditionalMedianImageFilter_h
Performs a median filtering on outlier pixels.
#define itkSetMacro(name, type)
typename itk::ConstNeighborhoodIterator< TOutputImage >::RadiusType MedianRadiusType