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 | Properties | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions
qMRMLSliceControllerWidget Class Reference

#include <Libs/MRML/Widgets/qMRMLSliceControllerWidget.h>

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

Public Types

typedef qMRMLViewControllerBar Superclass
 Superclass typedef. More...
 
- Public Types inherited from qMRMLViewControllerBar
enum  LayoutBehavior { Popup =0, Panel }
 
typedef qMRMLWidget Superclass
 Superclass typedef. More...
 
- Public Types inherited from qMRMLWidget
typedef QWidget Superclass
 

Properties

bool moreButtonVisibility
 
QString sliceViewLabel
 
QString sliceViewName
 

Public Slots

void fitSliceToBackground ()
 
bool isMoreButtonVisible () const
 
void lockReformatWidgetToCamera (bool lock)
 
void moveBackgroundComboBox (bool move)
 
void rotateSliceToBackground ()
 Rotate to volume plane. More...
 
void setBackgroundHidden (bool hide)
 
void setBackgroundInterpolation (bool nearestNeighbor)
 
void setBackgroundOpacity (double opacity)
 
void setCompositing (int mode)
 Compositing. More...
 
void setCompositingToAdd ()
 
void setCompositingToAlphaBlend ()
 
void setCompositingToReverseAlphaBlend ()
 
void setCompositingToSubtract ()
 
void setForegroundHidden (bool hide)
 
void setForegroundInterpolation (bool nearestNeighbor)
 
void setForegroundOpacity (double opacity)
 
void setHotLinked (bool hot)
 
void setImageDataConnection (vtkAlgorithmOutput *newImageDataConnection)
 Set a new imageData. More...
 
void setLabelMapHidden (bool hide)
 
void setLabelMapOpacity (double opacity)
 Label opacity. More...
 
void setLightbox (int rows, int columns)
 
void setLightboxTo1x1 ()
 
void setLightboxTo1x2 ()
 
void setLightboxTo1x3 ()
 
void setLightboxTo1x4 ()
 
void setLightboxTo1x6 ()
 
void setLightboxTo1x8 ()
 
void setLightboxTo2x2 ()
 
void setLightboxTo3x3 ()
 
void setLightboxTo6x6 ()
 
void setMoreButtonVisible (bool visible)
 
virtual void setMRMLScene (vtkMRMLScene *newScene)
 
void setMRMLSliceNode (vtkMRMLSliceNode *newSliceNode)
 Set a new SliceNode. More...
 
void setOrientationMarkerSize (int size)
 
void setOrientationMarkerType (int type)
 
void setRulerType (int type)
 
void setSegmentationHidden (bool hide)
 
void setSegmentationOpacity (double opacity)
 Segmentation opacity. More...
 
void setSliceFOV (double fov)
 
void setSliceLink (bool linked)
 Link/Unlink the slice controls across all slice viewer. More...
 
void setSliceModelDimension (int index, int dim)
 
void setSliceModelDimensionX (int dim)
 
void setSliceModelDimensionY (int dim)
 
void setSliceModelFOV (int index, double fov)
 
void setSliceModelFOVX (double fov)
 
void setSliceModelFOVY (double fov)
 
void setSliceModelMode (int mode)
 Slice Model. More...
 
void setSliceModelMode2D ()
 
void setSliceModelMode2D_Volumes ()
 
void setSliceModelModeCustom ()
 
void setSliceModelModeVolumes ()
 
void setSliceModelModeVolumes_2D ()
 
void setSliceModelOrigin (int index, double fov)
 
void setSliceModelOriginX (double fov)
 
void setSliceModelOriginY (double fov)
 
void setSliceOffsetValue (double offset)
 Set slice offset. Used to set a single value. More...
 
void setSliceOrientation (const QString &orientation)
 
void setSliceSpacing (double spacing)
 
void setSliceSpacingMode (bool automatic)
 Slice spacing. More...
 
void setSliceViewSize (const QSize &newSize)
 
void setSliceVisible (bool visible)
 Set slice visible. More...
 
