5#include "slideio/transformer/transformationex.hpp"
6#include "slideio/transformer/transformationtype.hpp"
11 class SLIDEIO_TRANSFORMER_EXPORTS CannyFilter :
public TransformationEx
14 CannyFilter(
const CannyFilter& other)
15 : TransformationEx(other),
16 m_threshold1(other.m_threshold1),
17 m_threshold2(other.m_threshold2),
18 m_apertureSize(other.m_apertureSize),
19 m_L2gradient(other.m_L2gradient) {
22 CannyFilter(CannyFilter&& other) noexcept
23 : TransformationEx(std::move(other)),
24 m_threshold1(other.m_threshold1),
25 m_threshold2(other.m_threshold2),
26 m_apertureSize(other.m_apertureSize),
27 m_L2gradient(other.m_L2gradient) {
30 CannyFilter& operator=(
const CannyFilter& other) {
33 TransformationEx::operator =(other);
34 m_threshold1 = other.m_threshold1;
35 m_threshold2 = other.m_threshold2;
36 m_apertureSize = other.m_apertureSize;
37 m_L2gradient = other.m_L2gradient;
41 CannyFilter& operator=(CannyFilter&& other)
noexcept {
44 TransformationEx::operator =(std::move(other));
45 m_threshold1 = other.m_threshold1;
46 m_threshold2 = other.m_threshold2;
47 m_apertureSize = other.m_apertureSize;
48 m_L2gradient = other.m_L2gradient;
54 m_type = TransformationType::CannyFilter;
57 double getThreshold1()
const
62 void setThreshold1(
double threshold1)
64 m_threshold1 = threshold1;
67 double getThreshold2()
const
72 void setThreshold2(
double threshold2)
74 m_threshold2 = threshold2;
77 int getApertureSize()
const
79 return m_apertureSize;
82 void setApertureSize(
int apertureSize)
84 m_apertureSize = apertureSize;
87 bool getL2Gradient()
const
92 void setL2Gradient(
bool L2gradient)
94 m_L2gradient = L2gradient;
97 void applyTransformation(
const cv::Mat& block, cv::OutputArray transformedBlock)
const override;
98 std::vector<DataType> computeChannelDataTypes(
const std::vector<DataType>& channels)
const override;
99 int getInflationValue()
const override;
102 double m_threshold1 = 100.;
103 double m_threshold2 = 200.;
104 int m_apertureSize = 3;
105 bool m_L2gradient =
false;
Definition: exceptions.hpp:15