ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
reconstruction_manager.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 "base/reconstruction.h"
11 
12 namespace colmap {
13 
14 class OptionManager;
15 
17 public:
19 
20  // Move constructor and assignment.
23 
24  // The number of reconstructions managed.
25  size_t Size() const;
26 
27  // Get a reference to a specific reconstruction.
28  const Reconstruction& Get(const size_t idx) const;
29  Reconstruction& Get(const size_t idx);
30 
31  // Add a new empty reconstruction and return its index.
32  size_t Add();
33 
34  // Delete a specific reconstruction.
35  void Delete(const size_t idx);
36 
37  // Delete all reconstructions.
38  void Clear();
39 
40  // Read and add a new reconstruction and return its index.
41  size_t Read(const std::string& path);
42 
43  // Write all managed reconstructions into sub-folders "0", "1", "2", ...
44  // If the option manager object is not null, the options are written
45  // to each respective reconstruction folder as well.
46  void Write(const std::string& path, const OptionManager* options) const;
47 
48 private:
50 
51  std::vector<std::unique_ptr<Reconstruction>> reconstructions_;
52 };
53 
54 } // namespace colmap
ReconstructionManager & operator=(ReconstructionManager &&other)
const Reconstruction & Get(const size_t idx) const
size_t Read(const std::string &path)
void Write(const std::string &path, const OptionManager *options) const
static const std::string path
Definition: PointCloud.cpp:59
colmap::OptionManager OptionManager
#define NON_COPYABLE(class_name)
Definition: types.h:30