vtkSlicerViewerWidget Class Reference

#include <vtkSlicerViewerWidget.h>

Inheritance diagram for vtkSlicerViewerWidget:
vtkSlicerWidget vtkKWCompositeWidget

List of all members.

Public Types

enum  { ActiveCameraChangedEvent = 30000 }

Public Member Functions

void AddAxisActors ()
void AddCameraObservers ()
void AddHierarchiyObservers ()
void AddMRMLSceneObservers ()
void CheckModelHierarchies ()
void ColorAxisLabelActors (double r, double g, double b)
void CreateAxis ()
void CreateClipSlices ()
vtkClipPolyData * CreateTransformedClipper (vtkMRMLDisplayableNode *model)
virtual void CreateWidget ()
vtkProp3DGetActorByID (const char *id)
int GetDisplayedModelsVisibility (vtkMRMLDisplayNode *model)
std::vector< vtkMRMLDisplayNode * > GetDisplayNode (vtkMRMLDisplayableNode *model)
vtkMRMLDisplayNodeGetHierarchyDisplayNode (vtkMRMLDisplayableNode *model)
const charGetIDByActor (vtkProp3D *actor)
const charGetPickedNodeName ()
virtual void GridSpanWidget (vtkKWFrame *f, int row, int col, int rowspan, int colspan)
virtual void GridWidget (vtkKWFrame *f, int row, int col)
virtual void PackWidget (vtkKWFrame *f)
int Pick (int x, int y)
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 Register (vtkObjectBase *o)
void RemoveCameraObservers ()
void RemoveDispalyedID (std::string &id)
void RemoveDisplayable (vtkMRMLDisplayableNode *model)
void RemoveHierarchyObservers (int clearCache)
void RemoveModelObservers (vtkMRMLDisplayableNode *model)
void RemoveModelObservers (int clearCache)
void RemoveModelProps ()
virtual void RemoveMRMLObservers ()
virtual void RemoveWidgetObservers ()
void Render ()
void RequestCameraNodeUpdate ()
void RequestRender ()
void ResetPick ()
void SetAndObserveCameraNode (vtkMRMLCameraNode *snode)
void SetAndObserveViewNode (vtkMRMLViewNode *snode)
void SetBoxWidgetInteractor ()
void SetClipModelsNode (vtkMRMLClipModelsNode *snode)
void SetClipPlaneFromMatrix (vtkMatrix4x4 *sliceMatrix, int planeDirection, vtkPlane *plane)
void SetModelDisplayProperty (vtkMRMLDisplayableNode *model)
virtual void UngridWidget ()
virtual void UnpackWidget ()
virtual void UnRegister (vtkObjectBase *o)
void UpdateAxis ()
void UpdateAxisLabelActors ()
void UpdateCameraNode ()
int UpdateClipSlicesFromMRML ()
void UpdateFromMRML ()
void UpdateModel (vtkMRMLDisplayableNode *model)
void UpdateModelHierarchies ()
void UpdateModelHierarchyDisplay (vtkMRMLDisplayableNode *model)
void UpdateModelHierarchyVisibility (vtkMRMLModelHierarchyNode *mhnode, int visibility)
void UpdateModelPolyData (vtkMRMLDisplayableNode *model)
void UpdateModelsFromMRML ()
void UpdateModifiedModel (vtkMRMLDisplayableNode *model)
void UpdateViewNode ()
 vtkGetMacro (EnableRender, int)
 vtkGetMacro (PickedPointID, vtkIdType)
 vtkGetMacro (PickedCellID, vtkIdType)
 vtkGetMacro (RenderPending, int)
 vtkGetObjectMacro (BoxAxisBoundingBox, vtkBoundingBox)
 vtkGetObjectMacro (BoxWidgetRepresentation, vtkSlicerBoxRepresentation)
 vtkGetObjectMacro (BoxWidget, vtkSlicerBoxWidget2)
 vtkGetObjectMacro (ModelHierarchyLogic, vtkSlicerModelHierarchyLogic)
 vtkGetObjectMacro (PointPicker, vtkPointPicker)
 vtkGetObjectMacro (CellPicker, vtkCellPicker)
 vtkGetObjectMacro (PropPicker, vtkPropPicker)
 vtkGetObjectMacro (WorldPointPicker, vtkWorldPointPicker)
 vtkGetObjectMacro (ViewNode, vtkMRMLViewNode)
 vtkGetObjectMacro (CameraNode, vtkMRMLCameraNode)
 vtkGetObjectMacro (ViewerFrame, vtkKWFrame)
 vtkGetObjectMacro (MainViewer, vtkKWRenderWidget)
 vtkGetObjectMacro (ApplicationLogic, vtkSlicerApplicationLogic)
 vtkGetObjectMacro (ClipModelsNode, vtkMRMLClipModelsNode)
 vtkGetVectorMacro (PickedRAS, double, 3)
 vtkSetMacro (EnableRender, int)
 vtkSetMacro (PickedPointID, vtkIdType)
 vtkSetMacro (PickedCellID, vtkIdType)
 vtkSetMacro (RenderPending, int)
 vtkSetObjectMacro (ModelHierarchyLogic, vtkSlicerModelHierarchyLogic)
 vtkSetObjectMacro (ApplicationLogic, vtkSlicerApplicationLogic)
 vtkSetVectorMacro (PickedRAS, double, 3)
 vtkTypeRevisionMacro (vtkSlicerViewerWidget, vtkSlicerWidget)

