ImFusion SDK 4.3
Brush Class Reference

#include <ImFusion/Seg/Brush.h>

Convenience class to facilitate drawing in the views using the LabelPainter. More...

+ Inheritance diagram for Brush:

Detailed Description

Convenience class to facilitate drawing in the views using the LabelPainter.

Note that the class does not modify any of the parameters of the LabelPainter and only calls the paint() function

Public Member Functions

 Brush (LabelPainter &painter, DisplayWidgetMultiAdapter disp)
 
 Brush (LabelPainter &painter, const std::vector< GUI::View * > &views)
 Variant constructor for when there is no display, but simply a list of views.
 
 ~Brush ()
 On destruction, disable() is called automatically if necessary.
 
void enable ()
 Activates the class, by adding the necessary objects to the view.
 
void disable ()
 Deactivates the class, by removing the objects from the views.
 
bool isEnabled () const
 Returns whether the Brush is currently active.
 
void setShowIsolinePreview (bool b)
 Controls the visibility of the isoline, which is an accurate preview of the area drawn by the LabelPainter True by default.
 
void setShowCirclePreview (bool b)
 Controls the visibility of the circle, which is a rough estimation of the area drawn by the LabelPainter False by default.
 
void setLinkViews (bool b)
 When 'linkViews' is enabled, the MPRs that are not in focus are automatically moved such that they show the location of the brush True by default.
 
void setPaintIn2D (bool b)
 When 'paintIn2D' is enabled, the brush will only paint labels in the target slice instead of affecting the neighboring slices as well.
 
void setPreviewColor (const vec4 &color)
 Set the color of the circle and the isoline Note that this color does not automatically mirror the active label in the LabelPainter, and must be set explicitly.
 
void updateIsolinePreview ()
 Updates the isoline preview with regards to the brush location.
 
bool isPainting () const
 Returns whether the Brush is currently painting.
 
void setLabel (int label)
 Set the label value to paint.
 
void setRadiusMM (float radius)
 Set the radius in mm of the brush.
 
void setAdaptiveness (float adaptiveness)
 Set the adaptiveness of the brush.
 
void setFilter (bool filter)
 Set whether the brush should filter the labels.
 
- Public Member Functions inherited from SignalReceiver
 SignalReceiver ()=default
 Default constructor.
 
 SignalReceiver (const SignalReceiver &other)
 Copy constructor, does not copy any existing signal connections from other.
 
SignalReceiveroperator= (SignalReceiver rhs)
 Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs.
 
virtual ~SignalReceiver ()
 Virtual destructor disconnects from all connected signals.
 

Public Attributes

Signal signalPaintingStarted
 called when the mouse buttons are pressed, and painting begins
 
Signal< bool > signalPainted
 called whenever the LabelPainter::paint() function is called the parameter is true when painting, and false when erasing (left/right click)
 
Signal signalPaintingStopped
 called when the mouse buttons are released
 

Additional Inherited Members

- Protected Member Functions inherited from SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.
 

Member Function Documentation

◆ setPaintIn2D()

void setPaintIn2D ( bool b)

When 'paintIn2D' is enabled, the brush will only paint labels in the target slice instead of affecting the neighboring slices as well.

False by default


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close