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
colmap::CreateDirIfNotExists
void CreateDirIfNotExists(const std::string &path)
Definition: misc.cc:112
cloudViewer::core::make_pair
CLOUDVIEWER_HOST_DEVICE Pair< First, Second > make_pair(const First &_first, const Second &_second)
Definition: SlabTraits.h:49
option_manager.h
colmap::OptionManager
Definition: option_manager.h:38
colmap::JoinPaths
std::string JoinPaths(T const &... paths)
Definition: misc.h:128
cloudViewer::OptionManager
colmap::OptionManager OptionManager
Definition: BundleAdjustmentWidget.h:19
colmap::ReconstructionManager::Get
const Reconstruction & Get(const size_t idx) const
Definition: reconstruction_manager.cc:56
colmap::ReconstructionManager::Clear
void Clear()
Definition: reconstruction_manager.cc:75
colmap::ReconstructionManager::Add
size_t Add()
Definition: reconstruction_manager.cc:64
colmap::Reconstruction
Definition: reconstruction.h:40
cloudViewer::t::geometry::path
static const std::string path
Definition: PointCloud.cpp:59
misc.h
colmap::ReconstructionManager::Write
void Write(const std::string &path, const OptionManager *options) const
Definition: reconstruction_manager.cc:83
reconstruction.h
colmap::ReconstructionManager::Delete
void Delete(const size_t idx)
Definition: reconstruction_manager.cc:70
colmap::ReconstructionManager
Definition: reconstruction_manager.h:16
colmap::ReconstructionManager::operator=
ReconstructionManager & operator=(ReconstructionManager &&other)
Definition: reconstruction_manager.cc:46
NON_COPYABLE
#define NON_COPYABLE(class_name)
Definition: types.h:30
reconstruction_manager.h
colmap::OptionManager::Write
void Write(const std::string &path) const
Definition: option_manager.cc:966
colmap
Definition: AutomaticReconstructionController.h:17
colmap::ReconstructionManager::Read
size_t Read(const std::string &path)
Definition: reconstruction_manager.cc:77
patch::to_string
std::string to_string(const T &n)
Definition: Common.h:20
colmap::ReconstructionManager::Size
size_t Size() const
Definition: reconstruction_manager.cc:54
colmap::ReconstructionManager::ReconstructionManager
ReconstructionManager()
Definition: reconstruction_manager.cc:39