OGS
VtkImageDataToSurfacePointsFilter.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#include <vtkPolyDataAlgorithm.h>
7
8#include "GeoLib/Raster.h"
10
11class vtkInformation;
12class vtkInformationVector;
13
16class VtkImageDataToSurfacePointsFilter : public vtkPolyDataAlgorithm
17{
18public:
21
23
25 void PrintSelf(ostream& os, vtkIndent indent) override;
26
29
30protected:
33
35 int FillInputPortInformation(int port, vtkInformation* info) override;
36
38 int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
39 vtkInformationVector* outputVector) override;
40
41private:
43 void createPointSurface(vtkSmartPointer<vtkPoints>& points,
44 vtkSmartPointer<vtkCellArray>& cells,
45 std::size_t pnt_idx,
46 MathLib::Point3d const& min_pnt,
47 MathLib::Point3d const& max_pnt,
48 GeoLib::Raster const& raster);
49
51 double getRandomNumber(double const& min, double const& max) const;
52
53 vtkIdType PointsPerPixel{20};
54};
Class Raster is used for managing raster data.
Definition Raster.h:39
vtkSetMacro(PointsPerPixel, vtkIdType)
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Updates the graphical object.
vtkGetMacro(PointsPerPixel, vtkIdType)
void createPointSurface(vtkSmartPointer< vtkPoints > &points, vtkSmartPointer< vtkCellArray > &cells, std::size_t pnt_idx, MathLib::Point3d const &min_pnt, MathLib::Point3d const &max_pnt, GeoLib::Raster const &raster)
Creates the point objects based on the parameters set by the user.
~VtkImageDataToSurfacePointsFilter() override=default
void PrintSelf(ostream &os, vtkIndent indent) override
Prints information about itself.
static VtkImageDataToSurfacePointsFilter * New()
Create a new objects (required because of VTKs reference counting)
int FillInputPortInformation(int port, vtkInformation *info) override
Sets input port to vtkImageData.
vtkTypeMacro(VtkImageDataToSurfacePointsFilter, vtkPolyDataAlgorithm)
double getRandomNumber(double const &min, double const &max) const
Returns a random number in [min, max].