ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
VoxelGridIO.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <VoxelGrid.h>
11 
12 #include <string>
13 
14 #include "CV_io.h"
15 
16 namespace cloudViewer {
17 namespace io {
18 
21 std::shared_ptr<geometry::VoxelGrid> CV_IO_LIB_API
22 CreateVoxelGridFromFile(const std::string &filename,
23  const std::string &format = "auto",
24  bool print_progress = false);
25 
29 bool CV_IO_LIB_API ReadVoxelGrid(const std::string &filename,
30  geometry::VoxelGrid &voxelgrid,
31  const std::string &format = "auto",
32  bool print_progress = false);
33 
39 bool CV_IO_LIB_API WriteVoxelGrid(const std::string &filename,
40  const geometry::VoxelGrid &voxelgrid,
41  bool write_ascii = false,
42  bool compressed = false,
43  bool print_progress = false);
44 
45 bool CV_IO_LIB_API ReadVoxelGridFromPLY(const std::string &filename,
46  geometry::VoxelGrid &voxelgrid,
47  bool print_progress = false);
48 
49 bool CV_IO_LIB_API WriteVoxelGridToPLY(const std::string &filename,
50  const geometry::VoxelGrid &voxelgrid,
51  bool write_ascii = false,
52  bool compressed = false,
53  bool print_progress = false);
54 
55 } // namespace io
56 } // namespace cloudViewer
cloudViewer
Generic file read and write utility for python interface.
Definition: CloudViewerConfig.cpp:12
filename
std::string filename
Definition: PointCloudIO.cpp:47
format
filament::Texture::InternalFormat format
Definition: FilamentResourceManager.cpp:181
cloudViewer::io::WriteVoxelGrid
bool WriteVoxelGrid(const std::string &filename, const geometry::VoxelGrid &voxelgrid, bool write_ascii=false, bool compressed=false, bool print_progress=false)
Definition: VoxelGridIO.cpp:169
write_ascii
IsAscii write_ascii
Definition: PointCloudIO.cpp:48
cloudViewer::io::ReadVoxelGridFromPLY
bool ReadVoxelGridFromPLY(const std::string &filename, geometry::VoxelGrid &voxelgrid, bool print_progress=false)
Definition: VoxelGridIO.cpp:195
compressed
Compressed compressed
Definition: PointCloudIO.cpp:49
CV_io.h
CV_IO_LIB_API
#define CV_IO_LIB_API
Definition: CV_io.h:15
cloudViewer::io::CreateVoxelGridFromFile
std::shared_ptr< geometry::VoxelGrid > CreateVoxelGridFromFile(const std::string &filename, const std::string &format="auto", bool print_progress=false)
Definition: VoxelGridIO.cpp:132
cloudViewer::io::WriteVoxelGridToPLY
bool WriteVoxelGridToPLY(const std::string &filename, const geometry::VoxelGrid &voxelgrid, bool write_ascii=false, bool compressed=false, bool print_progress=false)
Definition: VoxelGridIO.cpp:286
cloudViewer::io::ReadVoxelGrid
bool ReadVoxelGrid(const std::string &filename, geometry::VoxelGrid &voxelgrid, const std::string &format="auto", bool print_progress=false)
Definition: VoxelGridIO.cpp:141