Static Public Member Functions

static vtkSlicerViewerWidgetNew ()

Public Attributes

std::vector< vtkFollower * > AxisLabelActors
std::map< std::string,
vtkMRMLDisplayableNode * > 
DisplayableNodes
std::map< std::string,
vtkProp3D * > 
DisplayedActors
std::map< std::string, intDisplayedClipState
std::map< std::string,
vtkMRMLDisplayNode * > 
DisplayedNodes
std::map< std::string, intDisplayedVisibility
std::map< std::string, intRegisteredModelHierarchies

Protected Member Functions

 vtkSlicerViewerWidget ()
virtual ~vtkSlicerViewerWidget ()

Protected Attributes

vtkSlicerApplicationLogicApplicationLogic
vtkActorBoxAxisActor
vtkBoundingBox * BoxAxisBoundingBox
vtkSlicerBoxWidget2BoxWidget
vtkSlicerBoxRepresentationBoxWidgetRepresentation
vtkMRMLCameraNodeCameraNode
int CameraNodeUpdatePending
int CameraNodeWasCreated
vtkCellPicker * CellPicker
vtkMRMLClipModelsNodeClipModelsNode
bool ClippingOn
int ClipType
int EnableRender
int GreenSliceClipState
vtkMRMLSliceNodeGreenSliceNode
vtkPlane * GreenSlicePlane
int IsRendering
vtkKWRenderWidgetMainViewer
bool ModelHierarchiesPresent
vtkSlicerModelHierarchyLogicModelHierarchyLogic
vtkIdType PickedCellID
std::string PickedNodeName
vtkIdType PickedPointID
double PickedRAS [3]
vtkPointPicker * PointPicker
int ProcessingMRMLEvent
vtkPropPicker * PropPicker
int RedSliceClipState
vtkMRMLSliceNodeRedSliceNode
vtkPlane * RedSlicePlane
int RenderPending
bool SceneClosing
vtkImplicitBoolean * SlicePlanes
int UpdateFromMRMLRequested
int UpdatingAxis
int UpdatingCameraNode
vtkKWFrame * ViewerFrame
vtkMRMLViewNodeViewNode
vtkWorldPointPicker * WorldPointPicker
int YellowSliceClipState
vtkMRMLSliceNodeYellowSliceNode
vtkPlane * YellowSlicePlane

Private Member Functions

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

Member Enumeration Documentation

anonymous enum

Events

Enumerator:
ActiveCameraChangedEvent 

Constructor & Destructor Documentation

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

Member Function Documentation

void vtkSlicerViewerWidget::AddAxisActors (  ) 
void vtkSlicerViewerWidget::AddCameraObservers (  ) 
void vtkSlicerViewerWidget::AddHierarchiyObservers (  ) 
void vtkSlicerViewerWidget::AddMRMLSceneObservers (  ) 
void vtkSlicerViewerWidget::CheckModelHierarchies (  ) 
void vtkSlicerViewerWidget::ColorAxisLabelActors ( double  r,
double  g,
double  b 
)
void vtkSlicerViewerWidget::CreateAxis (  ) 

