Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Public Slots | Public Member Functions | Static Public Member Functions | Protected Attributes
qSlicerSegmentEditorAbstractLabelEffect Class Referenceabstract

Base class for all "label" effects. More...

#include <Modules/Loadable/Segmentations/EditorEffects/qSlicerSegmentEditorAbstractLabelEffect.h>

Inheritance diagram for qSlicerSegmentEditorAbstractLabelEffect:
Inheritance graph
[legend]
Collaboration diagram for qSlicerSegmentEditorAbstractLabelEffect:
Collaboration graph
[legend]

Public Types

typedef qSlicerSegmentEditorAbstractEffect Superclass
 
- Public Types inherited from qSlicerSegmentEditorAbstractEffect
enum  ModificationMode { ModificationModeSet, ModificationModeAdd, ModificationModeRemove }
 
typedef QObject Superclass
 

Public Slots

virtual void updateGUIFromMRML ()
 Update user interface from parameter set node. More...
 
virtual void updateMRMLFromGUI ()
 Update parameter set node from user interface. More...
 
- Public Slots inherited from qSlicerSegmentEditorAbstractEffect
virtual void updateGUIFromMRML ()=0
 
virtual void updateMRMLFromGUI ()=0
 

Public Member Functions

virtual qSlicerSegmentEditorAbstractEffectclone ()=0
 
virtual void masterVolumeNodeChanged ()
 Perform actions needed on master volume change. More...
 
 qSlicerSegmentEditorAbstractLabelEffect (QObject *parent=NULL)
 
virtual void referenceGeometryChanged ()
 Perform actions needed on reference geometry change. More...
 
virtual void setMRMLDefaults ()
 Set default parameters in the parameter MRML node. More...
 
virtual void setupOptionsFrame ()
 Create options frame widgets, make connections, and add them to the main options frame using. More...
 
virtual ~qSlicerSegmentEditorAbstractLabelEffect ()
 
- Public Member Functions inherited from qSlicerSegmentEditorAbstractEffect
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) More...
 
Q_INVOKABLE void addActor2D (qMRMLWidget *viewWidget, vtkActor2D *actor)
 
Q_INVOKABLE void addActor3D (qMRMLWidget *viewWidget, vtkProp3D *actor)
 
Q_INVOKABLE QWidget * addLabeledOptionsWidget (QString label, QWidget *newOptionsWidget)
 
Q_INVOKABLE QWidget * addLabeledOptionsWidget (QString label, QLayout *newOptionsWidget)
 
Q_INVOKABLE void addOptionsWidget (QWidget *newOptionsWidget)
 
Q_INVOKABLE void addOptionsWidget (QLayout *newOptionsWidget)
 
Q_INVOKABLE bool commonParameterDefined (QString name)
 Returns true if the common parameter is already defined. More...
 
virtual QCursor createCursor (qMRMLWidget *viewWidget)
 Create a cursor customized for the given effect, potentially for each view. More...
 
Q_INVOKABLE void cursorOff (qMRMLWidget *viewWidget)
 Turn off cursor and save cursor to restore later. More...
 
Q_INVOKABLE void cursorOn (qMRMLWidget *viewWidget)
 Restore saved cursor. More...
 
virtual Q_INVOKABLE void deactivate ()
 
Q_INVOKABLE vtkOrientedImageDatadefaultModifierLabelmap ()
 
Q_INVOKABLE double doubleParameter (QString name)
 Convenience function to get double parameter. More...
 
virtual Q_INVOKABLE const QString helpText () const
 Get help text for effect to be displayed in the help box. More...
 
virtual QIcon icon ()
 Get icon for effect to be displayed in segment editor. More...
 
Q_INVOKABLE int integerParameter (QString name)
 Convenience function to get integer parameter. More...
 
virtual void interactionNodeModified (vtkMRMLInteractionNode *interactionNode)
 
virtual void layoutChanged ()
 Simple mechanism to let the effects know that the layout has changed. More...
 
Q_INVOKABLE vtkOrientedImageDatamaskLabelmap ()
 
Q_INVOKABLE vtkOrientedImageDatamasterVolumeImageData ()
 
Q_INVOKABLE vtkOrientedImageDatamodifierLabelmap ()
 
virtual Q_INVOKABLE void modifySelectedSegmentByLabelmap (vtkOrientedImageData *modifierLabelmap, ModificationMode modificationMode, const int modificationExtent[6])
 
virtual Q_INVOKABLE void modifySelectedSegmentByLabelmap (vtkOrientedImageData *modifierLabelmap, ModificationMode modificationMode)
 
