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