References AxisLabelActors, BoxAxisActor, New(), and UpdateAxis().

Referenced by CreateWidget().

void vtkSlicerViewerWidget::CreateClipSlices (  ) 
vtkClipPolyData * vtkSlicerViewerWidget::CreateTransformedClipper ( vtkMRMLDisplayableNode model  ) 
void vtkSlicerViewerWidget::CreateWidget ( void   )  [virtual]
vtkProp3D * vtkSlicerViewerWidget::GetActorByID ( const char id  ) 

return the current model actor corresponding to a give MRML ID

References DisplayedActors.

Referenced by SetModelDisplayProperty().

int vtkSlicerViewerWidget::GetDisplayedModelsVisibility ( vtkMRMLDisplayNode model  ) 

References DisplayedVisibility.

Referenced by ProcessMRMLEvents().

std::vector< vtkMRMLDisplayNode * > vtkSlicerViewerWidget::GetDisplayNode ( vtkMRMLDisplayableNode model  ) 
vtkMRMLDisplayNode * vtkSlicerViewerWidget::GetHierarchyDisplayNode ( vtkMRMLDisplayableNode model  ) 
const char * vtkSlicerViewerWidget::GetIDByActor ( vtkProp3D actor  ) 

return the current node ID corresponding to a given vtkProp3D

References DisplayedActors.

const char* vtkSlicerViewerWidget::GetPickedNodeName (  )  [inline]

Get the name of the picked node, returns empty string if no pick

void vtkSlicerViewerWidget::GridSpanWidget ( vtkKWFrame *  f,
int  row,
int  col,
int  rowspan,
int  colspan 
) [virtual]

References MainViewer, and ViewerFrame.

void vtkSlicerViewerWidget::GridWidget ( vtkKWFrame *  f,
int  row,
int  col 
) [virtual]
static vtkSlicerViewerWidget* vtkSlicerViewerWidget::New (  )  [static]
void vtkSlicerViewerWidget::operator= ( const vtkSlicerViewerWidget  )  [private]

Not implemented.

Reimplemented from vtkSlicerWidget.

void vtkSlicerViewerWidget::PackWidget ( vtkKWFrame *  f  )  [virtual]
int vtkSlicerViewerWidget::Pick ( int  x,
int  y 
)

Convert an x/y location to a mrml node, 3d RAS point, point id, cell id, as appropriate depending what's found under the xy. Called by vtkSlicerViewerInteractorStyle PickEvent consumers. Returns 1 on successful pick.

if (this->PropPicker->PickProp(x, y, ren)) { this->PropPicker->GetPickPosition(pickPoint); } else { return 0; }

this->WorldPointPicker->Pick(displayPoint, ren); this->WorldPointPicker->GetPickPosition(pickPoint);

References CellPicker, DisplayedNodes, p, PickedNodeName, and ResetPick().

void vtkSlicerViewerWidget::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
void vtkSlicerViewerWidget::ProcessMRMLEvents ( vtkObject caller,
unsigned long  event,
void *  callData 
) [virtual]
virtual void vtkSlicerViewerWidget::ProcessWidgetEvents ( vtkObject caller,
unsigned long  event,
void *  callData 
) [virtual]

alternative method to propagate events generated in GUI to logic / mrml Here, it calls RequestRender in response to Expose and Configure events

virtual void vtkSlicerViewerWidget::Register ( vtkObjectBase o  )  [inline, virtual]

References Register().

void vtkSlicerViewerWidget::RemoveCameraObservers (  ) 
void vtkSlicerViewerWidget::RemoveDispalyedID ( std::string &  id  ) 
void vtkSlicerViewerWidget::RemoveDisplayable ( vtkMRMLDisplayableNode model  ) 
void vtkSlicerViewerWidget::RemoveHierarchyObservers ( int  clearCache  ) 
void vtkSlicerViewerWidget::RemoveModelObservers ( vtkMRMLDisplayableNode model  ) 
void vtkSlicerViewerWidget::RemoveModelObservers ( int  clearCache  ) 
void vtkSlicerViewerWidget::RemoveModelProps (  ) 
void vtkSlicerViewerWidget::RemoveMRMLObservers (  )  [virtual]
void vtkSlicerViewerWidget::RemoveWidgetObservers (  )  [virtual]

