SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
transformation.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/mat.hpp>
7
8#include "transformer_def.hpp"
9#include "slideio/base/slideio_enums.hpp"
10
11
12namespace slideio
13{
14 enum class SLIDEIO_TRANSFORMER_EXPORTS TransformationType
15 {
16 Unknown,
17 ColorTransformation,
18 GaussianBlurFilter,
19 MedianBlurFilter,
20 SobelFilter,
21 ScharrFilter,
22 LaplacianFilter,
23 BilateralFilter,
24 CannyFilter,
25
26 };
27
28 class SLIDEIO_TRANSFORMER_EXPORTS Transformation
29 {
30 public:
31 Transformation() {
32 m_type = TransformationType::Unknown;
33 }
34 TransformationType getType() const {
35 return m_type;
36 }
37 virtual std::vector<DataType> computeChannelDataTypes(const std::vector<DataType>& channels) const;
38 virtual int getInflationValue() const;
39 virtual void applyTransformation(const cv::Mat& block, cv::OutputArray transformedBlock) const = 0;
40 protected:
41 TransformationType m_type;
42 };
43}
Definition: exceptions.hpp:12