SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
sobelfilterwrap.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/transformationwrapper.hpp"
7#include <memory>
8
9#if defined(_MSC_VER)
10#pragma warning( push )
11#pragma warning(disable: 4275 4251)
12#endif
13
14
15namespace slideio
16{
17 class SobelFilter;
18 enum class DataType;
19 enum class TransformationType;
20
21 class SLIDEIO_TRANSFORMER_EXPORTS SobelFilterWrap : public TransformationWrapper
22 {
23 public:
24 SobelFilterWrap();
25
26 SobelFilterWrap(const SobelFilterWrap& other)
27 : TransformationWrapper(other),
28 m_filter(other.m_filter) {
29 }
30
31 SobelFilterWrap(SobelFilterWrap&& other) noexcept
32 : TransformationWrapper(std::move(other)),
33 m_filter(std::move(other.m_filter)) {
34 }
35
36 SobelFilterWrap& operator=(const SobelFilterWrap& other) {
37 if (this == &other)
38 return *this;
39 TransformationWrapper::operator =(other);
40 m_filter = other.m_filter;
41 return *this;
42 }
43
44 SobelFilterWrap& operator=(SobelFilterWrap&& other) noexcept {
45 if (this == &other)
46 return *this;
47 TransformationWrapper::operator =(std::move(other));
48 m_filter = std::move(other.m_filter);
49 return *this;
50 }
51
52 SobelFilterWrap(const SobelFilter& filter);
53 DataType getDepth() const;
54 void setDepth(const DataType& depth);
55 int getDx() const;
56 void setDx(int dx);
57 int getDy() const;
58 void setDy(int dy);
59 int getKernelSize() const;
60 void setKernelSize(int ksize);
61 double getScale() const;
62 void setScale(double scale);
63 double getDelta() const;
64 void setDelta(double delta);
65 TransformationType getType() const override;
66 std::shared_ptr<SobelFilter> getFilter() const;
67
68 private:
69 std::shared_ptr<SobelFilter> m_filter;
70 };
71
72}
73
74#if defined(_MSC_VER)
75#pragma warning( pop )
76#endif
Definition: exceptions.hpp:15