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

Show slice intersection lines. More...

#include <Libs/MRML/DisplayableManager/vtkMRMLWindowLevelWidget.h>

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

Public Types

enum  { ModeAdjust, ModeRectangle, ModeRectangleCentered, Mode_Last }
 
enum  { WidgetStateAdjustWindowLevel = WidgetStateUser, WidgetStateAdjustWindowLevelAlternative }
 Widget states. More...
 
enum  {
  WidgetEventResetWindowLevel = WidgetEventUser, WidgetEventAdjustWindowLevelStart, WidgetEventAdjustWindowLevelEnd, WidgetEventAdjustWindowLevelCancel,
  WidgetEventAdjustWindowLevelAlternativeStart, WidgetEventAdjustWindowLevelAlternativeEnd, WidgetEventAdjustWindowLevelAlternativeCancel, WidgetEventAlwaysOnResetWindowLevel,
  WidgetEventAlwaysOnAdjustWindowLevelStart, WidgetEventAlwaysOnAdjustWindowLevelEnd, WidgetEventAlwaysOnAdjustWindowLevelCancel, WidgetEventAlwaysOnAdjustWindowLevelAlternativeStart,
  WidgetEventAlwaysOnAdjustWindowLevelAlternativeEnd, WidgetEventAlwaysOnAdjustWindowLevelAlternativeCancel
}
 Widget events. More...
 
- Public Types inherited from vtkMRMLAbstractWidget
enum  {
  WidgetStateAny, WidgetStateIdle, WidgetStateOnWidget, WidgetStateTranslate,
  WidgetStateRotate, WidgetStateScale, WidgetStateUser
}
 The state of the widget. More...
 
typedef vtkObject Superclass
 Standard methods for a VTK class. More...
 
enum  WidgetEvents {
  WidgetEventNone, WidgetEventMouseMove, WidgetEventTranslateStart, WidgetEventTranslateEnd,
  WidgetEventRotateStart, WidgetEventRotateEnd, WidgetEventScaleStart, WidgetEventScaleEnd,
  WidgetEventPick, WidgetEventJumpCursor, WidgetEventAction, WidgetEventCustomAction1,
  WidgetEventCustomAction2, WidgetEventCustomAction3, WidgetEventCustomAction4, WidgetEventCustomAction5,
  WidgetEventCustomAction6, WidgetEventSelect, WidgetEventUnselect, WidgetEventToggleSelect,
  WidgetEventMenu, WidgetEventReset, WidgetEventUser
}
 Widget events. More...
 

Public Member Functions

virtual void BackgroundVolumeEditableOff ()
 
virtual void BackgroundVolumeEditableOn ()
 
bool CanProcessInteractionEvent (vtkMRMLInteractionEventData *eventData, double &distance2) override
 Return true if the widget can process the event. More...
 
void CreateDefaultRepresentation ()
 
virtual void ForegroundVolumeEditableOff ()
 
virtual void ForegroundVolumeEditableOn ()
 
virtual bool GetBackgroundVolumeEditable ()
 
virtual bool GetForegroundVolumeEditable ()
 
vtkMRMLSliceLogicGetSliceLogic ()
 
vtkMRMLSliceNodeGetSliceNode ()
 
void Leave (vtkMRMLInteractionEventData *eventData) override
 Called when the the widget loses the focus. More...
 
bool ProcessInteractionEvent (vtkMRMLInteractionEventData *eventData) override
 Process interaction event. More...
 
virtual void SetBackgroundVolumeEditable (bool)
 
virtual void SetForegroundVolumeEditable (bool)
 
void SetMRMLApplicationLogic (vtkMRMLApplicationLogic *applicationLogic) override
 
void SetSliceNode (vtkMRMLSliceNode *sliceNode)
 
bool UpdateWindowLevelFromRectangle (int layer, int cornerPoint1[2], int cornerPoint2[2])
 
- Public Member Functions inherited from vtkMRMLAbstractWidget
virtual vtkWidgetEventTranslator * GetEventTranslator (int widgetState)
 
virtual bool GetGrabFocus ()
 
vtkMRMLInteractionNodeGetInteractionNode ()
 
virtual bool GetInteractive ()
 
virtual int GetMouseCursor ()
 
vtkMRMLApplicationLogicGetMRMLApplicationLogic ()
 
virtual bool GetNeedToRender ()
 
virtual int GetNumberOfEventTranslators ()
 
vtkRenderer * GetRenderer ()
 
virtual vtkMRMLAbstractWidgetRepresentationGetRepresentation ()
 Get the representation. More...
 
