Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
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::filesystem::path &filename, ProcessorNetwork *network, const ivec2 &origin) const =0
 
virtual std::vector< Processor * > addVisualizerNetwork (Outport *outport, ProcessorNetwork *network) const =0
 
virtual std::vector< Processor * > addSourceAndVisualizerNetwork (const std::filesystem::path &filename, ProcessorNetwork *network, const ivec2 &origin) 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::filesystem::path & filename,
ProcessorNetwork * network,
const ivec2 & origin ) 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.
originthe initial position for the visualizer network
Returns
A list of added processors.

Implemented in inviwo::DataFrameTableVisualizer, inviwo::ImageBackgroundVisualizer, inviwo::ImageInformationVisualizer, inviwo::ImageToLayerVisualizer, inviwo::ImageVisualizer, inviwo::LayerInformationVisualizer, inviwo::LayerToImageVisualizer, inviwo::LayerVisualizer, inviwo::MeshInformationVisualizer, inviwo::MeshVisualizer, inviwo::PCPDataFrameVisualizer, inviwo::ScatterPlotDataFrameVisualizer, inviwo::VolumeInformationVisualizer, inviwo::VolumeRaycastVisualizer, and inviwo::VolumeSliceVisualizer.

◆ addSourceProcessor()

virtual std::pair< Processor *, Outport * > inviwo::DataVisualizer::addSourceProcessor ( const std::filesystem::path & filename,
ProcessorNetwork * network,
const ivec2 & origin ) 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.
originthe initial position for the processor
Returns
The added source processor and the outport in the source processor containing data from the given file.

Implemented in inviwo::DataFrameTableVisualizer, inviwo::ImageBackgroundVisualizer, inviwo::ImageInformationVisualizer, inviwo::ImageToLayerVisualizer, inviwo::ImageVisualizer, inviwo::LayerInformationVisualizer, inviwo::LayerToImageVisualizer, inviwo::LayerVisualizer, inviwo::MeshInformationVisualizer, inviwo::MeshVisualizer, inviwo::PCPDataFrameVisualizer, inviwo::ScatterPlotDataFrameVisualizer, inviwo::VolumeInformationVisualizer, inviwo::VolumeRaycastVisualizer, and inviwo::VolumeSliceVisualizer.

◆ 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::DataFrameTableVisualizer, inviwo::ImageBackgroundVisualizer, inviwo::ImageInformationVisualizer, inviwo::ImageToLayerVisualizer, inviwo::ImageVisualizer, inviwo::LayerInformationVisualizer, inviwo::LayerToImageVisualizer, inviwo::LayerVisualizer, inviwo::MeshInformationVisualizer, inviwo::MeshVisualizer, inviwo::PCPDataFrameVisualizer, inviwo::ScatterPlotDataFrameVisualizer, inviwo::VolumeInformationVisualizer, inviwo::VolumeRaycastVisualizer, and inviwo::VolumeSliceVisualizer.

◆ getDescription()

◆ getName()

◆ getSupportedFileExtensions()

◆ hasSourceProcessor()

◆ hasVisualizerNetwork()

◆ isOutportSupported()


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