virtual Q_INVOKABLE void modifySelectedSegmentByLabelmap (vtkOrientedImageData *modifierLabelmap, ModificationMode modificationMode, QList< int > extent)
 
virtual QString name () const
 Get name of effect. More...
 
Q_INVOKABLE QFrame * optionsFrame ()
 Get effect options frame. More...
 
Q_INVOKABLE QFormLayout * optionsLayout ()
 Get layout of options frame. More...
 
Q_INVOKABLE QString parameter (QString name)
 Get effect or common parameter from effect parameter set node. More...
 
Q_INVOKABLE bool parameterDefined (QString name)
 Returns true if the effect-specific parameter is already defined. More...
 
Q_INVOKABLE vtkMRMLSegmentEditorNodeparameterSetNode ()
 Get segment editor parameter set node. More...
 
virtual bool perSegment () const
 Get flag indicating whether effect operates on segments (true) or the whole segmentation (false). More...
 
virtual bool processInteractionEvents (vtkRenderWindowInteractor *callerInteractor, unsigned long eid, qMRMLWidget *viewWidget)
 
virtual void processViewNodeEvents (vtkMRMLAbstractViewNode *callerViewNode, unsigned long eid, qMRMLWidget *viewWidget)
 
 qSlicerSegmentEditorAbstractEffect (QObject *parent=NULL)
 
Q_INVOKABLE vtkOrientedImageDatareferenceGeometryImage ()
 
Q_INVOKABLE void removeActor2D (qMRMLWidget *viewWidget, vtkActor2D *actor)
 Remove actor from the renderer of the widget. More...
 
Q_INVOKABLE void removeActor3D (qMRMLWidget *viewWidget, vtkProp3D *actor)
 Remove actor from the renderer of the widget. More...
 
Q_INVOKABLE void saveStateForUndo ()
 
Q_INVOKABLE vtkMRMLScenescene ()
 Get MRML scene (from parameter set node) More...
 
Q_INVOKABLE bool segmentationDisplayableInView (vtkMRMLAbstractViewNode *viewNode)
 
Q_INVOKABLE vtkOrientedImageDataselectedSegmentLabelmap ()
 
Q_INVOKABLE void selectEffect (QString effectName)
 
void setCallbackSlots (QObject *receiver, const char *selectEffectSlot, const char *updateVolumeSlot, const char *saveStateForUndoSlot)
 
Q_INVOKABLE void setCommonParameter (QString name, QString value)
 
Q_INVOKABLE void setCommonParameter (QString name, int value)
 Convenience function to set integer common parameter. More...
 
Q_INVOKABLE void setCommonParameter (QString name, double value)
 Convenience function to set double common parameter. More...
 
Q_INVOKABLE void setCommonParameterDefault (QString name, QString value)
 
Q_INVOKABLE void setCommonParameterDefault (QString name, int value)
 
Q_INVOKABLE void setCommonParameterDefault (QString name, double value)
 
virtual void setName (QString name)
 
Q_INVOKABLE void setParameter (QString name, QString value)
 
Q_INVOKABLE void setParameter (QString name, int value)
 
Q_INVOKABLE void setParameter (QString name, double value)
 
Q_INVOKABLE void setParameterDefault (QString name, QString value)
 
Q_INVOKABLE void setParameterDefault (QString name, int value)
 
Q_INVOKABLE void setParameterDefault (QString name, double value)
 
Q_INVOKABLE void setParameterSetNode (vtkMRMLSegmentEditorNode *node)
 Set segment editor parameter set node. More...
 
virtual void setPerSegment (bool perSegment)
 
void setShowEffectCursorInSliceView (bool show)
 
void setShowEffectCursorInThreeDView (bool show)
 
void setVolumes (vtkOrientedImageData *alignedMasterVolume, vtkOrientedImageData *modifierLabelmap, vtkOrientedImageData *maskLabelmap, vtkOrientedImageData *selectedSegmentLabelmap, vtkOrientedImageData *referenceGeometryImage)
 Called by the editor widget. More...
 
bool showEffectCursorInSliceView ()
 
bool showEffectCursorInThreeDView ()
 
virtual ~qSlicerSegmentEditorAbstractEffect ()
 

Static Public Member Functions

static Q_INVOKABLE void appendImage (vtkOrientedImageData *inputImage, vtkOrientedImageData *appendedImage)
 Append image onto image. Resamples appended image and saves result in input image. More...
 
static Q_INVOKABLE void appendPolyMask (vtkOrientedImageData *input, vtkPolyData *polyData, qMRMLSliceWidget *sliceWidget)
 Rasterize a poly data onto the input image into the slice view. More...
 
