Wildmeshing Toolkit
|
Classes | |
class | InputOptions |
Functions | |
std::shared_ptr< Mesh > | input (const std::filesystem::path &file, const bool ignore_z_if_zero, const std::vector< std::string > &tetrahedron_attributes) |
multimesh::NamedMultiMesh | input (const InputOptions &options) |
multimesh::NamedMultiMesh | input (const InputOptions &options, const components::utils::PathResolver &resolver) |
Eigen::Matrix< int64_t, -1, -1 > | tags_from_image (const std::filesystem::path &file) |
std::shared_ptr< wmtk::TriMesh > | mesh_with_tag_from_image (const std::filesystem::path &file, const std::string &tag_name) |
Build a tagged triangle mesh from a greyscale image. More... | |
multimesh::NamedMultiMesh wmtk::components::input::input | ( | const InputOptions & | options | ) |
multimesh::NamedMultiMesh wmtk::components::input::input | ( | const InputOptions & | options, |
const components::utils::PathResolver & | resolver | ||
) |
Definition at line 32 of file input.cpp.
References wmtk::components::input::InputOptions::file, wmtk::components::utils::PathResolver::get_paths(), wmtk::components::input::InputOptions::ignore_z_if_zero, wmtk::components::input::InputOptions::imported_attributes, wmtk::log_and_throw_error(), wmtk::components::input::InputOptions::name_spec, wmtk::components::input::InputOptions::name_spec_file, wmtk::components::input::InputOptions::old_mode, wmtk::io::read_mesh(), wmtk::components::utils::PathResolver::resolve(), wmtk::components::multimesh::NamedMultiMesh::set_mesh(), and wmtk::components::multimesh::NamedMultiMesh::set_names().
std::shared_ptr< Mesh > wmtk::components::input::input | ( | const std::filesystem::path & | file, |
const bool | ignore_z_if_zero, | ||
const std::vector< std::string > & | tetrahedron_attributes | ||
) |
Definition at line 12 of file input.cpp.
References wmtk::components::input::InputOptions::file, wmtk::components::input::InputOptions::ignore_z_if_zero, wmtk::components::input::InputOptions::imported_attributes, and wmtk::components::input::InputOptions::old_mode.
Referenced by wmtk::utils::metaprogramming::detail::ReferenceWrappedFunctorReturnCache< Functor, BaseVariantTraitsType, ComparatorType, OtherArgumentTypes >::add(), wmtk::operations::internal::SplitAlternateFacetOptionData::boundary_indices(), wmtk::utils::metaprogramming::detail::ReferenceWrappedFunctorReturnCache< Functor, BaseVariantTraitsType, ComparatorType, OtherArgumentTypes >::get(), wmtk::utils::metaprogramming::detail::ReferenceWrappedFunctorReturnCache< Functor, BaseVariantTraitsType, ComparatorType, OtherArgumentTypes >::get_id(), wmtk::utils::metaprogramming::detail::ReferenceWrappedFunctorReturnCache< Functor, BaseVariantTraitsType, ComparatorType, OtherArgumentTypes >::get_variant(), wmtk::utils::metaprogramming::detail::ReferenceWrappedFunctorReturnCache< Functor, BaseVariantTraitsType, ComparatorType, OtherArgumentTypes >::has_variant(), input(), and TEST_CASE().
std::shared_ptr< wmtk::TriMesh > wmtk::components::input::mesh_with_tag_from_image | ( | const std::filesystem::path & | file, |
const std::string & | tag_name | ||
) |
Build a tagged triangle mesh from a greyscale image.
For each pixel, two triangles are generated. The function was only tested on .png but might also support .jpg. Support for .exr and .tif might be added in the future.
file | path to the image |
tag_name | attribute name for the face tag representing the images greyscale value |
Definition at line 35 of file mesh_with_tag_from_image.cpp.
References wmtk::mesh_utils::set_matrix_attribute(), tags_from_image(), wmtk::Triangle, and wmtk::Vertex.
Referenced by TEST_CASE().
Eigen::Matrix<int64_t, -1, -1> wmtk::components::input::tags_from_image | ( | const std::filesystem::path & | file | ) |
Definition at line 11 of file mesh_with_tag_from_image.cpp.
Referenced by mesh_with_tag_from_image().