virtual int GetWidgetState ()
 Convenient method to determine the state of the method. More...
 
virtual void NeedToRenderOff ()
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
void SetEventTranslation (int widgetState, unsigned long interactionEvent, int modifiers, unsigned long widgetEvent)
 
void SetEventTranslation (unsigned long interactionEvent, int modifiers, unsigned long widgetEvent)
 
void SetEventTranslationClickAndDrag (int widgetState, unsigned long startInteractionEvent, int modifiers, int widgetStateDragging, unsigned long widgetStartEvent, unsigned long widgetEndEvent)
 
void SetKeyboardEventTranslation (int modifier, char keyCode, int repeatCount, const char *keySym, unsigned long widgetEvent)
 
void SetKeyboardEventTranslation (int widgetState, int modifier, char keyCode, int repeatCount, const char *keySym, unsigned long widgetEvent)
 
void SetRenderer (vtkRenderer *renderer)
 
virtual void SetRepresentation (vtkMRMLAbstractWidgetRepresentation *r)
 
virtual void SetWidgetState (int)
 Convenient method to change what state the widget is in. More...
 
virtual unsigned long TranslateInteractionEventToWidgetEvent (vtkMRMLInteractionEventData *eventData)
 Get widget event from translation event. More...
 
virtual void UpdateFromMRML (vtkMRMLNode *caller, unsigned long event, void *callData=nullptr)
 Build the actors of the representation with the info stored in the MRML scene. More...
 

Static Public Member Functions

static const char * GetAdjustWindowLevelModeAsString (int id)
 
static int GetAdjustWindowLevelModeFromString (const char *name)
 
static const char * GetInteractionNodeAdjustWindowLevelModeAttributeName ()
 
static vtkMRMLWindowLevelWidgetNew ()
 
- Static Public Member Functions inherited from vtkMRMLAbstractWidget
static int IsTypeOf (const char *type)
 
static vtkMRMLAbstractWidgetSafeDownCast (vtkObject *o)
 

Protected Member Functions

virtual void CenteredRubberBandOff ()
 
virtual void CenteredRubberBandOn ()
 
virtual bool GetCenteredRubberBand ()
 Rubberband is centered around the click position. More...
 
int GetEditableLayerAtEventPosition (vtkMRMLInteractionEventData *eventData)
 
vtkMRMLVolumeNodeGetVolumeNodeFromSliceLayer (int editedLayer)
 
void ProcessAdjustWindowLevel (vtkMRMLInteractionEventData *eventData)
 
bool ProcessAdjustWindowLevelStart (vtkMRMLInteractionEventData *eventData)
 
bool ProcessEndMouseDrag (vtkMRMLInteractionEventData *eventData)
 
bool ProcessMouseMove (vtkMRMLInteractionEventData *eventData)
 
bool ProcessResetWindowLevel (vtkMRMLInteractionEventData *eventData)
 
void ProcessSetWindowLevelFromRegion (vtkMRMLInteractionEventData *eventData)
 
bool ProcessSetWindowLevelFromRegionEnd (vtkMRMLInteractionEventData *eventData, bool updateWindowLevel=true)
 
bool ProcessSetWindowLevelFromRegionStart (vtkMRMLInteractionEventData *eventData)
 
bool ProcessStartMouseDrag (vtkMRMLInteractionEventData *eventData)
 
virtual void SetCenteredRubberBand (bool)
 
bool SetVolumeWindowLevel (double window, double level, bool isAutoWindowLevel)
 
 vtkMRMLWindowLevelWidget ()
 
 ~vtkMRMLWindowLevelWidget () override
 
- Protected Member Functions inherited from vtkMRMLAbstractWidget
bool CanProcessButtonClickEvent (vtkMRMLInteractionEventData *eventData, double &distance2)
 Generate a button click event and checks if it can be processed with CanProcessInteractionEvent. More...
 
const char * GetAssociatedNodeID (vtkMRMLInteractionEventData *eventData)
 
virtual int ProcessButtonClickEvent (vtkMRMLInteractionEventData *eventData)
 
unsigned long TranslateInteractionEventToWidgetEvent (vtkWidgetEventTranslator *translator, vtkMRMLInteractionEventData *eventData)
 Helper function that attempts to translate an event with a specific translator only. More...
 
 vtkMRMLAbstractWidget ()
 
 ~vtkMRMLAbstractWidget () override
 

Protected Attributes

int AdjustMode
 
bool BackgroundVolumeEditable
 
bool CenteredRubberBand
 
bool ForegroundVolumeEditable
 
bool IsStartVolumeAutoWindowLevel
 
