SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
laplacianfilter.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 LaplacianFilter : public Transformation
12 {
13 public:
14 LaplacianFilter()
15 {
16 m_type = TransformationType::LaplacianFilter;
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 getKernelSize() const
30 {
31 return m_kernelSize;
32 }
33
34 void setKernelSize(int kernelSize)
35 {
36 m_kernelSize = kernelSize;
37 }
38
39 double getScale() const
40 {
41 return m_scale;
42 }
43
44 void setScale(double scale)
45 {
46 m_scale = scale;
47 }
48
49 double getDelta() const
50 {
51 return m_delta;
52 }
53
54 void setDelta(double delta)
55 {
56 m_delta = delta;
57 }
58
59 void applyTransformation(const cv::Mat& block, cv::OutputArray transformedBlock) const override;
60 int getInflationValue() const override;
61 std::vector<DataType> computeChannelDataTypes(const std::vector<DataType>& channels) const override;
62
63 private:
64 DataType m_depth = DataType::DT_Float32;
65 int m_kernelSize = 1;
66 double m_scale = 1.;
67 double m_delta = 0.;
68 };
69}
Definition: exceptions.hpp:12