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 
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
IsAscii write_ascii
Compressed compressed
std::string filename
#define CV_IO_LIB_API
Definition: CV_io.h:15
filament::Texture::InternalFormat format
VoxelGrid is a collection of voxels which are aligned in grid.
Definition: VoxelGrid.h:64
bool WriteVoxelGridToPLY(const std::string &filename, const geometry::VoxelGrid &voxelgrid, bool write_ascii=false, bool compressed=false, bool print_progress=false)
bool WriteVoxelGrid(const std::string &filename, const geometry::VoxelGrid &voxelgrid, bool write_ascii=false, bool compressed=false, bool print_progress=false)
std::shared_ptr< geometry::VoxelGrid > CreateVoxelGridFromFile(const std::string &filename, const std::string &format="auto", bool print_progress=false)
bool ReadVoxelGridFromPLY(const std::string &filename, geometry::VoxelGrid &voxelgrid, bool print_progress=false)
bool ReadVoxelGrid(const std::string &filename, geometry::VoxelGrid &voxelgrid, const std::string &format="auto", bool print_progress=false)
Generic file read and write utility for python interface.