double LastVolumeWindowLevel [2]
 
int PreviousEventPosition [2]
 
vtkWeakPointer< vtkMRMLSliceLogicSliceLogic
 
vtkWeakPointer< vtkMRMLSliceNodeSliceNode
 
int StartEventPosition [2]
 
double StartVolumeWindowLevel [2]
 
double VolumeScalarRange [2]
 
int WindowLevelAdjustedLayer
 
- Protected Attributes inherited from vtkMRMLAbstractWidget
vtkWeakPointer< vtkMRMLApplicationLogicApplicationLogic
 
std::vector< vtkSmartPointer< vtkWidgetEventTranslator > > EventTranslators
 
vtkWeakPointer< vtkRenderer > Renderer
 
vtkSmartPointer< vtkMRMLAbstractWidgetRepresentationWidgetRep
 
int WidgetState
 
typedef vtkMRMLAbstractWidget Superclass
 
static int IsTypeOf (const char *type)
 
static vtkMRMLWindowLevelWidgetSafeDownCast (vtkObject *o)
 
virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 

Detailed Description

Show slice intersection lines.

The vtkMRMLWindowLevelWidget allows moving slices by interacting with displayed slice intersection lines.

Definition at line 46 of file vtkMRMLWindowLevelWidget.h.

Member Typedef Documentation

◆ Superclass

Standard VTK class macros.

Definition at line 66 of file vtkMRMLWindowLevelWidget.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ModeAdjust 
ModeRectangle 
ModeRectangleCentered 
Mode_Last 

Definition at line 54 of file vtkMRMLWindowLevelWidget.h.

◆ anonymous enum

anonymous enum

Widget states.

Enumerator
WidgetStateAdjustWindowLevel 
WidgetStateAdjustWindowLevelAlternative 

alternative state: if current mode is region-based then in alternative state the mode is adjustment; if current mode is adjustment then alternative state is region-based

Definition at line 100 of file vtkMRMLWindowLevelWidget.h.

◆ anonymous enum

anonymous enum

Widget events.

Enumerator
WidgetEventResetWindowLevel 
WidgetEventAdjustWindowLevelStart 
WidgetEventAdjustWindowLevelEnd 
WidgetEventAdjustWindowLevelCancel 
WidgetEventAdjustWindowLevelAlternativeStart 
WidgetEventAdjustWindowLevelAlternativeEnd 
WidgetEventAdjustWindowLevelAlternativeCancel 
WidgetEventAlwaysOnResetWindowLevel 
WidgetEventAlwaysOnAdjustWindowLevelStart 
WidgetEventAlwaysOnAdjustWindowLevelEnd 
WidgetEventAlwaysOnAdjustWindowLevelCancel 
WidgetEventAlwaysOnAdjustWindowLevelAlternativeStart 
WidgetEventAlwaysOnAdjustWindowLevelAlternativeEnd 
WidgetEventAlwaysOnAdjustWindowLevelAlternativeCancel 

Definition at line 109 of file vtkMRMLWindowLevelWidget.h.

Constructor & Destructor Documentation

◆ vtkMRMLWindowLevelWidget()

vtkMRMLWindowLevelWidget::vtkMRMLWindowLevelWidget ( )
protected

◆ ~vtkMRMLWindowLevelWidget()

vtkMRMLWindowLevelWidget::~vtkMRMLWindowLevelWidget ( )
overrideprotected

Member Function Documentation

◆ BackgroundVolumeEditableOff()

virtual void vtkMRMLWindowLevelWidget::BackgroundVolumeEditableOff ( )
virtual

◆ BackgroundVolumeEditableOn()

virtual void vtkMRMLWindowLevelWidget::BackgroundVolumeEditableOn ( )
virtual

◆ CanProcessInteractionEvent()

bool vtkMRMLWindowLevelWidget::CanProcessInteractionEvent ( vtkMRMLInteractionEventData eventData,
double &  distance2 
)
overridevirtual

Return true if the widget can process the event.

Reimplemented from vtkMRMLAbstractWidget.

◆ CenteredRubberBandOff()

virtual void vtkMRMLWindowLevelWidget::CenteredRubberBandOff ( )
protectedvirtual

◆ CenteredRubberBandOn()

virtual void vtkMRMLWindowLevelWidget::CenteredRubberBandOn ( )
protectedvirtual

◆ CreateDefaultRepresentation()

void vtkMRMLWindowLevelWidget::CreateDefaultRepresentation ( )

Create the default widget representation if one is not set.

◆ ForegroundVolumeEditableOff()

virtual void vtkMRMLWindowLevelWidget::ForegroundVolumeEditableOff ( )
virtual