removes observers on widgets in the class

void vtkSlicerViewerWidget::Render (  ) 
void vtkSlicerViewerWidget::RequestCameraNodeUpdate (  ) 

Post a request to update Cameras in the scene, after a node is added/deleted or a new scene with active camera is loaded.

References CameraNodeUpdatePending, IsRendering, UpdateCameraNode(), and UpdatingAxis.

Referenced by ProcessMRMLEvents(), Render(), and UpdateFromMRML().

void vtkSlicerViewerWidget::RequestRender (  ) 
void vtkSlicerViewerWidget::ResetPick (  ) 

Reset all the pick vars

References PickedNodeName.

Referenced by Pick(), and vtkSlicerViewerWidget().

void vtkSlicerViewerWidget::SetAndObserveCameraNode ( vtkMRMLCameraNode snode  )  [inline]
void vtkSlicerViewerWidget::SetAndObserveViewNode ( vtkMRMLViewNode snode  )  [inline]
void vtkSlicerViewerWidget::SetBoxWidgetInteractor (  ) 

References BoxWidget.

void vtkSlicerViewerWidget::SetClipModelsNode ( vtkMRMLClipModelsNode snode  )  [inline]
void vtkSlicerViewerWidget::SetClipPlaneFromMatrix ( vtkMatrix4x4 *  sliceMatrix,
int  planeDirection,
vtkPlane *  plane 
)
void vtkSlicerViewerWidget::SetModelDisplayProperty ( vtkMRMLDisplayableNode model  ) 
void vtkSlicerViewerWidget::UngridWidget (  )  [virtual]

References MainViewer, and ViewerFrame.

void vtkSlicerViewerWidget::UnpackWidget (  )  [virtual]

References MainViewer, and ViewerFrame.

virtual void vtkSlicerViewerWidget::UnRegister ( vtkObjectBase o  )  [inline, virtual]
void vtkSlicerViewerWidget::UpdateAxis (  ) 
void vtkSlicerViewerWidget::UpdateAxisLabelActors (  ) 

References AxisLabelActors, MainViewer, and ViewNode.

Referenced by UpdateAxis().

void vtkSlicerViewerWidget::UpdateCameraNode (  ) 
int vtkSlicerViewerWidget::UpdateClipSlicesFromMRML (  ) 
void vtkSlicerViewerWidget::UpdateFromMRML (  ) 
void vtkSlicerViewerWidget::UpdateModel ( vtkMRMLDisplayableNode model  ) 
void vtkSlicerViewerWidget::UpdateModelHierarchies (  )  [inline]
void vtkSlicerViewerWidget::UpdateModelHierarchyDisplay ( vtkMRMLDisplayableNode model  ) 
void vtkSlicerViewerWidget::UpdateModelHierarchyVisibility ( vtkMRMLModelHierarchyNode mhnode,
int  visibility 
)
void vtkSlicerViewerWidget::UpdateModelPolyData ( vtkMRMLDisplayableNode model  ) 
void vtkSlicerViewerWidget::UpdateModelsFromMRML (  ) 
void vtkSlicerViewerWidget::UpdateModifiedModel ( vtkMRMLDisplayableNode model  ) 
void vtkSlicerViewerWidget::UpdateViewNode (  ) 
vtkSlicerViewerWidget::vtkGetMacro ( EnableRender  ,
int   
)

Get/Set the enable renderer

vtkSlicerViewerWidget::vtkGetMacro ( PickedPointID  ,
vtkIdType   
)

Get/Set the picked point id, returns -1 if no pick

vtkSlicerViewerWidget::vtkGetMacro ( PickedCellID  ,
vtkIdType   
)

Get/Set the picked cell id, returns -1 if no pick

vtkSlicerViewerWidget::vtkGetMacro ( RenderPending  ,
int   
)
vtkSlicerViewerWidget::vtkGetObjectMacro ( BoxAxisBoundingBox  ,
vtkBoundingBox   
)

get at the bounding box, to allow the default placement of widgets

