![]() |
Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
Abstract class for segment editor effects. More...
#include <Modules/Loadable/Segmentations/EditorEffects/qSlicerSegmentEditorAbstractEffect.h>
Public Types | |
enum | ConfirmationResult { NotConfirmed , ConfirmedWithoutDialog , ConfirmedWithDialog } |
enum | ModificationMode { ModificationModeSet , ModificationModeAdd , ModificationModeRemove , ModificationModeRemoveAll } |
typedef QObject | Superclass |
Properties | |
QString | name |
bool | perSegment |
bool | requireSegments |
bool | showEffectCursorInSliceView |
bool | showEffectCursorInThreeDView |
QString | title |
Public Slots | |
virtual void | updateGUIFromMRML ()=0 |
virtual void | updateMRMLFromGUI ()=0 |
Public Member Functions | |
virtual Q_INVOKABLE void | activate () |
virtual Q_INVOKABLE bool | active () |
Returns true if the effect is currently active (activated and has not deactivated since then) | |
Q_INVOKABLE void | addActor2D (qMRMLWidget *viewWidget, vtkActor2D *actor) |
Q_INVOKABLE void | addActor3D (qMRMLWidget *viewWidget, vtkProp3D *actor) |
Q_INVOKABLE QWidget * | addLabeledOptionsWidget (QString label, QLayout *newOptionsWidget) |
Q_INVOKABLE QWidget * | addLabeledOptionsWidget (QString label, QWidget *newOptionsWidget) |
Q_INVOKABLE void | addOptionsWidget (QLayout *newOptionsWidget) |
Q_INVOKABLE void | addOptionsWidget (QWidget *newOptionsWidget) |
virtual Q_INVOKABLE void | cleanup () |
virtual qSlicerSegmentEditorAbstractEffect * | clone ()=0 |
Clone editor effect. Override to return a new instance of the effect sub-class. | |
Q_INVOKABLE bool | commonParameterDefined (QString name) |
Returns true if the common parameter is already defined. | |
Q_INVOKABLE int | confirmCurrentSegmentVisible () |
virtual QCursor | createCursor (qMRMLWidget *viewWidget) |
Create a cursor customized for the given effect, potentially for each view. | |
Q_INVOKABLE void | cursorOff (qMRMLWidget *viewWidget) |
Turn off cursor and save cursor to restore later. | |
Q_INVOKABLE void | cursorOn (qMRMLWidget *viewWidget) |
Restore saved cursor. | |
virtual Q_INVOKABLE void | deactivate () |
Q_INVOKABLE vtkOrientedImageData * | defaultModifierLabelmap () |
Q_INVOKABLE double | doubleParameter (QString name) |
Get effect-specific or common double type parameter from effect parameter set node. | |
virtual Q_INVOKABLE const QString | helpText () const |
Get help text for effect to be displayed in the help box. | |
virtual QIcon | icon () |
Get icon for effect to be displayed in segment editor. | |
Q_INVOKABLE int | integerParameter (QString name) |
Get effect-specific or common integer type parameter from effect parameter set node. | |
virtual void | interactionNodeModified (vtkMRMLInteractionNode *interactionNode) |
virtual void | layoutChanged () |
Simple mechanism to let the effects know that the layout has changed. | |
Q_INVOKABLE vtkOrientedImageData * | maskLabelmap () |
Q_INVOKABLE vtkOrientedImageData * | masterVolumeImageData () |
Deprecated. Use sourceVolumeImageData method instead. | |
virtual void | masterVolumeNodeChanged () |
Deprecated. Override sourceVolumeNodeChanged() method instead. | |
Q_INVOKABLE vtkOrientedImageData * | modifierLabelmap () |
virtual Q_INVOKABLE void | modifySegmentByLabelmap (vtkMRMLSegmentationNode *segmentationNode, const char *segmentID, vtkOrientedImageData *modifierLabelmap, ModificationMode modificationMode, bool bypassMasking=false) |
virtual Q_INVOKABLE void | modifySegmentByLabelmap (vtkMRMLSegmentationNode *segmentationNode, const char *segmentID, vtkOrientedImageData *modifierLabelmap, ModificationMode modificationMode, const int modificationExtent[6], bool bypassMasking=false) |
virtual Q_INVOKABLE void | modifySelectedSegmentByLabelmap (vtkOrientedImageData *modifierLabelmap, ModificationMode modificationMode, bool bypassMasking=false) |
virtual Q_INVOKABLE void | modifySelectedSegmentByLabelmap (vtkOrientedImageData *modifierLabelmap, ModificationMode modificationMode, const int modificationExtent[6], bool bypassMasking=false) |
virtual Q_INVOKABLE void | modifySelectedSegmentByLabelmap (vtkOrientedImageData *modifierLabelmap, ModificationMode modificationMode, QList< int > extent, bool bypassMasking=false) |
virtual QString | name () const |
Q_INVOKABLE vtkMRMLNode * | nodeReference (QString name) |
Get effect-specific or common node reference type parameter from effect parameter set node. | |
Q_INVOKABLE QFrame * | optionsFrame () |
Get effect options frame. | |
Q_INVOKABLE QFormLayout * | optionsLayout () |
Get layout of options frame. | |
Q_INVOKABLE QString | parameter (QString name) |
Get effect-specific or common string type parameter from effect parameter set node. | |
Q_INVOKABLE bool | parameterDefined (QString name) |
Returns true if the effect-specific parameter is already defined. | |
Q_INVOKABLE vtkMRMLSegmentEditorNode * | parameterSetNode () |
Get segment editor parameter set node. | |
virtual bool | perSegment () const |
Get flag indicating whether effect operates on segments (true) or the whole segmentation (false). | |
virtual bool | processInteractionEvents (vtkRenderWindowInteractor *callerInteractor, unsigned long eid, qMRMLWidget *viewWidget) |
virtual void | processViewNodeEvents (vtkMRMLAbstractViewNode *callerViewNode, unsigned long eid, qMRMLWidget *viewWidget) |
qSlicerSegmentEditorAbstractEffect (QObject *parent=nullptr) | |
virtual void | referenceGeometryChanged () |
Q_INVOKABLE vtkOrientedImageData * | referenceGeometryImage () |
Q_INVOKABLE void | removeActor2D (qMRMLWidget *viewWidget, vtkActor2D *actor) |
Remove actor from the renderer of the widget. | |
Q_INVOKABLE void | removeActor3D (qMRMLWidget *viewWidget, vtkProp3D *actor) |
Remove actor from the renderer of the widget. | |
virtual bool | requireSegments () const |
If this property is set to true then this effect is enabled only when the segmentation has segment(s) in it. | |
Q_INVOKABLE void | saveStateForUndo () |
Q_INVOKABLE vtkMRMLScene * | scene () |
Get MRML scene (from parameter set node) | |
Q_INVOKABLE bool | segmentationDisplayableInView (vtkMRMLAbstractViewNode *viewNode) |
Q_INVOKABLE vtkOrientedImageData * | selectedSegmentLabelmap () |
Q_INVOKABLE void | selectEffect (QString effectName) |
void | setCallbackSlots (QObject *receiver, const char *selectEffectSlot, const char *updateVolumeSlot, const char *saveStateForUndoSlot) |
Q_INVOKABLE void | setCommonNodeReference (QString name, vtkMRMLNode *node) |
Convenience function to set node reference common parameter. | |
Q_INVOKABLE void | setCommonParameter (QString name, double value) |
Convenience function to set double common parameter. | |
Q_INVOKABLE void | setCommonParameter (QString name, int value) |
Convenience function to set integer common parameter. | |
Q_INVOKABLE void | setCommonParameter (QString name, QString value) |
Q_INVOKABLE void | setCommonParameterDefault (QString name, double value) |
Q_INVOKABLE void | setCommonParameterDefault (QString name, int value) |
Q_INVOKABLE void | setCommonParameterDefault (QString name, QString value) |
virtual void | setMRMLDefaults ()=0 |
virtual void | setName (QString name) |
Q_INVOKABLE void | setNodeReference (QString name, vtkMRMLNode *node) |
Q_INVOKABLE void | setParameter (QString name, double value) |
Q_INVOKABLE void | setParameter (QString name, int value) |
Q_INVOKABLE void | setParameter (QString name, QString value) |
Q_INVOKABLE void | setParameterDefault (QString name, double value) |
Q_INVOKABLE void | setParameterDefault (QString name, int value) |
Q_INVOKABLE void | setParameterDefault (QString name, QString value) |
Q_INVOKABLE void | setParameterSetNode (vtkMRMLSegmentEditorNode *node) |
Set segment editor parameter set node. | |
virtual void | setPerSegment (bool perSegment) |
virtual void | setRequireSegments (bool requireSegments) |
If this property is set to true then this effect is enabled only when the segmentation has segment(s) in it. | |
void | setShowEffectCursorInSliceView (bool show) |
void | setShowEffectCursorInThreeDView (bool show) |
virtual void | setTitle (QString title) |
Set the title of the effect. | |
virtual void | setupOptionsFrame () |
void | setVolumes (vtkOrientedImageData *alignedSourceVolume, vtkOrientedImageData *modifierLabelmap, vtkOrientedImageData *maskLabelmap, vtkOrientedImageData *selectedSegmentLabelmap, vtkOrientedImageData *referenceGeometryImage) |
Called by the editor widget. | |
bool | showEffectCursorInSliceView () |
bool | showEffectCursorInThreeDView () |
Q_INVOKABLE vtkOrientedImageData * | sourceVolumeImageData () |
virtual void | sourceVolumeNodeChanged () |
virtual QString | title () const |
~qSlicerSegmentEditorAbstractEffect () override | |
Static Public Member Functions | |
static Q_INVOKABLE void | applyImageMask (vtkOrientedImageData *input, vtkOrientedImageData *mask, double fillValue, bool notMask=false) |
static Q_INVOKABLE void | forceRender (qMRMLWidget *viewWidget) |
static QPoint | rasToXy (double ras[3], qMRMLSliceWidget *sliceWidget) |
Convert RAS position to XY in-slice position. | |
static Q_INVOKABLE QPoint | rasToXy (QVector3D ras, qMRMLSliceWidget *sliceWidget) |
Convert RAS position to XY in-slice position, python accessor method. | |
static Q_INVOKABLE vtkRenderer * | renderer (qMRMLWidget *viewWidget) |
Get renderer for view widget. | |
static Q_INVOKABLE vtkRenderWindow * | renderWindow (qMRMLWidget *viewWidget) |
Get render window for view widget. | |
static Q_INVOKABLE void | scheduleRender (qMRMLWidget *viewWidget) |
static Q_INVOKABLE double | sliceSpacing (qMRMLSliceWidget *sliceWidget) |
static Q_INVOKABLE vtkMRMLAbstractViewNode * | viewNode (qMRMLWidget *viewWidget) |
Get node for view widget. | |
static void | xyToIjk (double xy[2], int outputIjk[3], qMRMLSliceWidget *sliceWidget, vtkOrientedImageData *image, vtkMRMLTransformNode *parentTransform=nullptr) |
Convert XY in-slice position to image IJK position. | |
static void | xyToIjk (QPoint xy, int outputIjk[3], qMRMLSliceWidget *sliceWidget, vtkOrientedImageData *image, vtkMRMLTransformNode *parentTransform=nullptr) |
Convert XY in-slice position to image IJK position. | |
static Q_INVOKABLE QVector3D | xyToIjk (QPoint xy, qMRMLSliceWidget *sliceWidget, vtkOrientedImageData *image, vtkMRMLTransformNode *parentTransform=nullptr) |
Convert XY in-slice position to image IJK position, python accessor method. | |
static void | xyToRas (double xy[2], double outputRas[3], qMRMLSliceWidget *sliceWidget) |
Convert XY in-slice position to RAS position. | |
static void | xyToRas (QPoint xy, double outputRas[3], qMRMLSliceWidget *sliceWidget) |
Convert XY in-slice position to RAS position. | |
static Q_INVOKABLE QVector3D | xyToRas (QPoint xy, qMRMLSliceWidget *sliceWidget) |
Convert XY in-slice position to RAS position, python accessor method. | |
static void | xyzToIjk (double inputXyz[3], int outputIjk[3], qMRMLSliceWidget *sliceWidget, vtkOrientedImageData *image, vtkMRMLTransformNode *parentTransform=nullptr) |
Convert XYZ slice view position to image IJK position,. | |
static Q_INVOKABLE QVector3D | xyzToIjk (QVector3D inputXyz, qMRMLSliceWidget *sliceWidget, vtkOrientedImageData *image, vtkMRMLTransformNode *parentTransform=nullptr) |
Convert XYZ slice view position to image IJK position, python accessor method,. | |
static void | xyzToRas (double inputXyz[3], double outputRas[3], qMRMLSliceWidget *sliceWidget) |
static Q_INVOKABLE QVector3D | xyzToRas (QVector3D inputXyz, qMRMLSliceWidget *sliceWidget) |
Convert XYZ slice view position to RAS position, python accessor method. | |
Protected Attributes | |
QScopedPointer< qSlicerSegmentEditorAbstractEffectPrivate > | d_ptr |
bool | m_Active {false} |
vtkWeakPointer< vtkSegment > | m_AlreadyConfirmedSegmentVisible |
double | m_EraseValue {0.0} |
double | m_FillValue {1.0} |
QString | m_Name |
bool | m_PerSegment {true} |
bool | m_RequireSegments {true} |
bool | m_ShowEffectCursorInSliceView {true} |
bool | m_ShowEffectCursorInThreeDView {false} |
QString | m_Title |
Abstract class for segment editor effects.
Definition at line 61 of file qSlicerSegmentEditorAbstractEffect.h.
typedef QObject qSlicerSegmentEditorAbstractEffect::Superclass |
Definition at line 98 of file qSlicerSegmentEditorAbstractEffect.h.
Enumerator | |
---|---|
NotConfirmed | |
ConfirmedWithoutDialog | |
ConfirmedWithDialog |
Definition at line 113 of file qSlicerSegmentEditorAbstractEffect.h.
Enumerator | |
---|---|
ModificationModeSet | |
ModificationModeAdd | |
ModificationModeRemove | |
ModificationModeRemoveAll |
Definition at line 105 of file qSlicerSegmentEditorAbstractEffect.h.
|
readwrite |
This property stores the name of the effect Cannot be empty.
Definition at line 71 of file qSlicerSegmentEditorAbstractEffect.h.
|
readwrite |
This property stores the flag indicating whether effect operates on individual segments (true) or the whole segmentation (false). True by default.
Definition at line 81 of file qSlicerSegmentEditorAbstractEffect.h.
|
readwrite |
If this property is set to true then this effect is enabled only when the segmentation has segment(s) in it. It can be set to false in effects which create new segments. True by default.
Definition at line 87 of file qSlicerSegmentEditorAbstractEffect.h.
|
readwrite |
Show effect cursor in slice view. If false then default arrow cursor will be shown. True by default.
Definition at line 91 of file qSlicerSegmentEditorAbstractEffect.h.
|
readwrite |
Show effect cursor in slice view. If false then default arrow cursor will be shown. False by default.
Definition at line 95 of file qSlicerSegmentEditorAbstractEffect.h.
|
readwrite |
This property stores the title of the effect
Definition at line 75 of file qSlicerSegmentEditorAbstractEffect.h.
qSlicerSegmentEditorAbstractEffect::qSlicerSegmentEditorAbstractEffect | ( | QObject * | parent = nullptr | ) |
|
override |
|
virtual |
Perform actions to activate the effect (show options frame, etc.) NOTE: Base class implementation needs to be called BEFORE the effect-specific implementation
Reimplemented in qSlicerSegmentEditorScriptedEffect, qSlicerSegmentEditorScriptedLabelEffect, and qSlicerSegmentEditorScriptedPaintEffect.
|
virtual |
Returns true if the effect is currently active (activated and has not deactivated since then)
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::addActor2D | ( | qMRMLWidget * | viewWidget, |
vtkActor2D * | actor ) |
Add actor to the renderer of the view widget. The effect is responsible for removing the actor when the effect is deactivated.
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::addActor3D | ( | qMRMLWidget * | viewWidget, |
vtkProp3D * | actor ) |
Add actor to the renderer of the view widget. The effect is responsible for removing the actor when the effect is deactivated.
Q_INVOKABLE QWidget * qSlicerSegmentEditorAbstractEffect::addLabeledOptionsWidget | ( | QString | label, |
QLayout * | newOptionsWidget ) |
Q_INVOKABLE QWidget * qSlicerSegmentEditorAbstractEffect::addLabeledOptionsWidget | ( | QString | label, |
QWidget * | newOptionsWidget ) |
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::addOptionsWidget | ( | QLayout * | newOptionsWidget | ) |
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::addOptionsWidget | ( | QWidget * | newOptionsWidget | ) |
Add effect options widget to options frame layout The implemented effects need to create their options UI widget, make the connections, then call this function to add the options UI to the effect options frame
|
static |
Apply mask image on an input image. This method is kept here for backward compatibility only and will be removed in the future. Use vtkOrientedImageDataResample::ApplyImageMask method instead.
|
inlinevirtual |
Clean up resources, event observers, and Qt signal/slot connections before deletion.
This ensures proper object destruction, as active signal/slot connections can prevent the object from being deleted. Subclasses should override this method to handle additional cleanup as needed.
For more details, see: https://github.com/Slicer/Slicer/issues/7392
Reimplemented in qSlicerSegmentEditorScriptedEffect.
Definition at line 202 of file qSlicerSegmentEditorAbstractEffect.h.
|
pure virtual |
Clone editor effect. Override to return a new instance of the effect sub-class.
Implemented in qSlicerSegmentEditorAbstractLabelEffect, qSlicerSegmentEditorEraseEffect, qSlicerSegmentEditorPaintEffect, qSlicerSegmentEditorScissorsEffect, qSlicerSegmentEditorScriptedEffect, qSlicerSegmentEditorScriptedLabelEffect, and qSlicerSegmentEditorScriptedPaintEffect.
Q_INVOKABLE bool qSlicerSegmentEditorAbstractEffect::commonParameterDefined | ( | QString | name | ) |
Returns true if the common parameter is already defined.
Q_INVOKABLE int qSlicerSegmentEditorAbstractEffect::confirmCurrentSegmentVisible | ( | ) |
If current segment is not visible then asks the user to confirm that the operation is intended to be performed on the current segment. Returns NotConfirmed (0) if operation should not proceed with the current segment. Returns ConfirmedWithoutDialog if operation should proceed with the current segment and dialog was not displayed. Returns ConfirmedWithDialog if operation should proceed with the current segment and dialog was displayed.
|
virtual |
Create a cursor customized for the given effect, potentially for each view.
Reimplemented in qSlicerSegmentEditorScriptedEffect, qSlicerSegmentEditorScriptedLabelEffect, and qSlicerSegmentEditorScriptedPaintEffect.
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::cursorOff | ( | qMRMLWidget * | viewWidget | ) |
Turn off cursor and save cursor to restore later.
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::cursorOn | ( | qMRMLWidget * | viewWidget | ) |
Restore saved cursor.
|
virtual |
Perform actions to deactivate the effect (hide options frame, destroy actors, etc.) NOTE: Base class implementation needs to be called BEFORE the effect-specific implementation
Reimplemented in qSlicerSegmentEditorPaintEffect, qSlicerSegmentEditorScissorsEffect, qSlicerSegmentEditorScriptedEffect, qSlicerSegmentEditorScriptedLabelEffect, and qSlicerSegmentEditorScriptedPaintEffect.
Q_INVOKABLE vtkOrientedImageData * qSlicerSegmentEditorAbstractEffect::defaultModifierLabelmap | ( | ) |
Reset modifier labelmap to default (resets geometry, clears content) and return it.
Q_INVOKABLE double qSlicerSegmentEditorAbstractEffect::doubleParameter | ( | QString | name | ) |
Get effect-specific or common double type parameter from effect parameter set node.
|
static |
|
inlinevirtual |
Get help text for effect to be displayed in the help box.
Reimplemented in qSlicerSegmentEditorEraseEffect, qSlicerSegmentEditorPaintEffect, qSlicerSegmentEditorScissorsEffect, qSlicerSegmentEditorScriptedEffect, qSlicerSegmentEditorScriptedLabelEffect, and qSlicerSegmentEditorScriptedPaintEffect.
Definition at line 124 of file qSlicerSegmentEditorAbstractEffect.h.
|
inlinevirtual |
Get icon for effect to be displayed in segment editor.
Reimplemented in qSlicerSegmentEditorEraseEffect, qSlicerSegmentEditorPaintEffect, qSlicerSegmentEditorScissorsEffect, qSlicerSegmentEditorScriptedEffect, qSlicerSegmentEditorScriptedLabelEffect, and qSlicerSegmentEditorScriptedPaintEffect.
Definition at line 121 of file qSlicerSegmentEditorAbstractEffect.h.
Q_INVOKABLE int qSlicerSegmentEditorAbstractEffect::integerParameter | ( | QString | name | ) |
Get effect-specific or common integer type parameter from effect parameter set node.
|
virtual |
Let the effect know that the interaction node is modified. Default behavior is to deactivate the effect if not in view mode.
Reimplemented in qSlicerSegmentEditorScriptedEffect, and qSlicerSegmentEditorScriptedLabelEffect.
|
inlinevirtual |
Simple mechanism to let the effects know that the layout has changed.
Reimplemented in qSlicerSegmentEditorScriptedEffect, qSlicerSegmentEditorScriptedLabelEffect, and qSlicerSegmentEditorScriptedPaintEffect.
Definition at line 191 of file qSlicerSegmentEditorAbstractEffect.h.
Q_INVOKABLE vtkOrientedImageData * qSlicerSegmentEditorAbstractEffect::maskLabelmap | ( | ) |
Q_INVOKABLE vtkOrientedImageData * qSlicerSegmentEditorAbstractEffect::masterVolumeImageData | ( | ) |
Deprecated. Use sourceVolumeImageData method instead.
|
inlinevirtual |
Deprecated. Override sourceVolumeNodeChanged() method instead.
Reimplemented in qSlicerSegmentEditorScriptedEffect, qSlicerSegmentEditorScriptedLabelEffect, and qSlicerSegmentEditorScriptedPaintEffect.
Definition at line 189 of file qSlicerSegmentEditorAbstractEffect.h.
Q_INVOKABLE vtkOrientedImageData * qSlicerSegmentEditorAbstractEffect::modifierLabelmap | ( | ) |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Get name of effect. This name is used by various modules for accessing an effect. This string is not displayed on the user interface and must not be translated.
Q_INVOKABLE vtkMRMLNode * qSlicerSegmentEditorAbstractEffect::nodeReference | ( | QString | name | ) |
Get effect-specific or common node reference type parameter from effect parameter set node.
Q_INVOKABLE QFrame * qSlicerSegmentEditorAbstractEffect::optionsFrame | ( | ) |
Get effect options frame.
Q_INVOKABLE QFormLayout * qSlicerSegmentEditorAbstractEffect::optionsLayout | ( | ) |
Get layout of options frame.
Q_INVOKABLE QString qSlicerSegmentEditorAbstractEffect::parameter | ( | QString | name | ) |
Get effect-specific or common string type parameter from effect parameter set node.
Q_INVOKABLE bool qSlicerSegmentEditorAbstractEffect::parameterDefined | ( | QString | name | ) |
Returns true if the effect-specific parameter is already defined.
Q_INVOKABLE vtkMRMLSegmentEditorNode * qSlicerSegmentEditorAbstractEffect::parameterSetNode | ( | ) |
Get segment editor parameter set node.
|
virtual |
Get flag indicating whether effect operates on segments (true) or the whole segmentation (false).
|
inlinevirtual |
Callback function invoked when interaction happens
callerInteractor | Interactor object that was observed to catch the event |
eid | Event identifier |
viewWidget | Widget of the Slicer layout view. Can be |
Reimplemented in qSlicerSegmentEditorPaintEffect, qSlicerSegmentEditorScissorsEffect, qSlicerSegmentEditorScriptedEffect, and qSlicerSegmentEditorScriptedLabelEffect.
Definition at line 168 of file qSlicerSegmentEditorAbstractEffect.h.
|
inlinevirtual |
Callback function invoked when view node is modified
callerViewNode | View node that was observed to catch the event. Can be either |
eid | Event identifier |
viewWidget | Widget of the Slicer layout view. Can be |
Reimplemented in qSlicerSegmentEditorPaintEffect, qSlicerSegmentEditorScriptedEffect, and qSlicerSegmentEditorScriptedLabelEffect.
Definition at line 175 of file qSlicerSegmentEditorAbstractEffect.h.
|
static |
Convert RAS position to XY in-slice position.
|
static |
Convert RAS position to XY in-slice position, python accessor method.
|
inlinevirtual |
Simple mechanism to let the effects know that reference geometry has changed NOTE: Base class implementation needs to be called with the effect-specific implementation.
Reimplemented in qSlicerSegmentEditorAbstractLabelEffect, qSlicerSegmentEditorPaintEffect, qSlicerSegmentEditorScriptedEffect, qSlicerSegmentEditorScriptedLabelEffect, and qSlicerSegmentEditorScriptedPaintEffect.
Definition at line 184 of file qSlicerSegmentEditorAbstractEffect.h.
Q_INVOKABLE vtkOrientedImageData * qSlicerSegmentEditorAbstractEffect::referenceGeometryImage | ( | ) |
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::removeActor2D | ( | qMRMLWidget * | viewWidget, |
vtkActor2D * | actor ) |
Remove actor from the renderer of the widget.
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::removeActor3D | ( | qMRMLWidget * | viewWidget, |
vtkProp3D * | actor ) |
Remove actor from the renderer of the widget.
|
static |
Get renderer for view widget.
|
static |
Get render window for view widget.
|
virtual |
If this property is set to true then this effect is enabled only when the segmentation has segment(s) in it.
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::saveStateForUndo | ( | ) |
Signal to the editor that current state has to be saved (for allowing reverting to current segmentation state by undo operation)
Q_INVOKABLE vtkMRMLScene * qSlicerSegmentEditorAbstractEffect::scene | ( | ) |
Get MRML scene (from parameter set node)
|
static |
Q_INVOKABLE bool qSlicerSegmentEditorAbstractEffect::segmentationDisplayableInView | ( | vtkMRMLAbstractViewNode * | viewNode | ) |
Q_INVOKABLE vtkOrientedImageData * qSlicerSegmentEditorAbstractEffect::selectedSegmentLabelmap | ( | ) |
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::selectEffect | ( | QString | effectName | ) |
Emit signal that causes active effect to be changed to the specified one. If the effect name is empty, then the active effect is de-selected.
void qSlicerSegmentEditorAbstractEffect::setCallbackSlots | ( | QObject * | receiver, |
const char * | selectEffectSlot, | ||
const char * | updateVolumeSlot, | ||
const char * | saveStateForUndoSlot ) |
Connect callback signals. Callbacks are called by the editor effect to request operations from the editor widget.
selectEffectSlot | called from the active effect to initiate switching to another effect (or de-select). |
updateVolumeSlot | called to request update of a volume (modifierLabelmap, alignedSourceVolume, maskLabelmap). |
saveStateForUndoSlot | called to request saving of segmentation state for undo operation |
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::setCommonNodeReference | ( | QString | name, |
vtkMRMLNode * | node ) |
Convenience function to set node reference common parameter.
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::setCommonParameter | ( | QString | name, |
double | value ) |
Convenience function to set double common parameter.
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::setCommonParameter | ( | QString | name, |
int | value ) |
Convenience function to set integer common parameter.
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::setCommonParameter | ( | QString | name, |
QString | value ) |
Set parameters that are common for multiple effects. Typically used by base class effects, such as label
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::setCommonParameterDefault | ( | QString | name, |
double | value ) |
Set parameter only if it is not defined already.
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::setCommonParameterDefault | ( | QString | name, |
int | value ) |
Set parameter only if it is not defined already.
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::setCommonParameterDefault | ( | QString | name, |
QString | value ) |
Set parameter only if it is not defined already.
|
pure virtual |
Set default parameters in the parameter MRML node NOTE: Base class implementation needs to be called with the effect-specific implementation
Implemented in qSlicerSegmentEditorAbstractLabelEffect, qSlicerSegmentEditorPaintEffect, qSlicerSegmentEditorScissorsEffect, qSlicerSegmentEditorScriptedEffect, qSlicerSegmentEditorScriptedLabelEffect, and qSlicerSegmentEditorScriptedPaintEffect.
|
virtual |
Set the name of the effect. NOTE: name must be defined in constructor in C++ effects, this can only be used in python scripted ones
Reimplemented in qSlicerSegmentEditorScriptedEffect, qSlicerSegmentEditorScriptedLabelEffect, and qSlicerSegmentEditorScriptedPaintEffect.
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::setNodeReference | ( | QString | name, |
vtkMRMLNode * | node ) |
Convenience function to set node reference parameter
name | Parameter name string |
value | Parameter node reference |
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::setParameter | ( | QString | name, |
double | value ) |
Convenience function to set double parameter
name | Parameter name string |
value | Parameter value double |
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::setParameter | ( | QString | name, |
int | value ) |
Convenience function to set integer parameter
name | Parameter name string |
value | Parameter value integer |
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::setParameter | ( | QString | name, |
QString | value ) |
Set effect parameter in effect parameter set node. This function is called by both convenience functions.
name | Parameter name string |
value | Parameter value string |
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::setParameterDefault | ( | QString | name, |
double | value ) |
Set parameter only if it is not defined already.
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::setParameterDefault | ( | QString | name, |
int | value ) |
Set parameter only if it is not defined already.
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::setParameterDefault | ( | QString | name, |
QString | value ) |
Set parameter only if it is not defined already.
Q_INVOKABLE void qSlicerSegmentEditorAbstractEffect::setParameterSetNode | ( | vtkMRMLSegmentEditorNode * | node | ) |
Set segment editor parameter set node.
|
virtual |
Set flag indicating whether effect operates on segments (true) or the whole segmentation (false). NOTE: name must be defined in constructor in C++ effects, this can only be used in python scripted ones
Reimplemented in qSlicerSegmentEditorScriptedEffect, and qSlicerSegmentEditorScriptedLabelEffect.
|
virtual |
If this property is set to true then this effect is enabled only when the segmentation has segment(s) in it.
Reimplemented in qSlicerSegmentEditorScriptedEffect.
void qSlicerSegmentEditorAbstractEffect::setShowEffectCursorInSliceView | ( | bool | show | ) |
void qSlicerSegmentEditorAbstractEffect::setShowEffectCursorInThreeDView | ( | bool | show | ) |
|
virtual |
Set the title of the effect.
|
inlinevirtual |
Create options frame widgets, make connections, and add them to the main options frame using
Reimplemented in qSlicerSegmentEditorAbstractLabelEffect, qSlicerSegmentEditorPaintEffect, qSlicerSegmentEditorScissorsEffect, qSlicerSegmentEditorScriptedEffect, qSlicerSegmentEditorScriptedLabelEffect, and qSlicerSegmentEditorScriptedPaintEffect.
Definition at line 158 of file qSlicerSegmentEditorAbstractEffect.h.
void qSlicerSegmentEditorAbstractEffect::setVolumes | ( | vtkOrientedImageData * | alignedSourceVolume, |
vtkOrientedImageData * | modifierLabelmap, | ||
vtkOrientedImageData * | maskLabelmap, | ||
vtkOrientedImageData * | selectedSegmentLabelmap, | ||
vtkOrientedImageData * | referenceGeometryImage ) |
Called by the editor widget.
bool qSlicerSegmentEditorAbstractEffect::showEffectCursorInSliceView | ( | ) |
bool qSlicerSegmentEditorAbstractEffect::showEffectCursorInThreeDView | ( | ) |
|
static |
Q_INVOKABLE vtkOrientedImageData * qSlicerSegmentEditorAbstractEffect::sourceVolumeImageData | ( | ) |
Get image data of source volume aligned with the modifier labelmap.
|
inlinevirtual |
Simple mechanism to let the effects know that source volume has changed NOTE: Base class implementation needs to be called with the effect-specific implementation
Reimplemented in qSlicerSegmentEditorAbstractLabelEffect, qSlicerSegmentEditorScriptedEffect, qSlicerSegmentEditorScriptedLabelEffect, and qSlicerSegmentEditorScriptedPaintEffect.
Definition at line 187 of file qSlicerSegmentEditorAbstractEffect.h.
|
virtual |
Get title of effect. This string is displayed on the application GUI and it is translated. Returns the effect's name when the title is empty.
|
pure virtualslot |
Update user interface from parameter set node NOTE: Base class implementation needs to be called with the effect-specific implementation
|
pure virtualslot |
Update parameter set node from user interface NOTE: Base class implementation needs to be called with the effect-specific implementation
|
static |
Get node for view widget.
|
static |
Convert XY in-slice position to image IJK position.
|
static |
Convert XY in-slice position to image IJK position.
|
static |
Convert XY in-slice position to image IJK position, python accessor method.
|
static |
Convert XY in-slice position to RAS position.
|
static |
Convert XY in-slice position to RAS position.
|
static |
Convert XY in-slice position to RAS position, python accessor method.
|
static |
Convert XYZ slice view position to image IJK position,.
|
static |
Convert XYZ slice view position to image IJK position, python accessor method,.
|
static |
Convert XYZ slice view position to RAS position: x,y uses slice (canvas) coordinate system and actually has a 3rd z component (index into the slice you're looking at), hence xyToRAS is really performing xyzToRAS. RAS is patient world coordinate system. Note the 1 is because the transform uses homogeneous coordinates.
|
static |
Convert XYZ slice view position to RAS position, python accessor method.
|
protected |
Definition at line 473 of file qSlicerSegmentEditorAbstractEffect.h.
|
protected |
Definition at line 451 of file qSlicerSegmentEditorAbstractEffect.h.
|
protected |
No confirmation will be displayed for editing this segment. This is needed to ensure that editing of a hidden segment is only asked once.
Definition at line 470 of file qSlicerSegmentEditorAbstractEffect.h.
|
protected |
Definition at line 466 of file qSlicerSegmentEditorAbstractEffect.h.
|
protected |
Definition at line 465 of file qSlicerSegmentEditorAbstractEffect.h.
|
protected |
Definition at line 450 of file qSlicerSegmentEditorAbstractEffect.h.
|
protected |
Flag indicating whether effect operates on individual segments (true) or the whole segmentation (false). If the selected effect works on whole segmentation, selection of the segments does not trigger creation of modifier labelmap, but it is set to empty in the parameter set node. True by default.
Definition at line 458 of file qSlicerSegmentEditorAbstractEffect.h.
|
protected |
Definition at line 460 of file qSlicerSegmentEditorAbstractEffect.h.
|
protected |
Definition at line 462 of file qSlicerSegmentEditorAbstractEffect.h.
|
protected |
Definition at line 463 of file qSlicerSegmentEditorAbstractEffect.h.
|
protected |
Definition at line 452 of file qSlicerSegmentEditorAbstractEffect.h.