Blue Brain BioExplorer
bioexplorer::io::CacheLoader Class Reference

#include <CacheLoader.h>

Inheritance diagram for bioexplorer::io::CacheLoader:
Collaboration diagram for bioexplorer::io::CacheLoader:

Public Member Functions

 CacheLoader (core::Scene &scene, core::PropertyMap &&loaderParams={})
 Construct a new Bio Explorer Loader object. More...
 
std::string getName () const final
 Get the name of the loader. More...
 
strings getSupportedStorage () const final
 Get the list of extensions supported by loaded. More...
 
bool isSupported (const std::string &storage, const std::string &extension) const final
 Returns whever a file extention is supported by the loader. More...
 
core::PropertyMap getProperties () const final
 Returns the list of loader properties. More...
 
core::ModelDescriptorPtr importFromBlob (core::Blob &&blob, const core::LoaderProgress &callback, const core::PropertyMap &properties) const final
 Imports a 3D scene from an in-memory blob storage. More...
 
core::ModelDescriptorPtr importFromStorage (const std::string &storage, const core::LoaderProgress &callback, const core::PropertyMap &properties) const final
 Imports a 3D scene from file. More...
 
std::vector< core::ModelDescriptorPtrimportModelsFromFile (const std::string &filename, const int32_t brickId=UNDEFINED_BOX_ID, const core::LoaderProgress &callback=core::LoaderProgress(), const core::PropertyMap &properties=core::PropertyMap()) const
 
void exportToFile (const std::string &filename, const core::Boxd &bounds) const
 Exports an optimized binary representation the 3D scene to a file. More...
 
std::vector< core::ModelDescriptorPtrimportBrickFromDB (const int32_t brickId) const
 
void exportBrickToDB (const int32_t brickId, const core::Boxd &bounds) const
 Exports an optimized binary representation the 3D scene to a DB. More...
 
void exportToXYZ (const std::string &filename, const common::XYZFileFormat format) const
 Exports atom information from the 3D scene to a file. More...
 
- Public Member Functions inherited from core::Loader
 Loader (Scene &scene)
 
virtual ~Loader ()=default
 

Static Public Member Functions

static core::PropertyMap getCLIProperties ()
 Returns the list of loader command line arguments. More...
 

Additional Inherited Members

- Protected Attributes inherited from core::Loader
Scene_scene
 

Detailed Description

Load molecular systems from an optimized binary representation of the 3D scene

Definition at line 40 of file CacheLoader.h.

Constructor & Destructor Documentation

◆ CacheLoader()

bioexplorer::io::CacheLoader::CacheLoader ( core::Scene scene,
core::PropertyMap &&  loaderParams = {} 
)

Construct a new Bio Explorer Loader object.

Parameters
sceneScene to which the file contents should be loaded
loaderParamsLoader parameters

Definition at line 67 of file CacheLoader.cpp.

Member Function Documentation

◆ exportBrickToDB()

void bioexplorer::io::CacheLoader::exportBrickToDB ( const int32_t  brickId,
const core::Boxd bounds 
) const

Exports an optimized binary representation the 3D scene to a DB.

Definition at line 770 of file CacheLoader.cpp.

◆ exportToFile()

void bioexplorer::io::CacheLoader::exportToFile ( const std::string &  filename,
const core::Boxd bounds 
) const

Exports an optimized binary representation the 3D scene to a file.

Parameters
filenameFull path of the file

Definition at line 725 of file CacheLoader.cpp.

◆ exportToXYZ()

void bioexplorer::io::CacheLoader::exportToXYZ ( const std::string &  filename,
const common::XYZFileFormat  format 
) const

Exports atom information from the 3D scene to a file.

Parameters
filenameFull path of the file
formatFile format to be used for the export

Definition at line 786 of file CacheLoader.cpp.

◆ getCLIProperties()

PropertyMap bioexplorer::io::CacheLoader::getCLIProperties ( )
static

Returns the list of loader command line arguments.

Returns
The list of loader command line arguments

Definition at line 862 of file CacheLoader.cpp.

◆ getName()

std::string bioexplorer::io::CacheLoader::getName ( ) const
finalvirtual

Get the name of the loader.

Returns
A string containing the name of the loader

Implements core::Loader.

Definition at line 73 of file CacheLoader.cpp.

◆ getProperties()

PropertyMap bioexplorer::io::CacheLoader::getProperties ( ) const
finalvirtual

Returns the list of loader properties.

Returns
The list of loader properties

Reimplemented from core::Loader.

Definition at line 857 of file CacheLoader.cpp.

◆ getSupportedStorage()

std::vector< std::string > bioexplorer::io::CacheLoader::getSupportedStorage ( ) const
finalvirtual

Get the list of extensions supported by loaded.

Returns
The list of extensions supported by loaded

Implements core::Loader.

Definition at line 78 of file CacheLoader.cpp.

◆ importBrickFromDB()

std::vector< ModelDescriptorPtr > bioexplorer::io::CacheLoader::importBrickFromDB ( const int32_t  brickId) const
Parameters
brickId
Returns
std::vector<ModelDescriptorPtr>

Definition at line 752 of file CacheLoader.cpp.

◆ importFromBlob()

ModelDescriptorPtr bioexplorer::io::CacheLoader::importFromBlob ( core::Blob &&  blob,
const core::LoaderProgress callback,
const core::PropertyMap properties 
) const
finalvirtual

Imports a 3D scene from an in-memory blob storage.

Parameters
blobIn-memory blob storage
callbackCallback object providing the status of the loading process
propertiesLoader properties
Returns
A core model if loading is successful

Implements core::Loader.

Definition at line 89 of file CacheLoader.cpp.

◆ importFromStorage()

ModelDescriptorPtr bioexplorer::io::CacheLoader::importFromStorage ( const std::string &  storage,
const core::LoaderProgress callback,
const core::PropertyMap properties 
) const
finalvirtual

Imports a 3D scene from file.

Parameters
filenameFull path of the file
callbackCallback object providing the status of the loading process
propertiesLoader properties
Returns
A core model if loading is successful

Implements core::Loader.

Definition at line 418 of file CacheLoader.cpp.

◆ importModelsFromFile()

std::vector< ModelDescriptorPtr > bioexplorer::io::CacheLoader::importModelsFromFile ( const std::string &  filename,
const int32_t  brickId = UNDEFINED_BOX_ID,
const core::LoaderProgress callback = core::LoaderProgress(),
const core::PropertyMap properties = core::PropertyMap() 
) const
Parameters
filename
callback
properties
Returns
std::vector<ModelDescriptorPtr>

Definition at line 379 of file CacheLoader.cpp.

◆ isSupported()

bool bioexplorer::io::CacheLoader::isSupported ( const std::string &  storage,
const std::string &  extension 
) const
finalvirtual

Returns whever a file extention is supported by the loader.

Parameters
filenameName of the file
extensionExtension of the file
Returns
true if the file extension is supported by the loader, false otherwise

Implements core::Loader.

Definition at line 83 of file CacheLoader.cpp.


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