SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
cannyfilterwrap.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 "slideio/transformer/transformer_def.hpp"
6#include "slideio/transformer/transformationtype.hpp"
7#include "slideio/transformer/transformationwrapper.hpp"
8#include <memory>
9
10#if defined(_MSC_VER)
11#pragma warning( push )
12#pragma warning(disable: 4275 4251)
13#endif
14
15namespace slideio
16{
17 class CannyFilter;
18 class SLIDEIO_TRANSFORMER_EXPORTS CannyFilterWrap : public TransformationWrapper
19 {
20 public:
21 CannyFilterWrap(const CannyFilterWrap& other)
22 : TransformationWrapper(other),
23 m_filter(other.m_filter) {
24 }
25
26 CannyFilterWrap(CannyFilterWrap&& other) noexcept
27 : TransformationWrapper(std::move(other)),
28 m_filter(std::move(other.m_filter)) {
29 }
30
31 CannyFilterWrap& operator=(const CannyFilterWrap& other) {
32 if (this == &other)
33 return *this;
34 TransformationWrapper::operator =(other);
35 m_filter = other.m_filter;
36 return *this;
37 }
38
39 CannyFilterWrap& operator=(CannyFilterWrap&& other) noexcept {
40 if (this == &other)
41 return *this;
42 TransformationWrapper::operator =(std::move(other));
43 m_filter = std::move(other.m_filter);
44 return *this;
45 }
46
47 CannyFilterWrap();
48 CannyFilterWrap(const CannyFilter& filter);
49 double getThreshold1() const;
50 void setThreshold1(double threshold1);
51 double getThreshold2() const;
52 void setThreshold2(double threshold2);
53 int getApertureSize() const;
54 void setApertureSize(int apertureSize);
55 bool getL2Gradient() const;
56 void setL2Gradient(bool L2gradient);
57 TransformationType getType() const override;
58 std::shared_ptr<CannyFilter> getFilter() const;
59
60 private:
61 std::shared_ptr<CannyFilter> m_filter;
62 };
63};
64
65#if defined(_MSC_VER)
66#pragma warning( pop )
67#endif
Definition: exceptions.hpp:15