OGS
|
The dialog for converting data from NetCDF-files into OGS data structures. While NetCDF files can include data ranging from dimensionality 0 (scalars) to 4 (e.g. 3d arrays over time), only arrays of dimensionality 2 or higher can be imported as this is the minimum requirement for a meaningful conversion into raster- or mesh-data-objects. Scalars or vector-variables are not selectable from the selection menu.
Definition at line 29 of file NetCdfConfigureDialog.h.
#include <NetCdfConfigureDialog.h>
Public Member Functions | |
NetCdfConfigureDialog (const std::string &fileName, QDialog *parent=nullptr) | |
~NetCdfConfigureDialog () override | |
MeshLib::Mesh * | getMesh () |
std::string | getName () |
VtkGeoImageSource * | getRaster () |
Private Slots | |
void | accept () override |
void | reject () override |
void | on_comboBoxVariable_currentIndexChanged (int id) |
void | on_comboBoxDim1_currentIndexChanged (int id) |
void | on_comboBoxDim2_currentIndexChanged (int id) |
void | on_comboBoxDim3_currentIndexChanged (int id) |
void | on_comboBoxDim4_currentIndexChanged (int id) |
void | on_radioMesh_toggled (bool isTrue) |
Private Member Functions | |
int | setVariableSelect () |
void | setDimensionSelect () |
void | getDimEdges (std::string const &name, unsigned &size, double &firstValue, double &lastValue) |
void | createDataObject () |
int | getTimeStep () const |
int | getDim4 () const |
double | getResolution () |
QString | setName () |
void | reverseNorthSouth (double *data, std::size_t width, std::size_t height) |
Private Attributes | |
netCDF::NcFile | _currentFile |
netCDF::NcVar | _currentVar |
std::unique_ptr< MeshLib::Mesh > | _currentMesh |
VtkGeoImageSource * | _currentRaster |
std::string | _currentPath |
|
explicit |
Definition at line 28 of file NetCdfConfigureDialog.cpp.
References _currentFile, _currentVar, setDimensionSelect(), setName(), and setVariableSelect().
|
override |
Definition at line 53 of file NetCdfConfigureDialog.cpp.
References _currentMesh.
|
overrideprivateslot |
Definition at line 59 of file NetCdfConfigureDialog.cpp.
References _currentVar, and createDataObject().
|
private |
Definition at line 283 of file NetCdfConfigureDialog.cpp.
References _currentMesh, _currentRaster, _currentVar, MeshToolsLib::RasterToMesh::convert(), MeshLib::DATAVECTOR, MeshLib::ELEVATION, getDim4(), getDimEdges(), getName(), getTimeStep(), VtkRaster::loadImageFromArray(), VtkGeoImageSource::New(), MeshLib::QUAD, reverseNorthSouth(), VtkGeoImageSource::setImage(), and MeshLib::TRIANGLE.
Referenced by accept().
|
private |
Definition at line 247 of file NetCdfConfigureDialog.cpp.
References _currentFile.
Referenced by createDataObject().
|
private |
Definition at line 224 of file NetCdfConfigureDialog.cpp.
References _currentFile.
Referenced by createDataObject(), getResolution(), on_comboBoxDim1_currentIndexChanged(), on_comboBoxDim2_currentIndexChanged(), on_comboBoxDim3_currentIndexChanged(), and on_comboBoxDim4_currentIndexChanged().
|
inline |
Definition at line 37 of file NetCdfConfigureDialog.h.
References _currentMesh.
Referenced by MainWindow::loadFile().
std::string NetCdfConfigureDialog::getName | ( | ) |
Definition at line 378 of file NetCdfConfigureDialog.cpp.
Referenced by createDataObject(), and MainWindow::loadFile().
|
inline |
Definition at line 39 of file NetCdfConfigureDialog.h.
References _currentRaster.
Referenced by VtkCompositeTextureOnSurfaceFilter::init(), and MainWindow::loadFile().
|
private |
Definition at line 261 of file NetCdfConfigureDialog.cpp.
References _currentFile, and getDimEdges().
Referenced by on_comboBoxDim1_currentIndexChanged().
|
private |
Definition at line 242 of file NetCdfConfigureDialog.cpp.
Referenced by createDataObject().
|
privateslot |
Definition at line 100 of file NetCdfConfigureDialog.cpp.
References getDimEdges(), and getResolution().
Referenced by setDimensionSelect().
|
privateslot |
Definition at line 112 of file NetCdfConfigureDialog.cpp.
References _currentVar, and getDimEdges().
Referenced by setDimensionSelect().
|
privateslot |
Definition at line 126 of file NetCdfConfigureDialog.cpp.
References _currentVar, getDimEdges(), and setName().
Referenced by setDimensionSelect().
|
privateslot |
Definition at line 142 of file NetCdfConfigureDialog.cpp.
References _currentVar, and getDimEdges().
Referenced by setDimensionSelect().
|
privateslot |
Definition at line 92 of file NetCdfConfigureDialog.cpp.
References _currentFile, _currentVar, and setDimensionSelect().
|
privateslot |
Definition at line 408 of file NetCdfConfigureDialog.cpp.
|
overrideprivateslot |
Definition at line 87 of file NetCdfConfigureDialog.cpp.
|
private |
Definition at line 386 of file NetCdfConfigureDialog.cpp.
Referenced by createDataObject().
|
private |
Definition at line 177 of file NetCdfConfigureDialog.cpp.
References _currentVar, on_comboBoxDim1_currentIndexChanged(), on_comboBoxDim2_currentIndexChanged(), on_comboBoxDim3_currentIndexChanged(), and on_comboBoxDim4_currentIndexChanged().
Referenced by NetCdfConfigureDialog(), and on_comboBoxVariable_currentIndexChanged().
|
private |
Definition at line 369 of file NetCdfConfigureDialog.cpp.
References _currentPath.
Referenced by NetCdfConfigureDialog(), and on_comboBoxDim3_currentIndexChanged().
|
private |
Fills the combobox with all applicable variables and returns the index of the first variable with the highest dimension.
Definition at line 156 of file NetCdfConfigureDialog.cpp.
References _currentFile.
Referenced by NetCdfConfigureDialog().
|
private |
Definition at line 67 of file NetCdfConfigureDialog.h.
Referenced by NetCdfConfigureDialog(), getDim4(), getDimEdges(), getResolution(), on_comboBoxVariable_currentIndexChanged(), and setVariableSelect().
|
private |
Definition at line 69 of file NetCdfConfigureDialog.h.
Referenced by ~NetCdfConfigureDialog(), createDataObject(), and getMesh().
|
private |
Definition at line 71 of file NetCdfConfigureDialog.h.
Referenced by setName().
|
private |
Definition at line 70 of file NetCdfConfigureDialog.h.
Referenced by createDataObject(), and getRaster().
|
private |
Definition at line 68 of file NetCdfConfigureDialog.h.
Referenced by NetCdfConfigureDialog(), accept(), createDataObject(), on_comboBoxDim2_currentIndexChanged(), on_comboBoxDim3_currentIndexChanged(), on_comboBoxDim4_currentIndexChanged(), on_comboBoxVariable_currentIndexChanged(), and setDimensionSelect().