vtkSlicerViewerWidget::vtkGetObjectMacro ( BoxWidgetRepresentation  ,
vtkSlicerBoxRepresentation   
)
vtkSlicerViewerWidget::vtkGetObjectMacro ( BoxWidget  ,
vtkSlicerBoxWidget2   
)
vtkSlicerViewerWidget::vtkGetObjectMacro ( ModelHierarchyLogic  ,
vtkSlicerModelHierarchyLogic   
)
vtkSlicerViewerWidget::vtkGetObjectMacro ( PointPicker  ,
vtkPointPicker   
)

picks a point

vtkSlicerViewerWidget::vtkGetObjectMacro ( CellPicker  ,
vtkCellPicker   
)

picks a cell

vtkSlicerViewerWidget::vtkGetObjectMacro ( PropPicker  ,
vtkPropPicker   
)

picks a property in the scene

vtkSlicerViewerWidget::vtkGetObjectMacro ( WorldPointPicker  ,
vtkWorldPointPicker   
)

picks a world point

vtkSlicerViewerWidget::vtkGetObjectMacro ( ViewNode  ,
vtkMRMLViewNode   
)

Description: Get/Set the ViewNode

vtkSlicerViewerWidget::vtkGetObjectMacro ( CameraNode  ,
vtkMRMLCameraNode   
)

Get/Set the CameraNode

vtkSlicerViewerWidget::vtkGetObjectMacro ( ViewerFrame  ,
vtkKWFrame   
)
vtkSlicerViewerWidget::vtkGetObjectMacro ( MainViewer  ,
vtkKWRenderWidget   
)
vtkSlicerViewerWidget::vtkGetObjectMacro ( ApplicationLogic  ,
vtkSlicerApplicationLogic   
)
vtkSlicerViewerWidget::vtkGetObjectMacro ( ClipModelsNode  ,
vtkMRMLClipModelsNode   
)

Get/Set the Clip Nodes

vtkSlicerViewerWidget::vtkGetVectorMacro ( PickedRAS  ,
double  ,
 
)

Get/Set the picked RAS point, returns 0,0,0 if no pick

vtkSlicerViewerWidget::vtkSetMacro ( EnableRender  ,
int   
)
vtkSlicerViewerWidget::vtkSetMacro ( PickedPointID  ,
vtkIdType   
)
vtkSlicerViewerWidget::vtkSetMacro ( PickedCellID  ,
vtkIdType   
)
vtkSlicerViewerWidget::vtkSetMacro ( RenderPending  ,
int   
)

Used to track the fact that there is a idle task pending requesting a render

vtkSlicerViewerWidget::vtkSetObjectMacro ( ModelHierarchyLogic  ,
vtkSlicerModelHierarchyLogic   
)
vtkSlicerViewerWidget::vtkSetObjectMacro ( ApplicationLogic  ,
vtkSlicerApplicationLogic   
)
vtkSlicerViewerWidget::vtkSetVectorMacro ( PickedRAS  ,
double  ,
 
)
vtkSlicerViewerWidget::vtkTypeRevisionMacro ( vtkSlicerViewerWidget  ,
vtkSlicerWidget   
)

Member Data Documentation

std::vector<vtkFollower *> vtkSlicerViewerWidget::AxisLabelActors
vtkBoundingBox* vtkSlicerViewerWidget::BoxAxisBoundingBox [protected]
vtkCellPicker* vtkSlicerViewerWidget::CellPicker [protected]

Referenced by vtkSlicerViewerWidget().

Referenced by PrintSelf(), and vtkSlicerViewerWidget().

std::string vtkSlicerViewerWidget::PickedNodeName [protected]

information about a pick event

Referenced by Pick(), PrintSelf(), and ResetPick().

Referenced by PrintSelf(), and vtkSlicerViewerWidget().

double vtkSlicerViewerWidget::PickedRAS[3] [protected]

Referenced by PrintSelf().

vtkPointPicker* vtkSlicerViewerWidget::PointPicker [protected]
vtkPropPicker* vtkSlicerViewerWidget::PropPicker [protected]
vtkPlane* vtkSlicerViewerWidget::RedSlicePlane [protected]

Referenced by PrintSelf(), and vtkSlicerViewerWidget().

vtkImplicitBoolean* vtkSlicerViewerWidget::SlicePlanes [protected]
vtkKWFrame* vtkSlicerViewerWidget::ViewerFrame [protected]
vtkWorldPointPicker* vtkSlicerViewerWidget::WorldPointPicker [protected]

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

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1