open_iA 2023.02
A tool for the visual analysis and processing of volumetric datasets, with a focus on industrial computed tomography.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
iAVolumeViewer Class Reference

Class for managing all viewing aspects of volume datasets (3D renderer, slicers, histogram, line profile) More...

#include <iAVolumeViewer.h>

Inheritance diagram for iAVolumeViewer:
[legend]
Collaboration diagram for iAVolumeViewer:
[legend]

Public Member Functions

 iAVolumeViewer (iADataSet *dataSet)
 
 ~iAVolumeViewer ()
 
void createGUI (iAMdiChild *child, size_t dataSetIdx) override
 Should contain all things that need to be done in the GUI thread for viewing this dataset The default implementation creates a 3D renderer (via createRenderer method) and adds an entry to the dataset list.
 
std::shared_ptr< iADataSetRenderercreateRenderer (vtkRenderer *ren) override
 Called to create a 3D renderer for the dataset. Override in derived class; used for both the "normal" 3D renderer and the magic lens renderer.
 
iAChartWithFunctionsWidgethistogram ()
 Access to the chart widget used for displaying the histogram.
 
QSharedPointer< iAHistogramDatahistogramData (int component) const
 Access to the histogram data.
 
QString information () const override
 Get information to display about the dataset.
 
void prepare (iAPreferences const &pref, iAProgress *p) override
 called directly after the dataset is loaded, should do anything that needs to be computed in the background
 
void setPickable (bool pickable) override
 
void showInSlicers (bool show)
 convenience function for showing/hiding dataset in slicer:
 
uint slicerChannelID () const override
 
void slicerRegionSelected (double minVal, double maxVal, uint channelID) override
 TODO NEWIO: improve!
 
iATransferFunctiontransfer ()
 Access to the transfer function used in renderer and slicer view.
 
iAImageData const * volume () const
 Access to the displayed dataset.
 
- Public Member Functions inherited from iADataSetViewer
iAAttributes attributesWithValues () const
 Retrieves the list of all attributes for this viewer, merged with their current values as default values:
 
QVariantMap attributeValues () const
 Retrieve only the current attribute values.
 
virtual void createGUI (iAMdiChild *child, size_t dataSetIdx)
 Should contain all things that need to be done in the GUI thread for viewing this dataset The default implementation creates a 3D renderer (via createRenderer method) and adds an entry to the dataset list.
 
virtual QString information () const
 Get information to display about the dataset.
 
virtual void prepare (iAPreferences const &pref, iAProgress *p)
 called directly after the dataset is loaded, should do anything that needs to be computed in the background
 
bool renderFlagSet (QChar const &flag) const
 
void setAttributes (QVariantMap const &values)
 Call to change the attributes of this viewer.
 
virtual void setPickable (bool pickable)
 
void setPickActionVisible (bool visible)
 
void setRenderFlag (QChar const &flag, bool enable)
 
virtual uint slicerChannelID () const
 
virtual void slicerRegionSelected (double minVal, double maxVal, uint channelID)
 TODO NEWIO: improve!
 
void storeState ()
 called before a dataset is stored; stores the current viewer state into the metadata of the linked dataset (via attributeValues)
 
iADataSetRendererrenderer ()
 
iADataSetRenderer const * renderer () const
 

Additional Inherited Members

- Signals inherited from iADataSetViewer
void dataSetChanged (size_t dataSetIdx)
 
void removeDataSet (size_t dataSetIdx)
 
- Static Public Attributes inherited from iADataSetViewer
static const QString RenderFlags
 key that specifies which views or renderers the viewer currently has visible
 
- Protected Member Functions inherited from iADataSetViewer
 iADataSetViewer (iADataSet *dataSet)
 
virtual ~iADataSetViewer ()
 
void addAttribute (QString const &name, iAValueType valueType, QVariant defaultValue=0.0, double min=std::numeric_limits< double >::lowest(), double max=std::numeric_limits< double >::max())
 adds an attribute that can be modified by the user to change the appearance of some aspect of the viewer
 
QAction * addViewAction (QString const &name, QString const &iconName, bool checked, std::function< void(bool)> handler)
 helper function for creating and adding a toggling action for switching some aspect of this viewer needs to be called before calling createGUI of this base class (which passes the view actions created so far to the dataset list.
 
- Protected Attributes inherited from iADataSetViewer
QVariantMap m_attribValues
 
iADataSetm_dataSet
 the dataset for which this viewer is responsible
 

Detailed Description

Class for managing all viewing aspects of volume datasets (3D renderer, slicers, histogram, line profile)

Constructor & Destructor Documentation

◆ iAVolumeViewer()

iAVolumeViewer::iAVolumeViewer ( iADataSet dataSet)

◆ ~iAVolumeViewer()

iAVolumeViewer::~iAVolumeViewer ( )

Member Function Documentation

◆ createGUI()

void iAVolumeViewer::createGUI ( iAMdiChild child,
size_t  dataSetIdx 
)
overridevirtual

Should contain all things that need to be done in the GUI thread for viewing this dataset The default implementation creates a 3D renderer (via createRenderer method) and adds an entry to the dataset list.

If you want these things to happen, but additionally some other things, call this function from the derived method (i.e. iADataSetViewer::createGUI). Sometimes, you might not want these things to happen (as e.g. the iAProjectViewer does, since it does not need a 3D viewer nor a dataset list entry),

Reimplemented from iADataSetViewer.

◆ createRenderer()

std::shared_ptr< iADataSetRenderer > iAVolumeViewer::createRenderer ( vtkRenderer *  ren)
overridevirtual

Called to create a 3D renderer for the dataset. Override in derived class; used for both the "normal" 3D renderer and the magic lens renderer.

Reimplemented from iADataSetViewer.

◆ histogram()

iAChartWithFunctionsWidget * iAVolumeViewer::histogram ( )

Access to the chart widget used for displaying the histogram.

◆ histogramData()

QSharedPointer< iAHistogramData > iAVolumeViewer::histogramData ( int  component) const

Access to the histogram data.

◆ information()

QString iAVolumeViewer::information ( ) const
overridevirtual

Get information to display about the dataset.

Reimplemented from iADataSetViewer.

◆ prepare()

void iAVolumeViewer::prepare ( iAPreferences const &  pref,
iAProgress p 
)
overridevirtual

called directly after the dataset is loaded, should do anything that needs to be computed in the background

Reimplemented from iADataSetViewer.

◆ setPickable()

void iAVolumeViewer::setPickable ( bool  pickable)
overridevirtual

Reimplemented from iADataSetViewer.

◆ showInSlicers()

void iAVolumeViewer::showInSlicers ( bool  show)

convenience function for showing/hiding dataset in slicer:

◆ slicerChannelID()

uint iAVolumeViewer::slicerChannelID ( ) const
overridevirtual

Reimplemented from iADataSetViewer.

◆ slicerRegionSelected()

void iAVolumeViewer::slicerRegionSelected ( double  minVal,
double  maxVal,
uint  channelID 
)
overridevirtual

TODO NEWIO: improve!

Reimplemented from iADataSetViewer.

◆ transfer()

iATransferFunction * iAVolumeViewer::transfer ( )

Access to the transfer function used in renderer and slicer view.

◆ volume()

iAImageData const * iAVolumeViewer::volume ( ) const

Access to the displayed dataset.


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