SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
transformationex.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 <vector>
6#include <opencv2/core.hpp>
7
8#include "slideio/transformer/transformer_def.hpp"
9#include "slideio/transformer/transformation.hpp"
10
11
12namespace slideio
13{
14 enum class DataType;
15 enum class TransformationType;
16 class SLIDEIO_TRANSFORMER_EXPORTS TransformationEx : public Transformation
17 {
18 public:
19 TransformationEx(const TransformationEx& other)
20 : Transformation(other),
21 m_type(other.m_type) {
22 }
23
24 TransformationEx(TransformationEx&& other) noexcept
25 : Transformation(std::move(other)),
26 m_type(other.m_type) {
27 }
28
29 TransformationEx& operator=(const TransformationEx& other) {
30 if (this == &other)
31 return *this;
32 Transformation::operator =(other);
33 m_type = other.m_type;
34 return *this;
35 }
36
37 TransformationEx& operator=(TransformationEx&& other) noexcept {
38 if (this == &other)
39 return *this;
40 Transformation::operator =(std::move(other));
41 m_type = other.m_type;
42 return *this;
43 }
44
45 TransformationEx();
46 virtual ~TransformationEx() = default;
47 TransformationType getType() const override {
48 return m_type;
49 }
50 virtual std::vector<DataType> computeChannelDataTypes(const std::vector<DataType>& channels) const;
51 virtual int getInflationValue() const;
52 virtual void applyTransformation(const cv::Mat& block, cv::OutputArray transformedBlock) const = 0;
53 protected:
54 TransformationType m_type;
55 };
56}
Definition: exceptions.hpp:15