OGS
|
Converts raster data into an OGS mesh.
Definition at line 36 of file RasterToMesh.h.
#include <RasterToMesh.h>
Static Public Member Functions | |
static std::unique_ptr< MeshLib::Mesh > | convert (GeoLib::Raster const &raster, MeshLib::MeshElemType elem_type, MeshLib::UseIntensityAs intensity_type, std::string const &array_name="Colour") |
static std::unique_ptr< MeshLib::Mesh > | convert (vtkImageData *img, const double origin[3], const double scalingFactor, MeshLib::MeshElemType elem_type, MeshLib::UseIntensityAs intensity_type, std::string const &array_name="Colour") |
static std::unique_ptr< MeshLib::Mesh > | convert (const double *const img, GeoLib::RasterHeader const &header, MeshLib::MeshElemType elem_type, MeshLib::UseIntensityAs intensity_type, std::string const &array_name="Colour") |
Static Private Member Functions | |
template<typename T > | |
static void | fillPropertyVector (MeshLib::PropertyVector< T > &prop_vec, double const *const img, GeoLib::RasterHeader const &header, MeshLib::MeshElemType elem_type) |
|
static |
Converts double array with raster values into a mesh.
img | input image. |
header | raster header information. |
elem_type | defines if elements of the new mesh should be triangles or quads (or hexes for 3D). |
intensity_type | defines how image intensities are interpreted. |
array_name | mesh property name, defaults to "Colour" if not given. |
Definition at line 44 of file RasterToMesh.cpp.
References MeshLib::Cell, GeoLib::RasterHeader::cell_size, MeshLib::Properties::createNewPropertyVector(), MeshLib::ELEVATION, ERR(), MeshToolsLib::MeshGenerator::generateRegularHexMesh(), MeshToolsLib::MeshGenerator::generateRegularPrismMesh(), MeshToolsLib::MeshGenerator::generateRegularQuadMesh(), MeshToolsLib::MeshGenerator::generateRegularTriMesh(), MeshLib::ElementSearch::getSearchedElementIDs(), MeshLib::HEXAHEDRON, GeoLib::RasterHeader::n_cols, GeoLib::RasterHeader::n_depth, GeoLib::RasterHeader::n_rows, GeoLib::RasterHeader::no_data, MeshLib::NONE, GeoLib::RasterHeader::origin, MeshLib::PRISM, MeshLib::QUAD, MeshToolsLib::removeElements(), MeshLib::ElementSearch::searchByPropertyValue(), and MeshLib::TRIANGLE.
|
static |
Converts greyscale raster into a mesh.
raster | input raster. |
elem_type | defines if elements of the new mesh should be triangles or quads (or hexes for 3D). |
intensity_type | defines how image intensities are interpreted. |
array_name | mesh property name, defaults to "Colour" if not given. |
Definition at line 31 of file RasterToMesh.cpp.
References convert(), GeoLib::Raster::data(), and GeoLib::Raster::getHeader().
Referenced by convert(), convert(), NetCdfConfigureDialog::createDataObject(), main(), VtkVisPipelineView::showImageToMeshConversionDialog(), and writeDataToMesh().
|
static |
Converts a vtkImageData into a mesh.
img | input image. |
origin | coordinates of image's origin, lower left corner. |
scalingFactor | edge length of each pixel |
elem_type | defines if elements of the new mesh should be triangles or quads (or hexes for 3D). |
intensity_type | defines how image intensities are interpreted. |
array_name | mesh property name, defaults to "Colour" if not given. |
|
inlinestaticprivate |
Definition at line 92 of file RasterToMesh.h.
References GeoLib::RasterHeader::n_cols, GeoLib::RasterHeader::n_depth, GeoLib::RasterHeader::n_rows, MeshLib::PRISM, and MeshLib::TRIANGLE.