Volume Cartographer 2.27.0
Public Types | Public Member Functions | Static Public Member Functions | List of all members
volcart::Segmentation Class Reference

Segmentation data. More...

#include <vc/core/types/Segmentation.hpp>

Inheritance diagram for volcart::Segmentation:
[legend]
Collaboration diagram for volcart::Segmentation:
[legend]

Public Types

using PointSet = OrderedPointSet< cv::Vec3d >
 
using Pointer = std::shared_ptr< Segmentation >
 
- Public Types inherited from volcart::DiskBasedObjectBaseClass
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.
 
- Public Member Functions inherited from volcart::DiskBasedObjectBaseClass
 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

- Protected Member Functions inherited from volcart::DiskBasedObjectBaseClass
 DiskBasedObjectBaseClass (filesystem::path path)
 
 DiskBasedObjectBaseClass (filesystem::path path, Identifier uuid, std::string name)
 
- Protected Attributes inherited from volcart::DiskBasedObjectBaseClass
Metadata metadata_
 
filesystem::path path_
 

Detailed Description

Segmentation data.

Author
Seth Parker

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.

Member Typedef Documentation

◆ Pointer

using volcart::Segmentation::Pointer = std::shared_ptr<Segmentation>

Shared pointer type

Definition at line 36 of file Segmentation.hpp.

◆ PointSet

Point set type

Definition at line 33 of file Segmentation.hpp.

Member Function Documentation

◆ getAnnotationSet()

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.

◆ getPointSet()

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.

◆ hasAnnotationSet()

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.

◆ hasPointSet()

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.

◆ hasVolumeID()

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.

◆ New() [1/2]

static auto volcart::Segmentation::New ( const filesystem::path &  path) -> Pointer
static

◆ New() [2/2]

static auto volcart::Segmentation::New ( const filesystem::path &  path,
const Identifier uuid,
const std::string &  name 
) -> Pointer
static

◆ setAnnotationSet()

void volcart::Segmentation::setAnnotationSet ( const AnnotationSet as)

Save AnnotationSet to the Segmentation file.

Warning
This will overwrite the AnnotationSet file associated with this Segmentation.

◆ setPointSet()

void volcart::Segmentation::setPointSet ( const PointSet ps)

Save a PointSet to the Segmentation file.

Warning
This will overwrite the PointSet file associated with this Segmentation.

The documentation for this class was generated from the following file: