Info Class Reference

Accessor for human profile files. More...

#include <VisionX/libraries/armem_human/Info.h>

Public Types

using path = std::filesystem::path
 
using Person = armarx::human::arondto::Person
 

Public Member Functions

virtual bool checkPaths () const
 Checks the existence of expected files.
 
PackagePath faceImageDir () const
 
std::vector< path > faceImagePaths (const std::vector< std::string > &extensions={".png", ".jpg"}) const
 
std::vector< PackagePath > faceImages (const std::vector< std::string > &extensions={".png", ".jpg"}) const
 
PackagePath file (const std::string &extension, const std::string &suffix="") const
 
bool hasPackage () const
 
std::string id () const
 
 Info (const path &absoluteDirectory, const std::string &id)
 A profile outside an ArmarX package.
 
 Info (const std::string &packageName, const path &absPackageDataDir, const path &relativePath, const std::string &id)
 Info.
 
std::optional< Person > loadProfile (const bool loadFaceImages=true) const
 
std::string package () const
 Empty for a profile outside a package.
 
path profileDirectory () const
 The directory of this profile (containing profile.json).
 
PackagePath profileJson () const
 
path profileJsonPath () const
 
void setLogError (bool enabled)
 
PackagePath sub_directory (const std::string &suffix) const
 
virtual ~Info ()=default
 

Detailed Description

Accessor for human profile files.

Member Typedef Documentation

◆ path

using path = std::filesystem::path

◆ Person

using Person = armarx::human::arondto::Person

Constructor & Destructor Documentation

◆ Info() [1/2]

Info ( const std::string & packageName,
const path & absPackageDataDir,
const path & relativePath,
const std::string & id )

Info.

Parameters
packageNameThe ArmarX package.
absPackageDataDirAbsolute path to the package's data directory.
relativePathThe path where human profiles are stored in the data directory.
idThe human profile ID.

◆ Info() [2/2]

Info ( const path & absoluteDirectory,
const std::string & id )

A profile outside an ArmarX package.

Its files have no package path, so the face images of the loaded profile have no filepath.

Parameters
absoluteDirectoryThe directory containing the profile directories.
idThe human profile ID (the name of its directory).

◆ ~Info()

virtual ~Info ( )
virtualdefault

Member Function Documentation

◆ checkPaths()

bool checkPaths ( ) const
virtual

Checks the existence of expected files.

If a file is does not exist, emits a warning returns false.

Returns
True if all existing files are found, false otherwise.

◆ faceImageDir()

PackagePath faceImageDir ( ) const

◆ faceImagePaths()

std::vector< Info::path > faceImagePaths ( const std::vector< std::string > & extensions = {".png", ".jpg"}) const

◆ faceImages()

std::vector< PackagePath > faceImages ( const std::vector< std::string > & extensions = {".png", ".jpg"}) const

◆ file()

PackagePath file ( const std::string & extension,
const std::string & suffix = "" ) const

◆ hasPackage()

bool hasPackage ( ) const

◆ id()

std::string id ( ) const

◆ loadProfile()

std::optional< Info::Person > loadProfile ( const bool loadFaceImages = true) const

◆ package()

std::string package ( ) const

Empty for a profile outside a package.

◆ profileDirectory()

Info::path profileDirectory ( ) const

The directory of this profile (containing profile.json).

◆ profileJson()

PackagePath profileJson ( ) const

◆ profileJsonPath()

Info::path profileJsonPath ( ) const

◆ setLogError()

void setLogError ( bool enabled)

◆ sub_directory()

PackagePath sub_directory ( const std::string & suffix) const

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