vtkSlicerColorDisplayWidget Class Reference

#include <vtkSlicerColorDisplayWidget.h>

Inheritance diagram for vtkSlicerColorDisplayWidget:
vtkSlicerWidget vtkKWCompositeWidget

List of all members.

Public Types

enum  { ColorIDModifiedEvent = 30000, SelectedColorModifiedEvent = 30001 }

Public Member Functions

virtual void AddMRMLObservers ()
int GetSelectedColorIndex ()
void PrintSelf (ostream &os, vtkIndent indent)
virtual void ProcessMRMLEvents (vtkObject *caller, unsigned long event, void *callData)
virtual void ProcessWidgetEvents (vtkObject *caller, unsigned long event, void *callData)
virtual void RemoveMRMLObservers ()
virtual void RemoveWidgetObservers ()
void SetColorNode (vtkMRMLColorNode *node)
void SetColorNodeID (char *id)
void SetSelectedColorIndex (int index)
virtual void SetViewerWidget (vtkSlicerViewerWidget *viewerWidget)
void UpdateElement (int row, int col, char *str)
virtual void UpdateEnableState (void)
 vtkBooleanMacro (MultiSelectMode, int)
 vtkGetObjectMacro (ScalarBarWidget, vtkScalarBarWidget)
 vtkGetObjectMacro (ViewerWidget, vtkSlicerViewerWidget)
 vtkGetObjectMacro (ColorNode, vtkMRMLColorNode)
 vtkGetObjectMacro (ScalarBarAnnotation, vtkKWScalarBarAnnotation)
 vtkGetObjectMacro (ColorSelectorWidget, vtkSlicerNodeSelectorWidget)
 vtkGetObjectMacro (NodeHelpWidget, vtkSlicerPopUpHelpWidget)
 vtkGetObjectMacro (MultiColumnList, vtkKWMultiColumnListWithScrollbars)
 vtkGetObjectMacro (NumberOfColorsLabel, vtkKWLabel)
 vtkGetObjectMacro (ColorNodeTypeLabel, vtkKWLabel)
 vtkGetStringMacro (ColorNodeID)
 vtkSetMacro (MultiSelectMode, int)
 vtkTypeRevisionMacro (vtkSlicerColorDisplayWidget, vtkSlicerWidget)

Static Public Member Functions

New ()

Protected Types

enum  { EntryColumn = 0, NameColumn = 1, ColourColumn = 2 }

vtkKWChangeColorButton *ChangeColorButton;


Protected Member Functions

virtual void CreateWidget ()
void UpdateMRML ()
void UpdateSelectedColor ()
void UpdateWidget ()
 vtkSlicerColorDisplayWidget ()
virtual ~vtkSlicerColorDisplayWidget ()

Protected Attributes

vtkKWLabel * ColorNodeTypeLabel
vtkKWEntryWithLabel * MaxRangeEntry
vtkKWEntryWithLabel * MinRangeEntry
vtkKWMultiColumnListWithScrollbars * MultiColumnList
int MultiSelectMode
vtkKWLabel * NumberOfColorsLabel
int NumberOfColumns
vtkKWScalarBarAnnotation * ScalarBarAnnotation
vtkScalarBarWidget * ScalarBarWidget
vtkKWLabel * SelectedColorLabel
vtkKWCheckButton * ShowOnlyNamedColorsCheckButton

Private Member Functions

void operator= (const vtkSlicerColorDisplayWidget &)
 Not implemented.
 vtkSlicerColorDisplayWidget (const vtkSlicerColorDisplayWidget &)

Member Enumeration Documentation

anonymous enum

ColorIDModifiedEvent is generated when the ColorNodeID is changed

anonymous enum [protected]

vtkKWChangeColorButton *ChangeColorButton;

The column orders in the list box


Constructor & Destructor Documentation

vtkSlicerColorDisplayWidget::vtkSlicerColorDisplayWidget (  )  [protected]
vtkSlicerColorDisplayWidget::~vtkSlicerColorDisplayWidget (  )  [protected, virtual]
vtkSlicerColorDisplayWidget::vtkSlicerColorDisplayWidget ( const vtkSlicerColorDisplayWidget  )  [private]

Member Function Documentation

void vtkSlicerColorDisplayWidget::AddMRMLObservers (  )  [virtual]

add observers on color node

Referenced by SetColorNode().

void vtkSlicerColorDisplayWidget::CreateWidget ( void   )  [protected, virtual]
int vtkSlicerColorDisplayWidget::GetSelectedColorIndex (  ) 

Return the index of the currently selected colour in the multi column list box, for use by other classes when they wish to call GetColor on the vtkMRMLColorNode. Returns -1 if no list box or no selection, or if more than one row is selected.

References EntryColumn, MultiColumnList, and MultiSelectMode.

Referenced by UpdateSelectedColor().

static vtkSlicerColorDisplayWidget* vtkSlicerColorDisplayWidget::New (  )  [static]

Reimplemented from vtkSlicerWidget.

Referenced by CreateWidget(), and SetColorNodeID().

void vtkSlicerColorDisplayWidget::operator= ( const vtkSlicerColorDisplayWidget  )  [private]

Not implemented.

Reimplemented from vtkSlicerWidget.