static Q_INVOKABLE void createMaskImageFromPolyData (vtkPolyData *polyData, vtkOrientedImageData *outputMask, qMRMLSliceWidget *sliceWidget)
 Create a slice view screen space (2D) mask image for the given polydata. More...
 
static Q_INVOKABLE void imageToWorldMatrix (vtkMRMLVolumeNode *node, vtkMatrix4x4 *ijkToRas)
 
static Q_INVOKABLE void imageToWorldMatrix (vtkOrientedImageData *image, vtkMRMLSegmentationNode *node, vtkMatrix4x4 *ijkToRas)
 
- Static Public Member Functions inherited from qSlicerSegmentEditorAbstractEffect
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. More...
 
static Q_INVOKABLE QPoint rasToXy (QVector3D ras, qMRMLSliceWidget *sliceWidget)
 Convert RAS position to XY in-slice position, python accessor method. More...
 
static Q_INVOKABLE vtkRenderer * renderer (qMRMLWidget *viewWidget)
 Get renderer for view widget. More...
 
static Q_INVOKABLE vtkRenderWindow * renderWindow (qMRMLWidget *viewWidget)
 Get render window for view widget. More...
 
static Q_INVOKABLE void scheduleRender (qMRMLWidget *viewWidget)
 
static Q_INVOKABLE double sliceSpacing (qMRMLSliceWidget *sliceWidget)
 
static Q_INVOKABLE vtkMRMLAbstractViewNodeviewNode (qMRMLWidget *viewWidget)
 Get node for view widget. More...
 
static void xyToIjk (QPoint xy, int outputIjk[3], qMRMLSliceWidget *sliceWidget, vtkOrientedImageData *image)
 Convert XY in-slice position to image IJK position. More...
 
static void xyToIjk (double xy[2], int outputIjk[3], qMRMLSliceWidget *sliceWidget, vtkOrientedImageData *image)
 Convert XY in-slice position to image IJK position. More...
 
static Q_INVOKABLE QVector3D xyToIjk (QPoint xy, qMRMLSliceWidget *sliceWidget, vtkOrientedImageData *image)
 Convert XY in-slice position to image IJK position, python accessor method. More...
 
static void xyToRas (QPoint xy, double outputRas[3], qMRMLSliceWidget *sliceWidget)
 Convert XY in-slice position to RAS position. More...
 
static void xyToRas (double xy[2], double outputRas[3], qMRMLSliceWidget *sliceWidget)
 Convert XY in-slice position to RAS position. More...
 
static Q_INVOKABLE QVector3D xyToRas (QPoint xy, qMRMLSliceWidget *sliceWidget)
 Convert XY in-slice position to RAS position, python accessor method. More...
 
static void xyzToIjk (double inputXyz[3], int outputIjk[3], qMRMLSliceWidget *sliceWidget, vtkOrientedImageData *image)
 Convert XYZ slice view position to image IJK position,. More...
 
static Q_INVOKABLE QVector3D xyzToIjk (QVector3D inputXyz, qMRMLSliceWidget *sliceWidget, vtkOrientedImageData *image)
 Convert XYZ slice view position to image IJK position, python accessor method,. More...
 
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. More...
 

Protected Attributes

QScopedPointer< qSlicerSegmentEditorAbstractLabelEffectPrivate > d_ptr
 
- Protected Attributes inherited from qSlicerSegmentEditorAbstractEffect
QScopedPointer< qSlicerSegmentEditorAbstractEffectPrivate > d_ptr
 
bool m_Active
 
double m_EraseValue
 
double m_FillValue
 
QString m_Name
 Name of the effect. More...
 
bool m_PerSegment
 
bool m_ShowEffectCursorInSliceView
 
bool m_ShowEffectCursorInThreeDView
 

Additional Inherited Members

- Properties inherited from qSlicerSegmentEditorAbstractEffect
QString name
 
bool perSegment
 
bool showEffectCursorInSliceView
 
bool showEffectCursorInThreeDView
 

Detailed Description

Base class for all "label" effects.

This base class provides common GUI and MRML for the options PaintOver and Threshold.

Definition at line 41 of file qSlicerSegmentEditorAbstractLabelEffect.h.

Member Typedef Documentation

◆ Superclass

Definition at line 48 of file qSlicerSegmentEditorAbstractLabelEffect.h.

Constructor & Destructor Documentation

◆ qSlicerSegmentEditorAbstractLabelEffect()

qSlicerSegmentEditorAbstractLabelEffect::qSlicerSegmentEditorAbstractLabelEffect ( QObject *  parent = NULL)

◆ ~qSlicerSegmentEditorAbstractLabelEffect()

virtual qSlicerSegmentEditorAbstractLabelEffect::~qSlicerSegmentEditorAbstractLabelEffect ( )
virtual

