ImFusion SDK 4.3
InteractiveSegmentationController Class Reference

#include <ImFusion/Seg/InteractiveSegmentationController.h>

Controller for interactive segmentation. More...

+ Inheritance diagram for InteractiveSegmentationController:

Detailed Description

Controller for interactive segmentation.

Public Slots

void onRunSeg (bool stopDraw=true)
 
void onAcceptSeg (bool convertLabels=true)
 
void onAcceptSegAndContinue ()
 
void onDrawIn ()
 
void onDrawOut ()
 
void onDrawErase ()
 
void onRemoveContour ()
 
void onDrawContour ()
 
void onConvertContour ()
 
void onUndo ()
 
void onClear ()
 
void onSetSize (int size)
 
void onSetTransparency (int val)
 
void onSetBrushAdaptiveness (int val)
 
void onToggleAvoidOtherLabels (bool flag)
 
void onExportLabelMap ()
 
void onExportAnnotation ()
 
void onChangeStats ()
 
void updateStats ()
 
void onAdaptivenessChange (int val)
 
void onSmoothnessChange (int val)
 
void onMemoryEstimationChange ()
 
void onSuperpixelsChange (int val)
 
void onResolutionChange (int val)
 
void onRandomForestSelect ()
 
void onInitFromPrediction ()
 
void onInitFromSegmentation ()
 
void initFromSegmentation (QAction *)
 

Public Member Functions

 InteractiveSegmentationController (InteractiveSegmentationAlgorithm *algorithm)
 
void init () override
 Two-step initialization function to be implemented by subclasses.
 
void onAlgorithmParametersChanged () override
 Callback called when the Algorithm's signalParametersChanged signal was emitted.
 
void onAlgorithmOutputChanged () override
 Callback called when the Algorithm's signalOutputChanged signal was emitted.
 
void dataDeleted (const ImFusion::Data *data)
 
void selectionChanged ()
 
void onSelectedDataChanged (const DataList &data) override
 Called by MainWindowBase in the case that the selection in the data model has changed.
 
bool eventFilter (QObject *o, QEvent *e) override
 
void setAllowMultipleLabels (bool enable)
 Enables or disables option to create multiple labels (default: enabled)
 
int exportResolution () const
 
void setExportResolution (int resolution)
 
int exportSmoothness () const
 
void setExportSmoothness (int smoothness)
 
void configure (const Properties *p) override
 Configure this object instance by de-serializing the given Properties.
 
void configuration (Properties *p) const override
 Serialize the current object configuration into the given Properties object.
 
- Public Member Functions inherited from AlgorithmController
 AlgorithmController (Algorithm *algorithm)
 Creates a new AlgorithmController wrapping the given algorithm, which must not be null.
 
const Algorithmalgorithm () const
 Returns the underlying Algorithm instance.
 
Algorithmalgorithm ()
 
void showInputData ()
 Shows the input data in the DisplayWidget.
 
InputDataVisibility showsInputData ()
 Checks if the input data is currently visible in the DisplayWidget.
 
void showHelp ()
 Attempts to open the user documentation page for the underlying algorithm.
 
std::optional< Filesystem::PathhelpPath () const
 Returns the path to the user documentation page if it is available, std::nullopt otherwise.
 
std::string title () const override
 Returns the original factory name of the underlying Algorithm.
 
- Public Member Functions inherited from Controller
void setMainWindowBase (MainWindowBase *mw)
 Complete the initialization by providing the parent MainWindowBase instance hosting the controller by setting m_main and m_disp and eventually call init().
 
virtual void onVisibleDataChanged (const DataList &)
 Called by MainWindowBase in the case that the currently visible data has changed.
 
virtual std::vector< LocationsupportedLocations () const
 Returns the list of locations in which this controller is allowed to be placed by the parent MainWindowBase.
 
virtual Location preferredLocation () const
 Returns the preferred location in which the parent MainWindowBase should place this controller.
 
virtual void onLocationChanged (Location newLocation)
 Callback function called by the parent MainWindowBase/ControllerDecorator whenever the place was changed.
 
