21 #include <vtkPropAssembly.h>
23 #include <vtkTextProperty.h>
29 : m_FiberMonitorMapper(vtkSmartPointer<vtkPolyDataMapper>::
New())
30 , m_TextActorClose(vtkSmartPointer<vtkTextActor>::
New())
31 , m_TextActorOpen(vtkSmartPointer<vtkTextActor>::
New())
32 , m_TextActorHeading(vtkSmartPointer<vtkTextActor>::
New())
33 , m_TextActorMask(vtkSmartPointer<vtkTextActor>::
New())
34 , m_TextActorStatus(vtkSmartPointer<vtkTextActor>::
New())
35 , m_TextActorStarted(vtkSmartPointer<vtkTextActor>::
New())
36 , m_TextActorFinished(vtkSmartPointer<vtkTextActor>::
New())
37 , m_TextActorTerminated(vtkSmartPointer<vtkTextActor>::
New())
38 , m_FiberAssembly(vtkPropAssembly::
New())
39 , m_lastModifiedMonitorNodeTime(-1)
55 m_FiberAssembly->Delete();
72 GetDataNode()->GetVisibility(visible, renderer,
"visible");
74 if ( !visible )
return;
76 const DataNode *node = this->GetDataNode();
78 if (m_lastModifiedMonitorNodeTime >= node->
GetMTime())
81 m_lastModifiedMonitorNodeTime = node->
GetMTime();
87 m_TextActorClose->SetInput( monitor->
getBracketClose().toStdString().c_str() );
88 vtkTextProperty* tpropClose = m_TextActorClose->GetTextProperty();
91 tpropClose->SetFontSize(16);
92 tpropClose->SetColor(0.85,0.8,0.8);
97 m_TextActorOpen->SetInput( monitor->
getBracketOpen().toStdString().c_str() );
98 vtkTextProperty* tpropOpen = m_TextActorOpen->GetTextProperty();
101 tpropOpen->SetFontSize(16);
102 tpropOpen->SetColor(0.85,0.8,0.8);
107 m_TextActorHeading->SetInput( monitor->
getHeading().toStdString().c_str() );
108 vtkTextProperty* tpropHeading = m_TextActorHeading->GetTextProperty();
109 tpropHeading->SetFontSize(12);
111 tpropHeading->SetColor(0.85,0.8,0.8);
116 m_TextActorMask->SetInput( monitor->
getMask().toStdString().c_str() );
117 vtkTextProperty* tpropMask = m_TextActorMask->GetTextProperty();
118 tpropMask->SetFontSize(12);
120 tpropMask->SetColor(1.0,1.0,1.0);
125 m_TextActorStatus->SetInput(monitor->
getStatus().toStdString().c_str());
126 vtkTextProperty* tpropStatus = m_TextActorStatus->GetTextProperty();
127 tpropStatus->SetFontSize(10);
129 tpropStatus->SetColor(0.85,0.8,0.8);
133 m_TextActorStarted->SetInput(QString::number(monitor->
getStarted()).toStdString().c_str());
134 vtkTextProperty* tpropStarted = m_TextActorStarted->GetTextProperty();
135 tpropStarted->SetFontSize(12);
137 tpropStarted->SetColor(0.0,1.0,0.0);
141 m_TextActorFinished->SetInput(QString::number(monitor->
getFinished()).toStdString().c_str());
142 vtkTextProperty* tpropFinished = m_TextActorFinished->GetTextProperty();
143 tpropFinished->SetFontSize(12);
145 tpropFinished->SetColor(1.0,1.0,1.0);
149 m_TextActorTerminated->SetInput(QString::number(monitor->
getTerminated()).toStdString().c_str());
150 vtkTextProperty* tpropTerminated = m_TextActorTerminated->GetTextProperty();
151 tpropTerminated->SetFontSize(12);
153 tpropTerminated->SetColor(1.0,1.0,1.0);
172 Superclass::SetDefaultProperties(node, renderer, overwrite);
182 return m_FiberAssembly;
mitk::Point2D getMaskPosition()
mitk::Point2D getTerminatedPosition()
static void SetDefaultProperties(DataNode *node, BaseRenderer *renderer=NULL, bool overwrite=false)
mitk::Point2D getBracketClosePosition()
const FiberBundleThreadMonitor * GetInput()
mitk::Point2D getBracketOpenPosition()
Organizes the rendering process.
vtkSmartPointer< vtkTextActor > m_TextActorStarted
virtual ~FiberBundleThreadMonitorMapper3D()
vtkPropAssembly * m_FiberAssembly
QString getBracketClose()
mitk::Point2D getStatusPosition()
virtual unsigned long GetMTime() const override
Get the timestamp of the last change of the contents of this node or the referenced BaseData...
vtkSmartPointer< vtkTextActor > m_TextActorClose
int getTerminatedOpacity()
Base Class for Fiber Bundles;.
virtual void GenerateDataForRenderer(mitk::BaseRenderer *renderer)
Generate the data needed for rendering into renderer.
vtkSmartPointer< vtkTextActor > m_TextActorTerminated
vtkSmartPointer< vtkTextActor > m_TextActorHeading
static void SetVtkMapperImmediateModeRendering(vtkMapper *mapper)
FiberBundleThreadMonitorMapper3D()
mitk::Point2D getHeadingPosition()
virtual vtkProp * GetVtkProp(mitk::BaseRenderer *renderer)
vtkSmartPointer< vtkTextActor > m_TextActorFinished
mitk::Point2D getStartedPosition()
vtkSmartPointer< vtkTextActor > m_TextActorMask
virtual void ApplyProperties(mitk::BaseRenderer *renderer)
vtkSmartPointer< vtkTextActor > m_TextActorStatus
vtkSmartPointer< vtkTextActor > m_TextActorOpen
mitk::Point2D getFinishedPosition()
Class for nodes of the DataTree.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.