void showLabelOutline (bool show)
 Label outline. More...
 
void showReformatWidget (bool show)
 Reformat widget. More...
 
void toggleSegmentationOutlineFill ()
 Segmentation outline/fill. More...
 
void trackSliceOffsetValue (double offset)
 Set slice offset. Used when events will come is rapid succession. More...
 
void updateSegmentationControlsVisibility ()
 
- Public Slots inherited from qMRMLWidget
virtual void setMRMLScene (vtkMRMLScene *newScene)
 Set the MRML scene associated with the widget. More...
 

Signals

void imageDataConnectionChanged (vtkAlgorithmOutput *imageDataConnection)
 This signal is emitted when the given imageData is modified. More...
 
void nodeAboutToBeEdited (vtkMRMLNode *node)
 Signal emitted when editing of a node is requested from within the controller. More...
 
void renderRequested ()
 
- Signals inherited from qMRMLWidget
void mrmlSceneChanged (vtkMRMLScene *)
 

Public Member Functions

vtkAlgorithmOutput * imageDataConnection () const
 
bool isCompareView () const
 Is the view a compare view. More...
 
bool isLinked () const
 Are the slices linked to each other. More...
 
vtkMRMLSliceCompositeNodemrmlSliceCompositeNode () const
 
vtkMRMLSliceNodemrmlSliceNode () const
 
 qMRMLSliceControllerWidget (QWidget *parent=0)
 Constructors. More...
 
void setControllerButtonGroup (QButtonGroup *group)
 
void setSliceLogic (vtkMRMLSliceLogic *newSliceLogic)
 
void setSliceLogics (vtkCollection *logics)
 
void setSliceOffsetRange (double min, double max)
 Set slice offset range. More...
 
void setSliceOffsetResolution (double resolution)
 Set slice offset resolution (increment) More...
 
void setSliceViewColor (const QColor &newSliceViewColor)
 Set the color for the slice view. More...
 
void setSliceViewLabel (const QString &newSliceViewLabel)
 
void setSliceViewName (const QString &newSliceViewName)
 
vtkMRMLSliceLogicsliceLogic () const
 Get SliceLogic. More...
 
QString sliceOrientation () const
 
QColor sliceViewColor () const
 Get the color for the slice view (as a string) More...
 
QString sliceViewLabel () const
 
QString sliceViewName () const
 Get slice view name. More...
 
virtual ~qMRMLSliceControllerWidget ()
 
- Public Member Functions inherited from qMRMLViewControllerBar
QLayout * barLayout ()
 
QWidget * barWidget ()
 
 qMRMLViewControllerBar (QWidget *parent=0)
 Constructors. More...
 
void setLayoutBehavior (LayoutBehavior behavior)
 
virtual ~qMRMLViewControllerBar ()
 
- Public Member Functions inherited from qMRMLWidget
Q_INVOKABLE vtkMRMLScenemrmlScene () const
 Return a pointer on the current MRML scene. More...
 
 qMRMLWidget (QWidget *parent=0, Qt::WindowFlags f=0)
 
virtual ~qMRMLWidget ()
 

Static Public Member Functions

static Q_INVOKABLE QColor sliceViewColor (const QString &sliceViewName)
 Return the color associated to the slice view. More...
 

Protected Member Functions

 qMRMLSliceControllerWidget (qMRMLSliceControllerWidgetPrivate *obj, QWidget *parent)
 
- Protected Member Functions inherited from qMRMLViewControllerBar
 qMRMLViewControllerBar (qMRMLViewControllerBarPrivate *pimpl, QWidget *parent=0)
 

Additional Inherited Members

- Protected Attributes inherited from qMRMLViewControllerBar
QScopedPointer< qMRMLViewControllerBarPrivate > d_ptr
 
- Protected Attributes inherited from qMRMLWidget
QScopedPointer< qMRMLWidgetPrivate > d_ptr
 

Detailed Description

qMRMLSliceControllerWidget offers controls to a slice view (vtkMRMLSliceNode and vtkMRMLSliceCompositeNode). It internally creates a slice logic that can be changed.