Location location () const
 Convenience function to query the current controller Location from the parent ControllerDecorator.
 
ControllerDecoratorgetDecorator () const
 Convenience function to return m_main->getControllerDecorator(this) if m_main is set or nullptr otherwise.
 
template<typename T>
T * getDecorator () const
 Convenience function to dynamic_cast the return value of getDecorator() to a derived type.
 
- Public Member Functions inherited from Configurable
virtual void configureDefaults ()
 Retrieve the properties of this object, replaces values with their defaults and sets it again.
 
void registerParameter (ParameterBase *param)
 Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration().
 
void unregisterParameter (const ParameterBase *param)
 Remove the given Parameter or SubProperty from the list of registered parameters.
 
 Configurable (const Configurable &rhs)
 
 Configurable (Configurable &&rhs) noexcept
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (Configurable &&) noexcept
 
- 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.
 

Additional Inherited Members

- Public Types inherited from AlgorithmController
enum class  InputDataVisibility { None = 0 , All = 1 , Some = 2 }
 Enumeration of possible return values for showsInputData(). More...
 
- Public Types inherited from Controller
enum class  Location : int {
  Unknown = -1 , Naked = 0 , PrimaryDock = 1 , SecondaryDock = 2 ,
  Detached = 3 , ToolBar = 4 , UserLocation = 100
}
 Enumeration of possible placement/decoration options of a Controller. More...
 
- Public Attributes inherited from Controller
Signal signalTitleChanged
 Signal emitted when the title() has changed.
 
- Public Attributes inherited from Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 
- Protected Member Functions inherited from AlgorithmController
virtual void closeAlgorithm (bool executed=false)
 Removes the algorithm from the ApplicationController and closes the controller.
 
virtual void duplicateAlgorithmOnSelectedData () const
 Instantiates a new copy of underlying Algorithm on the currently selected Data in the DataModel and adds it to the ApplicationController.
 
void addToDataAndAnnotationModels (OwningDataList data)
 Adds the contents of data to the DataModel of the parent MainWindowBase.
 
- Protected Member Functions inherited from SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.
 
- Protected Attributes inherited from AlgorithmController
Algorithmm_algorithm = nullptr
 The underlying algorithm.
 
- Protected Attributes inherited from Controller
MainWindowBasem_main = nullptr
 The parent MainWindowBase instance hosting this Controller.
 
DisplayWidgetMultim_disp = nullptr
 The main DisplayWidget instance, convenience shortcut for m_main->display().
 
- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Member Function Documentation

◆ init()

void init ( )
overridevirtual

Two-step initialization function to be implemented by subclasses.

This function is called by setMainWindowBase() after the m_disp and m_main attributes have been set and hence a complete initialization of the controller is possible at this point.

Implements Controller.

◆ onAlgorithmParametersChanged()

void onAlgorithmParametersChanged ( )
overridevirtual

Callback called when the Algorithm's signalParametersChanged signal was emitted.

Reimplemented from AlgorithmController.

◆ onAlgorithmOutputChanged()

void onAlgorithmOutputChanged ( )
overridevirtual

Callback called when the Algorithm's signalOutputChanged signal was emitted.

Reimplemented from AlgorithmController.

◆ onSelectedDataChanged()

void onSelectedDataChanged ( const DataList & )
overridevirtual

Called by MainWindowBase in the case that the selection in the data model has changed.

Reimplemented from Controller.

◆ configure()

void configure ( const Properties * p)
overridevirtual

Configure this object instance by de-serializing the given Properties.

The default implementation will do so automatically for all registered Parameter and SubProperty instances.

See also
configuration() for the inverse functionality

Reimplemented from Configurable.

◆ configuration()

void configuration ( Properties * p) const
overridevirtual

Serialize the current object configuration into the given Properties object.

The default implementation will do so automatically for all registered Parameter and SubProperty instances.

See also
configure() for the inverse functionality

Reimplemented from Configurable.


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