Inviwo  0.9.10.1
Inviwo documentation
inviwo::TFEditor Class Reference
+ Inheritance diagram for inviwo::TFEditor:

Signals

void showColorDialog ()
 
void importTF (TFPrimitiveSet &primitiveSet)
 
void exportTF (const TFPrimitiveSet &primitiveSet)
 

Public Member Functions

 TFEditor (util::TFPropertyConcept *tfProperty, const std::vector< TFPrimitiveSet * > &primitiveSets, QWidget *parent=nullptr)
 
virtual void onControlPointAdded (TFPrimitive &p)
 
virtual void onControlPointRemoved (TFPrimitive &p)
 
virtual void onControlPointChanged (const TFPrimitive &p)
 
void updateConnections ()
 
void setMoveMode (int i)
 
int getMoveMode () const
 
void setControlPointSize (double val)
 Set the display size of the control points. More...
 
double getControlPointSize () const
 Get the display size of the control points. More...
 
void setRelativeSceneOffset (const dvec2 &offset)
 
const dvec2 & getRelativeSceneOffset () const
 
const DataMappergetDataMapper () const
 
std::vector< TFPrimitive * > getSelectedPrimitives () const
 
dvec2 getZoom () const
 returns both horizontal and vertical zoom given by the property More...
 
- Public Member Functions inherited from inviwo::Observer
 Observer (const Observer &other)
 
 Observer (Observer &&other)
 
Observeroperator= (Observer &&other)
 
Observeroperator= (const Observer &other)
 
virtual ~Observer ()
 
void removeObservation (ObservableInterface *observable)
 
void removeObservations ()
 

Protected Member Functions

virtual void mousePressEvent (QGraphicsSceneMouseEvent *e) override
 
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *e) override
 
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *e) override
 
virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *e) override
 
virtual void keyPressEvent (QKeyEvent *keyEvent) override
 
virtual void contextMenuEvent (QGraphicsSceneContextMenuEvent *e) override
 
void addControlPoint (const QPointF &pos)
 adds a new control point at the given position More...
 
void addControlPoint (double pos, const vec4 &color)
 
void addControlPointPeak (const QPointF &pos)
 adds a new TF Peak at the given position More...
 
void addIsovalue (const QPointF &pos)
 adds a new isovalue at the given position
 
void removeControlPoint (TFEditorPrimitive *p)
 
TFEditorPrimitivegetTFPrimitiveItemAt (const QPointF &pos) const
 
virtual void onTFPrimitiveDoubleClicked (const TFEditorPrimitive *p) override
 
- Protected Member Functions inherited from inviwo::Observer
void addObservation (ObservableInterface *observable)
 

Additional Inherited Members

- Protected Types inherited from inviwo::Observer
using ObservableSet = std::unordered_set< ObservableInterface * >
 
- Protected Attributes inherited from inviwo::Observer
ObservableSet observables_
 

Member Function Documentation

◆ addControlPoint()

void inviwo::TFEditor::addControlPoint ( const QPointF &  pos)
protected

adds a new control point at the given position

Adds a new control point the the points_ array, adds a new line item to the lines_ array, sorts the points_ array and updates the line items to go to and from the correct points. Runs CalcTransferValues to update the TransferFunction data Image

◆ addControlPointPeak()

void inviwo::TFEditor::addControlPointPeak ( const QPointF &  pos)
protected

adds a new TF Peak at the given position

Adds a control point as well as two more points with 0 alpha, one point to the left and the second to the right using the current primitive offset.

◆ getControlPointSize()

double inviwo::TFEditor::getControlPointSize ( ) const
inline

Get the display size of the control points.

See also
TransferFunctionEditorControlPoint::setSize

◆ getZoom()

dvec2 inviwo::TFEditor::getZoom ( ) const

returns both horizontal and vertical zoom given by the property

Returns
horizontal and vertical zoom corresponding to properties' zoomH.y - zoomH.x and zoomV.y - zoomV.x

◆ setControlPointSize()

void inviwo::TFEditor::setControlPointSize ( double  val)

Set the display size of the control points.

See also
TransferFunctionEditorControlPoint::setSize
Parameters
valDisplay size

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