OGS
VtkBGImageSource.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6// ** INCLUDES **
7#include <vtkTextureMapToPlane.h>
8
10
11class vtkImageAlgorithm;
12
17class VtkBGImageSource : public vtkTextureMapToPlane, public VtkAlgorithmProperties
18{
19public:
22
23 vtkTypeMacro(VtkBGImageSource, vtkTextureMapToPlane);
24
26 void SetRaster(vtkImageAlgorithm *img, double x0, double y0, double scalingFactor);
27
28 void SetUserProperty(QString name, QVariant value) override;
29
30protected:
33
34private:
35 std::pair<double, double> _origin{0, 0};
36 double _cellsize{1};
37};
VtkAlgorithmProperties(QObject *parent=nullptr)
Constructor (sets default values)
void SetUserProperty(QString name, QVariant value) override
Sets a user property. This should be implemented by subclasses.
void SetRaster(vtkImageAlgorithm *img, double x0, double y0, double scalingFactor)
Sets the raster/image to be used as a texture map.
~VtkBGImageSource() override
static VtkBGImageSource * New()
Create new objects with New() because of VTKs object reference counting.
vtkTypeMacro(VtkBGImageSource, vtkTextureMapToPlane)
std::pair< double, double > _origin