SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
colortransformationwrap.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 ColorTransformation;
18 enum class ColorSpace;
19 enum class TransformationType;
20 class SLIDEIO_TRANSFORMER_EXPORTS ColorTransformationWrap : public TransformationWrapper
21 {
22 public:
23 ColorTransformationWrap(const ColorTransformationWrap& other)
24 : TransformationWrapper(other),
25 m_filter(other.m_filter) {
26 }
27
28 ColorTransformationWrap(ColorTransformationWrap&& other) noexcept
29 : TransformationWrapper(std::move(other)),
30 m_filter(std::move(other.m_filter)) {
31 }
32
33 ColorTransformationWrap& operator=(const ColorTransformationWrap& other) {
34 if (this == &other)
35 return *this;
36 TransformationWrapper::operator =(other);
37 m_filter = other.m_filter;
38 return *this;
39 }
40
41 ColorTransformationWrap& operator=(ColorTransformationWrap&& other) noexcept {
42 if (this == &other)
43 return *this;
44 TransformationWrapper::operator =(std::move(other));
45 m_filter = std::move(other.m_filter);
46 return *this;
47 }
48
49 ColorTransformationWrap();
50 ColorTransformationWrap(const ColorTransformation& filter);
51 ColorSpace getColorSpace() const;
52 void setColorSpace(ColorSpace colorSpace);
53 TransformationType getType() const override;
54 std::shared_ptr<ColorTransformation> getFilter() const;;
55 private:
56 std::shared_ptr<ColorTransformation> m_filter;
57 };
58}
59
60#if defined(_MSC_VER)
61#pragma warning( pop )
62#endif
Definition: exceptions.hpp:15