void vtkSlicerColorDisplayWidget::PrintSelf ( ostream &  os,
vtkIndent  indent 

Reimplemented from vtkSlicerWidget.

virtual void vtkSlicerColorDisplayWidget::ProcessMRMLEvents ( vtkObject caller,
unsigned long  event,
void *  callData 
) [virtual]

alternative method to propagate events generated in GUI to logic / mrml

virtual void vtkSlicerColorDisplayWidget::ProcessWidgetEvents ( vtkObject caller,
unsigned long  event,
void *  callData 
) [virtual]

alternative method to propagate events generated in GUI to logic / mrml

void vtkSlicerColorDisplayWidget::RemoveMRMLObservers (  )  [virtual]

remove observers on color node

Referenced by SetColorNode(), and ~vtkSlicerColorDisplayWidget().

void vtkSlicerColorDisplayWidget::RemoveWidgetObservers (  )  [virtual]
void vtkSlicerColorDisplayWidget::SetColorNode ( vtkMRMLColorNode node  ) 
void vtkSlicerColorDisplayWidget::SetColorNodeID ( char id  ) 
void vtkSlicerColorDisplayWidget::SetSelectedColorIndex ( int  index  ) 
void vtkSlicerColorDisplayWidget::SetViewerWidget ( vtkSlicerViewerWidget viewerWidget  )  [virtual]
void vtkSlicerColorDisplayWidget::UpdateElement ( int  row,
int  col,
char str 
void vtkSlicerColorDisplayWidget::UpdateEnableState ( void   )  [virtual]
void vtkSlicerColorDisplayWidget::UpdateMRML (  )  [protected]
void vtkSlicerColorDisplayWidget::UpdateSelectedColor (  )  [protected]

Called when the selected row changes, just update the label, called from UpdateWidget

References GetSelectedColorIndex(), and SelectedColorLabel.

Referenced by SetSelectedColorIndex(), and UpdateWidget().

void vtkSlicerColorDisplayWidget::UpdateWidget (  )  [protected]
vtkSlicerColorDisplayWidget::vtkBooleanMacro ( MultiSelectMode  ,
vtkSlicerColorDisplayWidget::vtkGetObjectMacro ( ScalarBarWidget  ,

Get the scalar bar widget

vtkSlicerColorDisplayWidget::vtkGetObjectMacro ( ViewerWidget  ,

API for setting ColorNode, and observing it Once know that the GUI has to be cleared and updated to show elements from a new list, use this call virtual void SetGUIFromNode(vtkMRMLColorNode * activeColorNode); Get/set the viewer widget so can add a the scalar bar widget to it

vtkSlicerColorDisplayWidget::vtkGetObjectMacro ( ColorNode  ,

Get the color node, needed for the Editor

vtkSlicerColorDisplayWidget::vtkGetObjectMacro ( ScalarBarAnnotation  ,
vtkSlicerColorDisplayWidget::vtkGetObjectMacro ( ColorSelectorWidget  ,
vtkSlicerColorDisplayWidget::vtkGetObjectMacro ( NodeHelpWidget  ,
vtkSlicerColorDisplayWidget::vtkGetObjectMacro ( MultiColumnList  ,
vtkSlicerColorDisplayWidget::vtkGetObjectMacro ( NumberOfColorsLabel  ,
vtkSlicerColorDisplayWidget::vtkGetObjectMacro ( ColorNodeTypeLabel  ,

Get methods on class members ( no Set methods required. )

vtkSlicerColorDisplayWidget::vtkGetStringMacro ( ColorNodeID   ) 

Getting and setting the mrml color node id

vtkSlicerColorDisplayWidget::vtkSetMacro ( MultiSelectMode  ,
vtkSlicerColorDisplayWidget::vtkTypeRevisionMacro ( vtkSlicerColorDisplayWidget  ,

Member Data Documentation

The the color node that is currently displayed in the widget

Referenced by SetColorNodeID(), vtkSlicerColorDisplayWidget(), and ~vtkSlicerColorDisplayWidget().

id of the color node displayed in the widget

Referenced by SetColorNodeID(), UpdateWidget(), and vtkSlicerColorDisplayWidget().

vtkKWEntryWithLabel* vtkSlicerColorDisplayWidget::MaxRangeEntry [protected]
vtkKWEntryWithLabel* vtkSlicerColorDisplayWidget::MinRangeEntry [protected]
vtkKWMultiColumnListWithScrollbars* vtkSlicerColorDisplayWidget::MultiColumnList [protected]

Decides if MultipleColumns can be selected or not

Referenced by CreateWidget(), and GetSelectedColorIndex().

pop up help describing the nodes

Referenced by CreateWidget(), vtkSlicerColorDisplayWidget(), and ~vtkSlicerColorDisplayWidget().

displays the number of colours in the table

Referenced by CreateWidget(), UpdateEnableState(), UpdateWidget(), vtkSlicerColorDisplayWidget(), and ~vtkSlicerColorDisplayWidget().

vtkKWScalarBarAnnotation* vtkSlicerColorDisplayWidget::ScalarBarAnnotation [protected]

Control the parameters for a scalar bar widget

Referenced by CreateWidget(), UpdateEnableState(), vtkSlicerColorDisplayWidget(), and ~vtkSlicerColorDisplayWidget().

vtkScalarBarWidget* vtkSlicerColorDisplayWidget::ScalarBarWidget [protected]

a widget that manipulates a scalar bar actor (integrated).

Referenced by CreateWidget(), UpdateWidget(), vtkSlicerColorDisplayWidget(), and ~vtkSlicerColorDisplayWidget().

a pointer back to the viewer widget, useful for displaying the scalar bar actor

Referenced by SetViewerWidget(), UpdateMRML(), and vtkSlicerColorDisplayWidget().

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

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1