To be valid, it needs at least a MRML scene and a MRML slice node:

qMRMLSliceControllerWidget controllerWidget;
controllerWidget.setSliceViewName("Red");
controllerWidget.setSliceViewLabel("R");
controllerWidget.setSliceViewColor(Qt::red);
controllerWidget.setMRMLScene(scene);
controllerWidget.setMRMLSliceNode(sliceNode);

Definition at line 52 of file qMRMLSliceControllerWidget.h.

Member Typedef Documentation

◆ Superclass

Superclass typedef.

Definition at line 61 of file qMRMLSliceControllerWidget.h.

Property Documentation

◆ moreButtonVisibility

bool qMRMLSliceControllerWidget::moreButtonVisibility
readwrite

Definition at line 58 of file qMRMLSliceControllerWidget.h.

◆ sliceViewLabel

QString qMRMLSliceControllerWidget::sliceViewLabel
readwrite

Definition at line 57 of file qMRMLSliceControllerWidget.h.

◆ sliceViewName

QString qMRMLSliceControllerWidget::sliceViewName
readwrite

Definition at line 56 of file qMRMLSliceControllerWidget.h.

Constructor & Destructor Documentation

◆ qMRMLSliceControllerWidget() [1/2]

qMRMLSliceControllerWidget::qMRMLSliceControllerWidget ( QWidget *  parent = 0)
explicit

Constructors.

◆ ~qMRMLSliceControllerWidget()

virtual qMRMLSliceControllerWidget::~qMRMLSliceControllerWidget ( )
virtual

◆ qMRMLSliceControllerWidget() [2/2]

qMRMLSliceControllerWidget::qMRMLSliceControllerWidget ( qMRMLSliceControllerWidgetPrivate *  obj,
QWidget *  parent 
)
protected

Constructor allowing derived class to specify a specialized pimpl.

Note
You are responsible to call init() in the constructor of derived class. Doing so ensures the derived class is fully instantiated in case virtual method are called within init() itself.

Member Function Documentation

◆ fitSliceToBackground

void qMRMLSliceControllerWidget::fitSliceToBackground ( )
slot

Fit slices to background. A No-op if no SliceView has been set.

See also
setSliceView();

◆ imageDataConnection()

vtkAlgorithmOutput* qMRMLSliceControllerWidget::imageDataConnection ( ) const

Get imageData from the slice logic. Returns 0 if there is no volume assigned to Background, Foreground or LabelMap. Or if the only volume assigned doesn't have have a display node or its display node image data is 0.

◆ imageDataConnectionChanged

void qMRMLSliceControllerWidget::imageDataConnectionChanged ( vtkAlgorithmOutput *  imageDataConnection)
signal

This signal is emitted when the given imageData is modified.

◆ isCompareView()

bool qMRMLSliceControllerWidget::isCompareView ( ) const

Is the view a compare view.

◆ isLinked()

bool qMRMLSliceControllerWidget::isLinked ( ) const

Are the slices linked to each other.

◆ isMoreButtonVisible

bool qMRMLSliceControllerWidget::isMoreButtonVisible ( ) const
slot

Get the visibility of the MoreButton which allows to show the advanced controls.

◆ lockReformatWidgetToCamera

void qMRMLSliceControllerWidget::lockReformatWidgetToCamera ( bool  lock)
slot

◆ moveBackgroundComboBox

void qMRMLSliceControllerWidget::moveBackgroundComboBox ( bool  move)
slot

Place background volume combobox in the popup or the bar depending on the state of the More button

◆ mrmlSliceCompositeNode()

vtkMRMLSliceCompositeNode* qMRMLSliceControllerWidget::mrmlSliceCompositeNode ( ) const

Get sliceCompositeNode

See also
vtkMRMLSliceLogic::GetSliceCompositeNode();

◆ mrmlSliceNode()

vtkMRMLSliceNode* qMRMLSliceControllerWidget::mrmlSliceNode ( ) const

