11#include <opencv2/core/mat.hpp>
72 const std::filesystem::path&
getPath() const noexcept;
88 std::vector<
int>
getNodeIds(
bool ignoreChildren = false) const;
118 std::map<
int,
rtabmap::Transform>& poses,
119 std::multimap<
int,
rtabmap::Link>& links,
120 std::map<
int,
rtabmap::Signature>* signatures =
nullptr,
121 bool optimized = true,
122 bool withImages = false,
123 bool withScan = false) const;
160 void saveLabels(
int nodeId, const
cv::Mat& labels,
bool autoRotate = true);
174 const std::vector<
cv::Mat>& labels,
175 bool autoRotate = true);
180 std::unique_ptr<Impl> impl_;
RTABMapDatabase(std::filesystem::path dbPath, bool readOnly=false)
Opens an RTABMap database and validates its schema.
const std::filesystem::path & getPath() const noexcept
Get the path to the database file.
RTABMapDatabase & operator=(const RTABMapDatabase &)=delete
cv::Mat getImage(int nodeId) const
Get image data for a specific node.
bool isOpen() const noexcept
Check if database connection is open.
bool hasSegmentation(int nodeId) const
Check if a node has segmentation labels stored.
~RTABMapDatabase()
Destructor closes database connection.
RTABMapDatabase(RTABMapDatabase &&) noexcept
std::vector< int > getNodeIds(bool ignoreChildren=false) const
Get list of all node IDs in the database.
void getGraph(std::map< int, rtabmap::Transform > &poses, std::multimap< int, rtabmap::Link > &links, std::map< int, rtabmap::Signature > *signatures=nullptr, bool optimized=true, bool withImages=false, bool withScan=false) const
Retrieve the SLAM graph (poses, links, signatures).
RTABMapDatabase(const RTABMapDatabase &)=delete
void saveLabels(int nodeId, const cv::Mat &labels, bool autoRotate=true)
Save segmentation labels for a single node.
void validateSchema() const
Validate that required RTABMap tables exist.
cv::Mat getLabels(int nodeId) const
Get segmentation labels for a node.