◆ ForegroundVolumeEditableOn()

virtual void vtkMRMLWindowLevelWidget::ForegroundVolumeEditableOn ( )
virtual

◆ GetAdjustWindowLevelModeAsString()

static const char* vtkMRMLWindowLevelWidget::GetAdjustWindowLevelModeAsString ( int  id)
static

◆ GetAdjustWindowLevelModeFromString()

static int vtkMRMLWindowLevelWidget::GetAdjustWindowLevelModeFromString ( const char *  name)
static

◆ GetBackgroundVolumeEditable()

virtual bool vtkMRMLWindowLevelWidget::GetBackgroundVolumeEditable ( )
virtual

◆ GetCenteredRubberBand()

virtual bool vtkMRMLWindowLevelWidget::GetCenteredRubberBand ( )
protectedvirtual

Rubberband is centered around the click position.

◆ GetClassName()

virtual const char* vtkMRMLWindowLevelWidget::GetClassName ( )
virtual

Reimplemented from vtkMRMLAbstractWidget.

◆ GetEditableLayerAtEventPosition()

int vtkMRMLWindowLevelWidget::GetEditableLayerAtEventPosition ( vtkMRMLInteractionEventData eventData)
protected

◆ GetForegroundVolumeEditable()

virtual bool vtkMRMLWindowLevelWidget::GetForegroundVolumeEditable ( )
virtual

◆ GetInteractionNodeAdjustWindowLevelModeAttributeName()

static const char* vtkMRMLWindowLevelWidget::GetInteractionNodeAdjustWindowLevelModeAttributeName ( )
inlinestatic

Definition at line 129 of file vtkMRMLWindowLevelWidget.h.

◆ GetSliceLogic()

vtkMRMLSliceLogic* vtkMRMLWindowLevelWidget::GetSliceLogic ( )

◆ GetSliceNode()

vtkMRMLSliceNode* vtkMRMLWindowLevelWidget::GetSliceNode ( )

◆ GetVolumeNodeFromSliceLayer()

vtkMRMLVolumeNode* vtkMRMLWindowLevelWidget::GetVolumeNodeFromSliceLayer ( int  editedLayer)
protected

◆ IsA()

virtual int vtkMRMLWindowLevelWidget::IsA ( const char *  type)
virtual

Reimplemented from vtkMRMLAbstractWidget.

◆ IsTypeOf()

static int vtkMRMLWindowLevelWidget::IsTypeOf ( const char *  type)
static

◆ Leave()

void vtkMRMLWindowLevelWidget::Leave ( vtkMRMLInteractionEventData eventData)
overridevirtual

Called when the the widget loses the focus.

Reimplemented from vtkMRMLAbstractWidget.

◆ New()

static vtkMRMLWindowLevelWidget* vtkMRMLWindowLevelWidget::New ( )
static

Instantiate this class.

◆ PrintSelf()

void vtkMRMLWindowLevelWidget::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
override

◆ ProcessAdjustWindowLevel()

void vtkMRMLWindowLevelWidget::ProcessAdjustWindowLevel ( vtkMRMLInteractionEventData eventData)
protected

◆ ProcessAdjustWindowLevelStart()

bool vtkMRMLWindowLevelWidget::ProcessAdjustWindowLevelStart ( vtkMRMLInteractionEventData eventData)
protected

◆ ProcessEndMouseDrag()

bool vtkMRMLWindowLevelWidget::ProcessEndMouseDrag ( vtkMRMLInteractionEventData eventData)
protected

◆ ProcessInteractionEvent()

bool vtkMRMLWindowLevelWidget::ProcessInteractionEvent ( vtkMRMLInteractionEventData eventData)
overridevirtual

Process interaction event.

Reimplemented from vtkMRMLAbstractWidget.

◆ ProcessMouseMove()

bool vtkMRMLWindowLevelWidget::ProcessMouseMove ( vtkMRMLInteractionEventData eventData)
protected

◆ ProcessResetWindowLevel()

bool vtkMRMLWindowLevelWidget::ProcessResetWindowLevel ( vtkMRMLInteractionEventData eventData)
protected

◆ ProcessSetWindowLevelFromRegion()

void vtkMRMLWindowLevelWidget::ProcessSetWindowLevelFromRegion ( vtkMRMLInteractionEventData eventData)
protected

◆ ProcessSetWindowLevelFromRegionEnd()

bool vtkMRMLWindowLevelWidget::ProcessSetWindowLevelFromRegionEnd ( vtkMRMLInteractionEventData eventData,
bool  updateWindowLevel = true 
)
protected

