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  itkOverrideGetNameOfClassMacro(ConditionalMedianImageFilter);
65 
68  itkGetMacro(Radius, MedianRadiusType);
70 
72  itkSetMacro(ThresholdMultiplier, double);
73  itkGetMacro(ThresholdMultiplier, double);
75 
76 protected:
78  ~ConditionalMedianImageFilter() override = default;
79 
80  void
81  GenerateInputRequestedRegion() override;
82 
84  void
85  DynamicThreadedGenerateData(const typename TInputImage::RegionType & outputRegionForThread) override;
86 
89 };
90 
91 template <>
92 RTK_EXPORT void
94  const itk::VectorImage<float, 3>::RegionType & outputRegionForThread);
95 
96 } // namespace rtk
97 
98 
99 #ifndef ITK_MANUAL_INSTANTIATION
100 # include "rtkConditionalMedianImageFilter.hxx"
101 #endif
102 
103 #endif // rtkConditionalMedianImageFilter_h
Performs a median filtering on outlier pixels.
#define itkSetMacro(name, type)
typename itk::ConstNeighborhoodIterator< TOutputImage >::RadiusType MedianRadiusType