Volume Cartographer 2.27.0
|
Segmentation data. More...
#include <vc/core/types/Segmentation.hpp>
Public Types | |
using | PointSet = OrderedPointSet< cv::Vec3d > |
using | Pointer = std::shared_ptr< Segmentation > |
![]() | |
using | Identifier = std::string |
Identifier type. More... | |
using | Description = std::pair< Identifier, std::string > |
Public Member Functions | |
Segmentation (filesystem::path path) | |
Load a Segmentation from file. | |
Segmentation (filesystem::path path, Identifier uuid, std::string name) | |
Make a new Segmentation in a directory. | |
auto | hasPointSet () const -> bool |
Return if this Segmentation has an associated PointSet file. More... | |
void | setPointSet (const PointSet &ps) |
Save a PointSet to the Segmentation file. More... | |
auto | getPointSet () const -> PointSet |
Load the associated PointSet from the Segmentation file. More... | |
auto | hasAnnotationSet () const -> bool |
Return if this Segmentation has an associated AnnotationSet file. More... | |
void | setAnnotationSet (const AnnotationSet &as) |
Save AnnotationSet to the Segmentation file. More... | |
auto | getAnnotationSet () const -> AnnotationSet |
Load the associated AnnotationSet from the Segmentation file. More... | |
auto | hasVolumeID () const -> bool |
Return whether this Segmentation is associated with a Volume. More... | |
auto | getVolumeID () const -> Volume::Identifier |
Get the ID of the Volume associated with this Segmentation. | |
void | setVolumeID (const Volume::Identifier &id) |
Set the ID of the Volume associated with this Segmentation. | |
![]() | |
DiskBasedObjectBaseClass ()=delete | |
Identifier | id () const |
Get the "unique" ID for the object. | |
auto | path () const -> filesystem::path |
Get the path to the object. | |
auto | name () const -> std::string |
Get the human-readable name for the object. | |
void | setName (std::string n) |
Set the human-readable name of the object. | |
template<typename T > | |
void | setMetadataEntry (const std::string &key, T value) |
Set a metadata entry. More... | |
template<typename T > | |
auto | getMetadataEntry (const std::string &key) const -> std::optional< T > |
Get a metadata entry. More... | |
void | saveMetadata () const |
Update metadata on disk. | |
Static Public Member Functions | |
static auto | New (const filesystem::path &path) -> Pointer |
static auto | New (const filesystem::path &path, const Identifier &uuid, const std::string &name) -> Pointer |
Additional Inherited Members | |
![]() | |
DiskBasedObjectBaseClass (filesystem::path path) | |
DiskBasedObjectBaseClass (filesystem::path path, Identifier uuid, std::string name) | |
![]() | |
Metadata | metadata_ |
filesystem::path | path_ |
Segmentation data.
Provides access to Segmentation information stored on disk, usually inside of a VolumePkg.
A Segmentation is generated within the coordinate frame of a Volume. Use the [has\|get\|set]VolumeID()
methods to retrieve the ID of the Volume with which the Segmentation is associated.
Definition at line 29 of file Segmentation.hpp.
using volcart::Segmentation::Pointer = std::shared_ptr<Segmentation> |
Shared pointer type
Definition at line 36 of file Segmentation.hpp.
using volcart::Segmentation::PointSet = OrderedPointSet<cv::Vec3d> |
Point set type
Definition at line 33 of file Segmentation.hpp.
auto volcart::Segmentation::getAnnotationSet | ( | ) | const -> AnnotationSet |
Load the associated AnnotationSet from the Segmentation file.
AnnotationSet data is never cached in memory and is always loaded from disk.
auto volcart::Segmentation::getPointSet | ( | ) | const -> PointSet |
Load the associated PointSet from the Segmentation file.
PointSet data is never cached in memory and is always loaded from disk.
auto volcart::Segmentation::hasAnnotationSet | ( | ) | const -> bool |
Return if this Segmentation has an associated AnnotationSet file.
Returns false if the metadata file has no vcano
entry, the vcano
entry is null
, or the vcps
entry is an empty string.
auto volcart::Segmentation::hasPointSet | ( | ) | const -> bool |
Return if this Segmentation has an associated PointSet file.
Returns false if the metadata file has no vcps
entry, the vcps
entry is null
, or the vcps
entry is an empty string.
auto volcart::Segmentation::hasVolumeID | ( | ) | const -> bool |
Return whether this Segmentation is associated with a Volume.
Returns false if the metadata file has no volume
entry, the volume
entry is null
, or the volume
entry is an empty string.
|
static |
|
static |
void volcart::Segmentation::setAnnotationSet | ( | const AnnotationSet & | as | ) |
Save AnnotationSet to the Segmentation file.
void volcart::Segmentation::setPointSet | ( | const PointSet & | ps | ) |
Save a PointSet to the Segmentation file.