◆ ProcessSetWindowLevelFromRegionStart()

bool vtkMRMLWindowLevelWidget::ProcessSetWindowLevelFromRegionStart ( vtkMRMLInteractionEventData eventData)
protected

◆ ProcessStartMouseDrag()

bool vtkMRMLWindowLevelWidget::ProcessStartMouseDrag ( vtkMRMLInteractionEventData eventData)
protected

◆ SafeDownCast()

static vtkMRMLWindowLevelWidget* vtkMRMLWindowLevelWidget::SafeDownCast ( vtkObject *  o)
static

◆ SetBackgroundVolumeEditable()

virtual void vtkMRMLWindowLevelWidget::SetBackgroundVolumeEditable ( bool  )
virtual

◆ SetCenteredRubberBand()

virtual void vtkMRMLWindowLevelWidget::SetCenteredRubberBand ( bool  )
protectedvirtual

◆ SetForegroundVolumeEditable()

virtual void vtkMRMLWindowLevelWidget::SetForegroundVolumeEditable ( bool  )
virtual

◆ SetMRMLApplicationLogic()

void vtkMRMLWindowLevelWidget::SetMRMLApplicationLogic ( vtkMRMLApplicationLogic applicationLogic)
overridevirtual

Reimplemented from vtkMRMLAbstractWidget.

◆ SetSliceNode()

void vtkMRMLWindowLevelWidget::SetSliceNode ( vtkMRMLSliceNode sliceNode)

◆ SetVolumeWindowLevel()

bool vtkMRMLWindowLevelWidget::SetVolumeWindowLevel ( double  window,
double  level,
bool  isAutoWindowLevel 
)
protected

◆ UpdateWindowLevelFromRectangle()

bool vtkMRMLWindowLevelWidget::UpdateWindowLevelFromRectangle ( int  layer,
int  cornerPoint1[2],
int  cornerPoint2[2] 
)

Member Data Documentation

◆ AdjustMode

int vtkMRMLWindowLevelWidget::AdjustMode
protected

Definition at line 183 of file vtkMRMLWindowLevelWidget.h.

◆ BackgroundVolumeEditable

bool vtkMRMLWindowLevelWidget::BackgroundVolumeEditable
protected

Definition at line 180 of file vtkMRMLWindowLevelWidget.h.

◆ CenteredRubberBand

bool vtkMRMLWindowLevelWidget::CenteredRubberBand
protected

Definition at line 166 of file vtkMRMLWindowLevelWidget.h.

◆ ForegroundVolumeEditable

bool vtkMRMLWindowLevelWidget::ForegroundVolumeEditable
protected

Definition at line 181 of file vtkMRMLWindowLevelWidget.h.

◆ IsStartVolumeAutoWindowLevel

bool vtkMRMLWindowLevelWidget::IsStartVolumeAutoWindowLevel
protected

Definition at line 174 of file vtkMRMLWindowLevelWidget.h.

◆ LastVolumeWindowLevel

double vtkMRMLWindowLevelWidget::LastVolumeWindowLevel[2]
protected

Definition at line 176 of file vtkMRMLWindowLevelWidget.h.

◆ PreviousEventPosition

int vtkMRMLWindowLevelWidget::PreviousEventPosition[2]
protected

Definition at line 169 of file vtkMRMLWindowLevelWidget.h.

◆ SliceLogic

vtkWeakPointer<vtkMRMLSliceLogic> vtkMRMLWindowLevelWidget::SliceLogic
protected

Definition at line 164 of file vtkMRMLWindowLevelWidget.h.

◆ SliceNode

vtkWeakPointer<vtkMRMLSliceNode> vtkMRMLWindowLevelWidget::SliceNode
protected

Definition at line 161 of file vtkMRMLWindowLevelWidget.h.

◆ StartEventPosition

int vtkMRMLWindowLevelWidget::StartEventPosition[2]
protected

Definition at line 168 of file vtkMRMLWindowLevelWidget.h.

◆ StartVolumeWindowLevel

double vtkMRMLWindowLevelWidget::StartVolumeWindowLevel[2]
protected

Definition at line 175 of file vtkMRMLWindowLevelWidget.h.

◆ VolumeScalarRange

double vtkMRMLWindowLevelWidget::VolumeScalarRange[2]
protected

Definition at line 171 of file vtkMRMLWindowLevelWidget.h.

◆ WindowLevelAdjustedLayer

int vtkMRMLWindowLevelWidget::WindowLevelAdjustedLayer
protected

Definition at line 178 of file vtkMRMLWindowLevelWidget.h.


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