SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
bilateralfilter.hpp
1// This file is part of slideio project.
2// It is subject to the license terms in the LICENSE file found in the top-level directory
3// of this distribution and at http://slideio.com/license.html.
4#pragma once
5#include "transformation.hpp"
6
7namespace slideio
8{
9
10 class SLIDEIO_TRANSFORMER_EXPORTS BilateralFilter : public Transformation
11 {
12 public:
13 BilateralFilter()
14 {
15 m_type = TransformationType::BilateralFilter;
16 }
17
18 int getDiameter() const
19 {
20 return m_diameter;
21 }
22
23 void setDiameter(int diameter)
24 {
25 m_diameter = diameter;
26 }
27
28 double getSigmaColor() const
29 {
30 return m_sigmaColor;
31 }
32
33 void setSigmaColor(double sigmaColor)
34 {
35 m_sigmaColor = sigmaColor;
36 }
37
38 double getSigmaSpace() const
39 {
40 return m_sigmaSpace;
41 }
42
43 void setSigmaSpace(double sigmaSpace)
44 {
45 m_sigmaSpace = sigmaSpace;
46 }
47
48 void applyTransformation(const cv::Mat& block, cv::OutputArray transformedBlock) const override;
49 std::vector<DataType> computeChannelDataTypes(const std::vector<DataType>& channels) const override;
50 int getInflationValue() const override;
51
52 private:
53 int m_diameter = 5;
54 double m_sigmaColor = 1.;
55 double m_sigmaSpace = 1.;
56 };
57}
Definition: exceptions.hpp:12