Get sliceNode

See also
setMRMLSliceCompositeNode();

◆ nodeAboutToBeEdited

void qMRMLSliceControllerWidget::nodeAboutToBeEdited ( vtkMRMLNode node)
signal

Signal emitted when editing of a node is requested from within the controller.

◆ renderRequested

void qMRMLSliceControllerWidget::renderRequested ( )
signal

◆ rotateSliceToBackground

void qMRMLSliceControllerWidget::rotateSliceToBackground ( )
slot

Rotate to volume plane.

◆ setBackgroundHidden

void qMRMLSliceControllerWidget::setBackgroundHidden ( bool  hide)
slot

◆ setBackgroundInterpolation

void qMRMLSliceControllerWidget::setBackgroundInterpolation ( bool  nearestNeighbor)
slot

◆ setBackgroundOpacity

void qMRMLSliceControllerWidget::setBackgroundOpacity ( double  opacity)
slot

◆ setCompositing

void qMRMLSliceControllerWidget::setCompositing ( int  mode)
slot

Compositing.

◆ setCompositingToAdd

void qMRMLSliceControllerWidget::setCompositingToAdd ( )
slot

◆ setCompositingToAlphaBlend

void qMRMLSliceControllerWidget::setCompositingToAlphaBlend ( )
slot

◆ setCompositingToReverseAlphaBlend

void qMRMLSliceControllerWidget::setCompositingToReverseAlphaBlend ( )
slot

◆ setCompositingToSubtract

void qMRMLSliceControllerWidget::setCompositingToSubtract ( )
slot

◆ setControllerButtonGroup()

void qMRMLSliceControllerWidget::setControllerButtonGroup ( QButtonGroup *  group)

Set controller widget group All controllers of a same group will be set visible or hidden if at least one of the sliceCollapsibleButton of the group is clicked.

◆ setForegroundHidden

void qMRMLSliceControllerWidget::setForegroundHidden ( bool  hide)
slot

◆ setForegroundInterpolation

void qMRMLSliceControllerWidget::setForegroundInterpolation ( bool  nearestNeighbor)
slot

◆ setForegroundOpacity

void qMRMLSliceControllerWidget::setForegroundOpacity ( double  opacity)
slot

◆ setHotLinked

void qMRMLSliceControllerWidget::setHotLinked ( bool  hot)
slot

Set the link mode to hot linked. When on, slice interactions affect other slices immediately. When off, slice interactions affect other slices after the interaction completes.

◆ setImageDataConnection

void qMRMLSliceControllerWidget::setImageDataConnection ( vtkAlgorithmOutput *  newImageDataConnection)
slot

Set a new imageData.

◆ setLabelMapHidden

void qMRMLSliceControllerWidget::setLabelMapHidden ( bool  hide)
slot

◆ setLabelMapOpacity

void qMRMLSliceControllerWidget::setLabelMapOpacity ( double  opacity)
slot

Label opacity.

◆ setLightbox

void qMRMLSliceControllerWidget::setLightbox ( int  rows,
int  columns 
)
slot

◆ setLightboxTo1x1

void qMRMLSliceControllerWidget::setLightboxTo1x1 ( )
slot

◆ setLightboxTo1x2

void qMRMLSliceControllerWidget::setLightboxTo1x2 ( )
slot

◆ setLightboxTo1x3

void qMRMLSliceControllerWidget::setLightboxTo1x3 ( )
slot

◆ setLightboxTo1x4

void qMRMLSliceControllerWidget::setLightboxTo1x4 ( )
slot

◆ setLightboxTo1x6

void qMRMLSliceControllerWidget::setLightboxTo1x6 ( )
slot

◆ setLightboxTo1x8

void qMRMLSliceControllerWidget::setLightboxTo1x8 ( )
slot

◆ setLightboxTo2x2

void qMRMLSliceControllerWidget::setLightboxTo2x2 ( )
slot

◆ setLightboxTo3x3

void qMRMLSliceControllerWidget::setLightboxTo3x3 ( )
slot

