OGS
NetCdfConfigureDialog.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 <QDialog>
7#include <netcdf>
8
9#include "MeshLib/Mesh.h"
10#include "ui_NetCdfConfigure.h"
11
13
22class NetCdfConfigureDialog : public QDialog, private Ui_NetCdfConfigure
23{
24 Q_OBJECT
25
26public:
27 explicit NetCdfConfigureDialog(const std::string& fileName,
28 QDialog* parent = nullptr);
29 ~NetCdfConfigureDialog() override;
30 MeshLib::Mesh* getMesh() { return _currentMesh.get(); };
31 std::string getName();
33
34private slots:
35 void accept() override;
36 void reject() override;
42 void on_radioMesh_toggled(bool isTrue);
43
44private:
48 void setDimensionSelect();
49 void getDimEdges(std::string const& name,
50 unsigned& size,
51 double& firstValue,
52 double& lastValue);
53 void createDataObject();
54 int getTimeStep() const;
55 int getDim4() const;
56 double getResolution();
57 QString setName();
58 void reverseNorthSouth(double* data, std::size_t width, std::size_t height);
59
60 netCDF::NcFile _currentFile;
61 netCDF::NcVar _currentVar;
62 std::unique_ptr<MeshLib::Mesh> _currentMesh;
64 std::string _currentPath;
65};
VtkGeoImageSource * _currentRaster
void on_comboBoxDim3_currentIndexChanged(int id)
VtkGeoImageSource * getRaster()
void on_radioMesh_toggled(bool isTrue)
std::unique_ptr< MeshLib::Mesh > _currentMesh
void on_comboBoxVariable_currentIndexChanged(int id)
void reverseNorthSouth(double *data, std::size_t width, std::size_t height)
void on_comboBoxDim1_currentIndexChanged(int id)
NetCdfConfigureDialog(const std::string &fileName, QDialog *parent=nullptr)
void on_comboBoxDim2_currentIndexChanged(int id)
void getDimEdges(std::string const &name, unsigned &size, double &firstValue, double &lastValue)
void on_comboBoxDim4_currentIndexChanged(int id)
The VtkVisPipeline source object of a geo-referenced image (file).