43 static std::unique_ptr<MeshLib::Mesh>
convert(
47 std::string
const& array_name =
"Colour");
60 static std::unique_ptr<MeshLib::Mesh>
convert(
62 const double origin[3],
63 const double scalingFactor,
66 std::string
const& array_name =
"Colour");
78 static std::unique_ptr<MeshLib::Mesh>
convert(
79 const double*
const img,
83 std::string
const& array_name =
"Colour");
89 double const*
const img,
93 for (std::size_t k = 0; k < header.
n_depth; k++)
95 std::size_t
const layer_idx = (k*header.
n_rows*header.
n_cols);
96 for (std::size_t i = 0; i < header.
n_cols; i++)
98 std::size_t idx(i * header.
n_rows + layer_idx);
99 for (std::size_t j = 0; j < header.
n_rows; j++)
101 auto val(
static_cast<T
>(img[idx + j]));
102 prop_vec.push_back(val);
106 prop_vec.push_back(val);
Definition of mesh-related Enumerations.
Definition of the class Properties that implements a container of properties.
Definition of the GeoLib::Raster class.
Class Raster is used for managing raster data.
Converts raster data into an OGS mesh.
static void fillPropertyVector(MeshLib::PropertyVector< T > &prop_vec, double const *const img, GeoLib::RasterHeader const &header, MeshElemType elem_type)
static std::unique_ptr< MeshLib::Mesh > convert(GeoLib::Raster const &raster, MeshElemType elem_type, UseIntensityAs intensity_type, std::string const &array_name="Colour")
UseIntensityAs
Selection of possible interpretations for intensities.
MeshElemType
Types of mesh elements supported by OpenGeoSys. Values are from VTKCellType enum.