2#include <ufo/io/file_type.hpp>
3#include <ufo/utility/string.hpp>
8#include <unordered_map>
14static std::unordered_map<std::string, FileType>
const extension_map{
33 std::string ext =
tolower(file.extension().string());
35 if (
auto it = io::extension_map.find(ext); io::extension_map.end() != it) {
All vision-related classes and functions.
std::string tolower(std::string s)
Converts all characters in the string to lowercase.
FileType
Enumerates all file formats supported by the UFO I/O subsystem.
@ XYZRGB
ASCII XYZ + RGB colour (.xyzrgb).
@ XYZN
ASCII XYZ + surface normal (.xyzn).
@ XYZI
ASCII XYZ + intensity (.xyzi).
@ PLY
Stanford PLY mesh / point cloud (.ply).
@ PNG
PNG lossless image (.png).
@ PCD
PCL Point Cloud Data (.pcd).
@ UNKNOWN
Unrecognised or missing file extension.
@ PTS
Leica PTS point cloud (.pts).
@ QTP
UFO quantised-tree point-cloud format (.qtp).
@ JPEG
JPEG compressed image (.jpeg, .jpg).
@ UFO
Native UFOMap binary format (.ufo).
@ XYZ
ASCII XYZ point cloud (.xyz).
@ OBJ
Wavefront OBJ (.obj).
FileType fileType(std::filesystem::path const &file)
Infers the FileType from the extension of file (case-insensitive).