SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
scharrfilter.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#include "slideio/base/slideio_enums.hpp"
7
8namespace slideio
9{
10
11 class SLIDEIO_TRANSFORMER_EXPORTS ScharrFilter : public Transformation
12 {
13 public:
14 ScharrFilter()
15 {
16 m_type = TransformationType::ScharrFilter;
17 }
18
19 DataType getDepth() const
20 {
21 return m_depth;
22 }
23
24 void setDepth(const DataType& depth)
25 {
26 m_depth = depth;
27 }
28
29 int getDx() const
30 {
31 return m_dx;
32 }
33
34 void setDx(int dx)
35 {
36 m_dx = dx;
37 }
38
39 int getDy() const
40 {
41 return m_dy;
42 }
43
44 void setDy(int dy)
45 {
46 m_dy = dy;
47 }
48
49 double getScale() const
50 {
51 return m_scale;
52 }
53
54 void setScale(double scale)
55 {
56 m_scale = scale;
57 }
58
59 double getDelta() const
60 {
61 return m_delta;
62 }
63
64 void setDelta(double delta)
65 {
66 m_delta = delta;
67 }
68
69 void applyTransformation(const cv::Mat& block, cv::OutputArray transformedBlock) const override;
70 int getInflationValue() const override;
71 std::vector<DataType> computeChannelDataTypes(const std::vector<DataType>& channels) const override;
72
73 private:
74 DataType m_depth = DataType::DT_Float32;
75 int m_dx = 1;
76 int m_dy = 1;
77 double m_scale = 1.;
78 double m_delta = 0.;
79 };
80
81}
Definition: exceptions.hpp:12