◆ setLightboxTo6x6

void qMRMLSliceControllerWidget::setLightboxTo6x6 ( )
slot

◆ setMoreButtonVisible

void qMRMLSliceControllerWidget::setMoreButtonVisible ( bool  visible)
slot

Set the visibility of the MoreButton which allows to show the advanced controls.

◆ setMRMLScene

virtual void qMRMLSliceControllerWidget::setMRMLScene ( vtkMRMLScene newScene)
virtualslot

◆ setMRMLSliceNode

void qMRMLSliceControllerWidget::setMRMLSliceNode ( vtkMRMLSliceNode newSliceNode)
slot

Set a new SliceNode.

◆ setOrientationMarkerSize

void qMRMLSliceControllerWidget::setOrientationMarkerSize ( int  size)
slot

◆ setOrientationMarkerType

void qMRMLSliceControllerWidget::setOrientationMarkerType ( int  type)
slot

◆ setRulerType

void qMRMLSliceControllerWidget::setRulerType ( int  type)
slot

◆ setSegmentationHidden

void qMRMLSliceControllerWidget::setSegmentationHidden ( bool  hide)
slot

◆ setSegmentationOpacity

void qMRMLSliceControllerWidget::setSegmentationOpacity ( double  opacity)
slot

Segmentation opacity.

◆ setSliceFOV

void qMRMLSliceControllerWidget::setSliceFOV ( double  fov)
slot

◆ setSliceLink

void qMRMLSliceControllerWidget::setSliceLink ( bool  linked)
slot

Link/Unlink the slice controls across all slice viewer.

◆ setSliceLogic()

void qMRMLSliceControllerWidget::setSliceLogic ( vtkMRMLSliceLogic newSliceLogic)

Set newSliceLogic Use if two instances of the controller need to observe the same logic.

◆ setSliceLogics()

void qMRMLSliceControllerWidget::setSliceLogics ( vtkCollection *  logics)

TODO: Ideally the slice logics should be retrieved by the sliceLogic until then, we manually set them.

◆ setSliceModelDimension

void qMRMLSliceControllerWidget::setSliceModelDimension ( int  index,
int  dim 
)
slot

◆ setSliceModelDimensionX

void qMRMLSliceControllerWidget::setSliceModelDimensionX ( int  dim)
slot

◆ setSliceModelDimensionY

void qMRMLSliceControllerWidget::setSliceModelDimensionY ( int  dim)
slot

◆ setSliceModelFOV

void qMRMLSliceControllerWidget::setSliceModelFOV ( int  index,
double  fov 
)
slot

◆ setSliceModelFOVX

void qMRMLSliceControllerWidget::setSliceModelFOVX ( double  fov)
slot

◆ setSliceModelFOVY

void qMRMLSliceControllerWidget::setSliceModelFOVY ( double  fov)
slot

◆ setSliceModelMode

void qMRMLSliceControllerWidget::setSliceModelMode ( int  mode)
slot

Slice Model.

◆ setSliceModelMode2D

void qMRMLSliceControllerWidget::setSliceModelMode2D ( )
slot

◆ setSliceModelMode2D_Volumes

void qMRMLSliceControllerWidget::setSliceModelMode2D_Volumes ( )
slot

◆ setSliceModelModeCustom

void qMRMLSliceControllerWidget::setSliceModelModeCustom ( )
slot

◆ setSliceModelModeVolumes

void qMRMLSliceControllerWidget::setSliceModelModeVolumes ( )
slot

◆ setSliceModelModeVolumes_2D

void qMRMLSliceControllerWidget::setSliceModelModeVolumes_2D ( )
slot

◆ setSliceModelOrigin

void qMRMLSliceControllerWidget::setSliceModelOrigin ( int  index,
double  fov 
)
slot

◆ setSliceModelOriginX

void qMRMLSliceControllerWidget::setSliceModelOriginX ( double  fov)
slot

◆ setSliceModelOriginY

void qMRMLSliceControllerWidget::setSliceModelOriginY ( double  fov)
slot

