Inviwo  0.9.10.1
Inviwo documentation
inviwo::DataVisualizer Class Referenceabstract

#include <datavisualizer.h>

+ Inheritance diagram for inviwo::DataVisualizer:

Public Member Functions

virtual std::string getName () const =0
 
virtual Document getDescription () const =0
 
virtual std::vector< FileExtensiongetSupportedFileExtensions () const =0
 
virtual bool isOutportSupported (const Outport *port) const =0
 
virtual bool hasSourceProcessor () const =0
 
virtual bool hasVisualizerNetwork () const =0
 
virtual std::pair< Processor *, Outport * > addSourceProcessor (const std::string &filename, ProcessorNetwork *network) const =0
 
virtual std::vector< Processor * > addVisualizerNetwork (Outport *outport, ProcessorNetwork *network) const =0
 
virtual std::vector< Processor * > addSourceAndVisualizerNetwork (const std::string &filename, ProcessorNetwork *network) const =0
 

Detailed Description

A DataVisualizer can be used to easily add a visualization of a data type. A DataVisualizer has two tasks. The first is to create a "Source Processor" which can be used to load data of the supported type. The second is to create a "Visualizer Network", which gets data (from an Outport) or loads data (from a "Source Processor") and generates some useful visualization. Both parts a optional, and can be used independently or together, like: 1) Adding a source processor that can load the requested file 2) Adding a set of processors that will take input from a existing port to create a visualization 3) Both 1 and 2

An Inviwo module can add new DataVisualizer by deriving from DataVisualizer, implementing all the virtual functions, and then add register it using DataVisualizerManager::registerDataVisualizer.

See also
DataVisualizerManager

Member Function Documentation

◆ addSourceAndVisualizerNetwork()

virtual std::vector<Processor*> inviwo::DataVisualizer::addSourceAndVisualizerNetwork ( const std::string &  filename,
ProcessorNetwork network 
) const
pure virtual

Adds a source processor with the requested file and a set of processors visualizing the data. Nothing will be added to the network if outport is not supported (isOutportSupported returns false). Only source processor will be added if hasVisualizationNetwork returns false.

Parameters
filenameThe file to load in the source processor. The extension of the filename should be in the list of extensions returned by getSupportedFileExtensions.
networkThe network to add the processor to.
Returns
A list of added processors.

Implemented in inviwo::ImageVisualizer, inviwo::VolumeRaycastVisualizer, inviwo::VolumeSliceVisualizer, inviwo::MeshVisualizer, and inviwo::PCPDataFrameVisualizer.

◆ addSourceProcessor()

virtual std::pair<Processor*, Outport*> inviwo::DataVisualizer::addSourceProcessor ( const std::string &  filename,
ProcessorNetwork network 
) const
pure virtual

Adds a source processor with the requested file to the network. hasSourceProcessor should return true for this function to be called.

Parameters
filenameThe file to load in the source processor. The extension of the filename should be in the list of extensions returned by getSupportedFileExtensions.
networkThe network to add the processor to.
Returns
The added source processor and the outport in the source processor containing data from the given file.

Implemented in inviwo::ImageVisualizer, inviwo::VolumeRaycastVisualizer, inviwo::VolumeSliceVisualizer, inviwo::MeshVisualizer, and inviwo::PCPDataFrameVisualizer.

◆ addVisualizerNetwork()

virtual std::vector<Processor*> inviwo::DataVisualizer::addVisualizerNetwork ( Outport outport,
ProcessorNetwork network 
) const
pure virtual

Adds a set of processors visualizing the data in the given outport. Nothing will be added to the network if outport is not supported (isOutportSupported returns false). hasVisualizationNetwork should return true for this function to be called.

Parameters
outportThe port to get data from. It will be connected to the added network.
networkThe network to add the Visualizer Network into.
Returns
A list of added processors.

Implemented in inviwo::ImageVisualizer, inviwo::VolumeRaycastVisualizer, inviwo::VolumeSliceVisualizer, inviwo::MeshVisualizer, and inviwo::PCPDataFrameVisualizer.

◆ getDescription()

virtual Document inviwo::DataVisualizer::getDescription ( ) const
pure virtual

◆ getName()

virtual std::string inviwo::DataVisualizer::getName ( ) const
pure virtual

◆ getSupportedFileExtensions()

virtual std::vector<FileExtension> inviwo::DataVisualizer::getSupportedFileExtensions ( ) const
pure virtual

◆ hasSourceProcessor()

virtual bool inviwo::DataVisualizer::hasSourceProcessor ( ) const
pure virtual

◆ hasVisualizerNetwork()

virtual bool inviwo::DataVisualizer::hasVisualizerNetwork ( ) const
pure virtual

◆ isOutportSupported()

virtual bool inviwo::DataVisualizer::isOutportSupported ( const Outport port) const
pure virtual

Test if the visualizer can be connected to the given outport

Implemented in inviwo::ImageVisualizer, inviwo::VolumeRaycastVisualizer, inviwo::VolumeSliceVisualizer, inviwo::MeshVisualizer, and inviwo::PCPDataFrameVisualizer.


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