Member Function Documentation

◆ appendImage()

static Q_INVOKABLE void qSlicerSegmentEditorAbstractLabelEffect::appendImage ( vtkOrientedImageData inputImage,
vtkOrientedImageData appendedImage 
)
static

Append image onto image. Resamples appended image and saves result in input image.

◆ appendPolyMask()

static Q_INVOKABLE void qSlicerSegmentEditorAbstractLabelEffect::appendPolyMask ( vtkOrientedImageData input,
vtkPolyData *  polyData,
qMRMLSliceWidget sliceWidget 
)
static

Rasterize a poly data onto the input image into the slice view.

◆ clone()

virtual qSlicerSegmentEditorAbstractEffect* qSlicerSegmentEditorAbstractLabelEffect::clone ( )
pure virtual

Clone editor effect (redefinition of pure virtual function to allow python wrapper to identify this as abstract class)

Implements qSlicerSegmentEditorAbstractEffect.

Implemented in qSlicerSegmentEditorScriptedLabelEffect, qSlicerSegmentEditorScissorsEffect, qSlicerSegmentEditorPaintEffect, and qSlicerSegmentEditorEraseEffect.

◆ createMaskImageFromPolyData()

static Q_INVOKABLE void qSlicerSegmentEditorAbstractLabelEffect::createMaskImageFromPolyData ( vtkPolyData *  polyData,
vtkOrientedImageData outputMask,
qMRMLSliceWidget sliceWidget 
)
static

Create a slice view screen space (2D) mask image for the given polydata.

◆ imageToWorldMatrix() [1/2]

static Q_INVOKABLE void qSlicerSegmentEditorAbstractLabelEffect::imageToWorldMatrix ( vtkMRMLVolumeNode node,
vtkMatrix4x4 *  ijkToRas 
)
static

Return matrix for volume node that takes into account the IJKToRAS and any linear transforms that have been applied

◆ imageToWorldMatrix() [2/2]

static Q_INVOKABLE void qSlicerSegmentEditorAbstractLabelEffect::imageToWorldMatrix ( vtkOrientedImageData image,
vtkMRMLSegmentationNode node,
vtkMatrix4x4 *  ijkToRas 
)
static

Return matrix for oriented image data that takes into account the image to world and any linear transforms that have been applied on the given segmentation

◆ masterVolumeNodeChanged()

virtual void qSlicerSegmentEditorAbstractLabelEffect::masterVolumeNodeChanged ( )
virtual

Perform actions needed on master volume change.

Reimplemented from qSlicerSegmentEditorAbstractEffect.

Reimplemented in qSlicerSegmentEditorScriptedLabelEffect.

◆ referenceGeometryChanged()

virtual void qSlicerSegmentEditorAbstractLabelEffect::referenceGeometryChanged ( )
virtual

Perform actions needed on reference geometry change.

Reimplemented from qSlicerSegmentEditorAbstractEffect.

Reimplemented in qSlicerSegmentEditorScriptedLabelEffect, and qSlicerSegmentEditorPaintEffect.

◆ setMRMLDefaults()

virtual void qSlicerSegmentEditorAbstractLabelEffect::setMRMLDefaults ( )
virtual

Set default parameters in the parameter MRML node.

Implements qSlicerSegmentEditorAbstractEffect.

Reimplemented in qSlicerSegmentEditorScriptedLabelEffect, qSlicerSegmentEditorPaintEffect, and qSlicerSegmentEditorScissorsEffect.

◆ setupOptionsFrame()

virtual void qSlicerSegmentEditorAbstractLabelEffect::setupOptionsFrame ( )
virtual

Create options frame widgets, make connections, and add them to the main options frame using.

See also
addOptionsWidget

Reimplemented from qSlicerSegmentEditorAbstractEffect.

Reimplemented in qSlicerSegmentEditorScriptedLabelEffect, qSlicerSegmentEditorPaintEffect, and qSlicerSegmentEditorScissorsEffect.

◆ updateGUIFromMRML

virtual void qSlicerSegmentEditorAbstractLabelEffect::updateGUIFromMRML ( )
virtualslot

Update user interface from parameter set node.

◆ updateMRMLFromGUI

virtual void qSlicerSegmentEditorAbstractLabelEffect::updateMRMLFromGUI ( )
virtualslot

Update parameter set node from user interface.

Member Data Documentation

◆ d_ptr

QScopedPointer<qSlicerSegmentEditorAbstractLabelEffectPrivate> qSlicerSegmentEditorAbstractLabelEffect::d_ptr
protected

Definition at line 97 of file qSlicerSegmentEditorAbstractLabelEffect.h.


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