◆ setSliceOffsetRange()

void qMRMLSliceControllerWidget::setSliceOffsetRange ( double  min,
double  max 
)

Set slice offset range.

◆ setSliceOffsetResolution()

void qMRMLSliceControllerWidget::setSliceOffsetResolution ( double  resolution)

Set slice offset resolution (increment)

◆ setSliceOffsetValue

void qMRMLSliceControllerWidget::setSliceOffsetValue ( double  offset)
slot

Set slice offset. Used to set a single value.

◆ setSliceOrientation

void qMRMLSliceControllerWidget::setSliceOrientation ( const QString &  orientation)
slot

Set slice orientation.

Note
Orientation could be either "Axial, "Sagittal", "Coronal" or "Reformat".

◆ setSliceSpacing

void qMRMLSliceControllerWidget::setSliceSpacing ( double  spacing)
slot

◆ setSliceSpacingMode

void qMRMLSliceControllerWidget::setSliceSpacingMode ( bool  automatic)
slot

Slice spacing.

◆ setSliceViewColor()

void qMRMLSliceControllerWidget::setSliceViewColor ( const QColor &  newSliceViewColor)

Set the color for the slice view.

◆ setSliceViewLabel()

void qMRMLSliceControllerWidget::setSliceViewLabel ( const QString &  newSliceViewLabel)

Convenience function to set the abbreviated name for the slice view. This is equivalent to call vtkMRMLSliceNode::SetLayoutLabel() If no SliceNode is set, this is a no-op.

See also
setMRMLSliceNode(), vtkMRMLSliceNode::SetLayoutLabel()

◆ setSliceViewName()

void qMRMLSliceControllerWidget::setSliceViewName ( const QString &  newSliceViewName)

Set slice view name

Note
SliceViewName should be set before setMRMLSliceNode() is called "Red" by default.

◆ setSliceViewSize

void qMRMLSliceControllerWidget::setSliceViewSize ( const QSize &  newSize)
slot

◆ setSliceVisible

void qMRMLSliceControllerWidget::setSliceVisible ( bool  visible)
slot

Set slice visible.

◆ showLabelOutline

void qMRMLSliceControllerWidget::showLabelOutline ( bool  show)
slot

Label outline.

◆ showReformatWidget

void qMRMLSliceControllerWidget::showReformatWidget ( bool  show)
slot

Reformat widget.

◆ sliceLogic()

vtkMRMLSliceLogic* qMRMLSliceControllerWidget::sliceLogic ( ) const

Get SliceLogic.

◆ sliceOrientation()

QString qMRMLSliceControllerWidget::sliceOrientation ( ) const

Get slice orientation

See also
setSliceOrientation(QString);

◆ sliceViewColor() [1/2]

static Q_INVOKABLE QColor qMRMLSliceControllerWidget::sliceViewColor ( const QString &  sliceViewName)
static

Return the color associated to the slice view.

◆ sliceViewColor() [2/2]

QColor qMRMLSliceControllerWidget::sliceViewColor ( ) const

Get the color for the slice view (as a string)

◆ sliceViewLabel()

QString qMRMLSliceControllerWidget::sliceViewLabel ( ) const

Get the abbreviated slice view name.

See also
setSliceViewLabel(), vtkMRMLSliceNode::GetLayoutLabel()

◆ sliceViewName()

QString qMRMLSliceControllerWidget::sliceViewName ( ) const

Get slice view name.

◆ toggleSegmentationOutlineFill

void qMRMLSliceControllerWidget::toggleSegmentationOutlineFill ( )
slot

Segmentation outline/fill.

◆ trackSliceOffsetValue

void qMRMLSliceControllerWidget::trackSliceOffsetValue ( double  offset)
slot

Set slice offset. Used when events will come is rapid succession.

◆ updateSegmentationControlsVisibility

void qMRMLSliceControllerWidget::updateSegmentationControlsVisibility ( )
slot

Show/hide segmentation controls based on More button state and whether there is a segmentation node in the scene


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