OGS
VtkStationSource.h
Go to the documentation of this file.
1 
15 #pragma once
16 
17 #include <vtkPolyDataAlgorithm.h>
18 
20 #include "GeoLib/StationBorehole.h"
21 #include "GeoLib/Station.h"
22 #include "VtkAlgorithmProperties.h"
23 
27 class VtkStationSource : public vtkPolyDataAlgorithm, public VtkAlgorithmProperties
28 {
29 public:
31  static VtkStationSource* New();
32 
33  vtkTypeMacro(VtkStationSource,vtkPolyDataAlgorithm);
34 
37  const std::map<std::string, DataHolderLib::Color>& getColorLookupTable() const
38  { return _colorLookupTable; }
39 
41 // int setColorLookupTable(const std::string &filename)
42 // { return GeoLib::readColorLookupTable(_colorLookupTable, filename); }
43 
45  void setStations(const std::vector<GeoLib::Point*>* stations) { _stations = stations; }
46 
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
50  void SetUserProperty(QString name, QVariant value) override;
51 
52 protected:
54 
56  int RequestData(vtkInformation* request,
57  vtkInformationVector** inputVector,
58  vtkInformationVector* outputVector) override;
59 
60  int RequestInformation(vtkInformation* request,
61  vtkInformationVector** inputVector,
62  vtkInformationVector* outputVector) override;
63 
65  const std::vector<GeoLib::Point*>* _stations{nullptr};
66 
69  std::map<std::string, DataHolderLib::Color> _colorLookupTable;
70 
71 private:
72  std::size_t GetIndexByName( std::string const& name );
73 
74  std::map<std::string, vtkIdType> _id_map;
75 };
Definition of the Color class.
Definition of the StationBorehole class.
Definition of the Station class.
Definition of the VtkAlgorithmProperties class.
Contains properties for the visualization of objects as VtkVisPipelineItems.
VTK source object for the visualisation of station data (including boreholes)
std::size_t GetIndexByName(std::string const &name)
std::map< std::string, DataHolderLib::Color > _colorLookupTable
void SetUserProperty(QString name, QVariant value) override
Sets a user property. This should be implemented by subclasses.
std::map< std::string, vtkIdType > _id_map
void setStations(const std::vector< GeoLib::Point * > *stations)
Sets a predefined color lookup table for the colouring of borehole stratigraphies.
const std::vector< GeoLib::Point * > * _stations
The stations to visualize.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Computes the polygonal data object.
static VtkStationSource * New()
Create new objects with New() because of VTKs object reference counting.
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
const std::map< std::string, DataHolderLib::Color > & getColorLookupTable() const
void PrintSelf(ostream &os, vtkIndent indent) override
Prints its data on a stream.
vtkTypeMacro(VtkStationSource, vtkPolyDataAlgorithm)