Inviwo
0.9.10.1
Inviwo documentation
|
The main application which holds the instances of all modules. More...
#include <inviwoapplication.h>
Classes | |
struct | Queue |
Public Types | |
enum | Message { Ok, Error } |
Public Member Functions | |
InviwoApplication (std::string displayName) | |
InviwoApplication (int argc, char **argv, std::string displayName) | |
InviwoApplication (const InviwoApplication &rhs)=delete | |
InviwoApplication & | operator= (const InviwoApplication &that)=delete |
virtual void | registerModules (std::vector< std::unique_ptr< InviwoModuleFactoryObject >> modules) |
Registers modules from factories and takes ownership of input module factories. Module is registered if dependencies exist and they have correct version. | |
virtual void | registerModules (RuntimeModuleLoading) |
Load modules from dynamic library files in the regular search paths. More... | |
std::string | getBasePath () const |
std::string | getPath (PathType pathType, const std::string &suffix="", const bool &createFolder=false) |
ModuleManager & | getModuleManager () |
const ModuleManager & | getModuleManager () const |
const std::vector< std::unique_ptr< InviwoModule > > & | getModules () const |
template<class T > | |
T * | getModuleByType () const |
InviwoModule * | getModuleByIdentifier (const std::string &identifier) const |
ProcessorNetwork * | getProcessorNetwork () |
ProcessorNetworkEvaluator * | getProcessorNetworkEvaluator () |
WorkspaceManager * | getWorkspaceManager () |
PropertyPresetManager * | getPropertyPresetManager () |
PortInspectorManager * | getPortInspectorManager () |
DataVisualizerManager * | getDataVisualizerManager () |
CommandLineParser & | getCommandLineParser () |
const CommandLineParser & | getCommandLineParser () const |
virtual void | addCallbackAction (ModuleCallbackAction *callbackAction) |
Add an action that can be shown in for example property widget context menu. Will be shown when right clicking on a property in the NetworkEditor. Added callbacks will be removed in ~InviwoModule when your module is destroyed. Example if you want to do it earlier: More... | |
virtual std::vector< std::unique_ptr< ModuleCallbackAction > > & | getCallbackActions () |
Get list of ModuleCallbackAction shown in for example property widget context menu. Do not keep references to elements in the list around since you cannot be notified when they will be removed. More... | |
std::vector< Settings * > | getModuleSettings () |
SystemSettings & | getSystemSettings () |
template<class T > | |
T * | getSettingsByType () |
std::vector< Capabilities * > | getModuleCapabilities () |
SystemCapabilities & | getSystemCapabilities () |
template<class T > | |
T * | getCapabilitiesByType () |
virtual std::locale | getUILocale () const |
template<class F , class... Args> | |
auto | dispatchPool (F &&f, Args &&... args) -> std::future< typename std::result_of< F(Args...)>::type > |
template<class F , class... Args> | |
auto | dispatchFront (F &&f, Args &&... args) -> std::future< typename std::result_of< F(Args...)>::type > |
void | dispatchFrontAndForget (std::function< void()> fun) |
virtual void | processFront () |
size_t | getPoolSize () const |
virtual void | resizePool (size_t newSize) |
void | waitForPool () |
void | setPostEnqueueFront (std::function< void()> func) |
void | setProgressCallback (std::function< void(std::string)> progressCallback) |
ResourceManager * | getResourceManager () |
virtual void | closeInviwoApplication () |
virtual void | registerFileObserver (FileObserver *fileObserver) |
virtual void | unRegisterFileObserver (FileObserver *fileObserver) |
virtual void | startFileObservation (std::string fileName) |
virtual void | stopFileObservation (std::string fileName) |
virtual void | playSound (Message soundID) |
TimerThread & | getTimerThread () |
const std::string & | getDisplayName () const |
virtual void | printApplicationInfo () |
void | postProgress (std::string progress) |
UsageMode | getApplicationUsageMode () const |
void | setApplicationUsageMode (UsageMode mode) |
virtual void | onResourceManagerEnableStateChanged () override |
Factories | |
CameraFactory * | getCameraFactory () const |
DataReaderFactory * | getDataReaderFactory () const |
DataWriterFactory * | getDataWriterFactory () const |
DialogFactory * | getDialogFactory () const |
MeshDrawerFactory * | getMeshDrawerFactory () const |
MetaDataFactory * | getMetaDataFactory () const |
InportFactory * | getInportFactory () const |
OutportFactory * | getOutportFactory () const |
PortInspectorFactory * | getPortInspectorFactory () const |
ProcessorFactory * | getProcessorFactory () const |
ProcessorWidgetFactory * | getProcessorWidgetFactory () const |
PropertyConverterManager * | getPropertyConverterManager () const |
PropertyFactory * | getPropertyFactory () const |
PropertyWidgetFactory * | getPropertyWidgetFactory () const |
template<typename BaseRepr > | |
RepresentationFactory< BaseRepr > * | getRepresentationFactory () const |
RepresentationMetaFactory * | getRepresentationMetaFactory () const |
template<typename BaseRepr > | |
RepresentationConverterFactory< BaseRepr > * | getRepresentationConverterFactory () const |
RepresentationConverterMetaFactory * | getRepresentationConverterMetaFactory () const |
Public Member Functions inherited from inviwo::Singleton< InviwoApplication > | |
Singleton (Singleton< InviwoApplication > const &)=delete | |
void | operator= (Singleton< InviwoApplication > const &)=delete |
Public Member Functions inherited from inviwo::ResourceManagerObserver | |
virtual void | onResourceAdded (const std::string &, const std::type_index &, Resource *) |
virtual void | onResourceRemoved (const std::string &, const std::type_index &, Resource *) |
Public Member Functions inherited from inviwo::Observer | |
Observer (const Observer &other) | |
Observer (Observer &&other) | |
Observer & | operator= (Observer &&other) |
Observer & | operator= (const Observer &other) |
virtual | ~Observer () |
void | removeObservation (ObservableInterface *observable) |
void | removeObservations () |
Protected Attributes | |
std::string | displayName_ |
CommandLineParser | commandLineParser_ |
std::shared_ptr< ConsoleLogger > | consoleLogger_ |
std::shared_ptr< FileLogger > | filelogger_ |
std::function< void(std::string)> | progressCallback_ |
ThreadPool | pool_ |
Queue | queue_ |
util::OnScopeExit | clearAllSingeltons_ |
std::unique_ptr< ResourceManager > | resourceManager_ |
std::unique_ptr< CameraFactory > | cameraFactory_ |
std::unique_ptr< DataReaderFactory > | dataReaderFactory_ |
std::unique_ptr< DataWriterFactory > | dataWriterFactory_ |
std::unique_ptr< DialogFactory > | dialogFactory_ |
std::unique_ptr< MeshDrawerFactory > | meshDrawerFactory_ |
std::unique_ptr< MetaDataFactory > | metaDataFactory_ |
std::unique_ptr< OutportFactory > | outportFactory_ |
std::unique_ptr< InportFactory > | inportFactory_ |
std::unique_ptr< PortInspectorFactory > | portInspectorFactory_ |
std::unique_ptr< DataVisualizerManager > | dataVisualizerManager_ |
std::unique_ptr< ProcessorFactory > | processorFactory_ |
std::unique_ptr< ProcessorWidgetFactory > | processorWidgetFactory_ |
std::unique_ptr< PropertyConverterManager > | propertyConverterManager_ |
std::unique_ptr< PropertyFactory > | propertyFactory_ |
std::unique_ptr< PropertyWidgetFactory > | propertyWidgetFactory_ |
std::unique_ptr< RepresentationMetaFactory > | representationMetaFactory_ |
std::unique_ptr< RepresentationConverterMetaFactory > | representationConverterMetaFactory_ |
std::unique_ptr< SystemSettings > | systemSettings_ |
std::unique_ptr< SystemCapabilities > | systemCapabilities_ |
std::vector< std::unique_ptr< ModuleCallbackAction > > | moduleCallbackActions_ |
ModuleManager | moduleManager_ |
std::unique_ptr< ProcessorNetwork > | processorNetwork_ |
std::unique_ptr< ProcessorNetworkEvaluator > | processorNetworkEvaluator_ |
std::unique_ptr< WorkspaceManager > | workspaceManager_ |
std::unique_ptr< PropertyPresetManager > | propertyPresetManager_ |
std::unique_ptr< PortInspectorManager > | portInspectorManager_ |
WorkspaceManager::ClearHandle | networkClearHandle_ |
WorkspaceManager::SerializationHandle | networkSerializationHandle_ |
WorkspaceManager::DeserializationHandle | networkDeserializationHandle_ |
WorkspaceManager::ClearHandle | presetsClearHandle_ |
WorkspaceManager::SerializationHandle | presetsSerializationHandle_ |
WorkspaceManager::DeserializationHandle | presetsDeserializationHandle_ |
std::unique_ptr< TimerThread > | timerThread_ |
Protected Attributes inherited from inviwo::Observer | |
ObservableSet | observables_ |
Additional Inherited Members | |
Static Public Member Functions inherited from inviwo::Singleton< InviwoApplication > | |
static void | init () |
static void | init (InviwoApplication *instance) |
static InviwoApplication * | getPtr () |
static void | deleteInstance () |
static bool | isInitialized () |
Protected Types inherited from inviwo::Observer | |
using | ObservableSet = std::unordered_set< ObservableInterface * > |
Protected Member Functions inherited from inviwo::Observer | |
void | addObservation (ObservableInterface *observable) |
The main application which holds the instances of all modules.
All modules should be owned and accessed trough this singleton, as well as the processor network and the evaluator.
|
virtual |
Add an action that can be shown in for example property widget context menu. Will be shown when right clicking on a property in the NetworkEditor. Added callbacks will be removed in ~InviwoModule when your module is destroyed. Example if you want to do it earlier:
auto inviwo::InviwoApplication::dispatchFront | ( | F && | f, |
Args &&... | args | ||
) | -> std::future<typename std::result_of<F(Args...)>::type> |
Enqueue a functor to be run in the GUI thread
void inviwo::InviwoApplication::dispatchFrontAndForget | ( | std::function< void()> | fun | ) |
Enqueue a functor to be run in the GUI thread.
UsageMode inviwo::InviwoApplication::getApplicationUsageMode | ( | ) | const |
Convenience method to get the current ApplicationUsageMode from the system settings
std::string inviwo::InviwoApplication::getBasePath | ( | ) | const |
Get the base path of the application. i.e. where the core data and modules folder and etc are.
|
virtual |
Get list of ModuleCallbackAction shown in for example property widget context menu. Do not keep references to elements in the list around since you cannot be notified when they will be removed.
|
inline |
Camera factory
|
inline |
DataReader factory
|
inline |
DataWriter factory
|
inline |
Dialog factory
|
inline |
Inport factory
|
inline |
MeshDrawer factory
|
inline |
MetaData factory
std::vector< Capabilities * > inviwo::InviwoApplication::getModuleCapabilities | ( | ) |
Retrieve all Capabilities from all modules, and the system capabilities
std::vector< Settings * > inviwo::InviwoApplication::getModuleSettings | ( | ) |
Retrieve all Settings from all modules including the SystemSettings
|
inline |
Outport factory
std::string inviwo::InviwoApplication::getPath | ( | PathType | pathType, |
const std::string & | suffix = "" , |
||
const bool & | createFolder = false |
||
) |
Get basePath + pathType + suffix.
pathType | Enum for type of path |
suffix | Path extension |
createFolder | whether to create the folder if it does not exist. |
size_t inviwo::InviwoApplication::getPoolSize | ( | ) | const |
Get the current number of worker threads in the thread pool
|
inline |
PortInspector factory
|
inline |
Processor factory
|
inline |
ProcessorWidget factory
|
inline |
|
inline |
Property factory
|
inline |
PropertyWidget factory
RepresentationConverterFactory< BaseRepr > * inviwo::InviwoApplication::getRepresentationConverterFactory | ( | ) | const |
|
inline |
RepresentationFactory< BaseRepr > * inviwo::InviwoApplication::getRepresentationFactory | ( | ) | const |
|
inline |
|
inline |
Returns the ResourceManager owned the InviwoApplication
|
virtual |
Load modules from dynamic library files in the regular search paths.
Will recursively search for all dll/so/dylib/bundle files in the regular search paths. The library filename must contain "inviwo-module" to be loaded.
|
virtual |
Set the number of worker threads in the thread pool. This will block for working threads to finish
Reimplemented in inviwo::InviwoApplicationQt.
void inviwo::InviwoApplication::setApplicationUsageMode | ( | UsageMode | mode | ) |
Convenience method to set the current ApplicationUsageMode in the system settings