36 #include <vtkTextProperty.h>
37 #include <vtkRenderer.h>
38 #include <vtkTextMapper.h>
39 #include <vtkObjectFactory.h>
58 vtkObject* ret = vtkObjectFactory::CreateInstance(
"OrientationAnnotation");
78 this->TextActor[2]->SetPosition(5, vsize[1]/2);
79 this->TextActor[3]->SetPosition(vsize[0]/2, 7);
80 this->TextActor[0]->SetPosition(vsize[0]-7, vsize[1]/2);
81 this->TextActor[1]->SetPosition(vsize[0]/2, vsize[1]-7);
85 vtkTextProperty* tprop = this->TextMapper[2]->GetTextProperty();
86 tprop->SetJustificationToLeft();
87 tprop->SetVerticalJustificationToCentered();
89 tprop = this->TextMapper[3]->GetTextProperty();
90 tprop->SetJustificationToCentered();
91 tprop->SetVerticalJustificationToBottom();
93 tprop = this->TextMapper[0]->GetTextProperty();
94 tprop->SetJustificationToRight();
95 tprop->SetVerticalJustificationToCentered();
97 tprop = this->TextMapper[1]->GetTextProperty();
98 tprop->SetJustificationToCentered();
99 tprop->SetVerticalJustificationToTop();
110 mDataManager(dataManager)
113 connect(
mDataManager.get(), SIGNAL(clinicalApplicationChanged()),
this, SLOT(clinicalApplicationChangedSlot()));
132 void OrientationAnnotationRep::clinicalApplicationChangedSlot()
251 mOrientation->GetTextProperty()->SetColor(0.7372, 0.815, 0.6039 );
void setPlaneType(PLANE_TYPE type)
ptCORONAL
a slice seen from the front of the patient
virtual ~OrientationAnnotationRep()
virtual void SetTextActorsJustification()
virtual void addRepActorsToViewRenderer(ViewPtr view)
PatientModelServicePtr mDataManager
static OrientationAnnotation * New()
void setPlaneTypeNeurology(PLANE_TYPE type)
static boost::shared_ptr< REP > wrap_new(REP *object, QString uid)
cstring_cast_Placeholder cstring_cast(const T &val)
ptAXIAL
a slice seen from the top of the patient
boost::shared_ptr< class View > ViewPtr
OrientationAnnotationRep(PatientModelServicePtr dataManager)
boost::shared_ptr< class OrientationAnnotationRep > OrientationAnnotationRepPtr
ptSAGITTAL
a slice seen from the side of the patient
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Default implementation of Rep.
void setVisible(bool visible)
OrientationAnnotationPtr mOrientation
void setPlaneTypeRadiology(PLANE_TYPE type)
virtual void removeRepActorsFromViewRenderer(ViewPtr view)
virtual void SetTextActorsPosition(int vsize[2])
static OrientationAnnotationRepPtr New(PatientModelServicePtr dataManager, const QString &uid="")