43 #include <vtkActor2D.h>
44 #include <vtkRenderer.h>
58 mSpaceProvider(spaceProvider)
73 return "vm::CrossHairRep2D";
86 disconnect(mSlicer.get(), SIGNAL(transformChanged(
Transform3D)),
this, SLOT(sliceTransformChangedSlot(
Transform3D)));
87 disconnect(mSlicer.get(), SIGNAL(toolTransformAndTimestamp(
Transform3D,
double)),
this, SLOT(toolTransformAndTimestampSlot(
Transform3D,
double)));
88 disconnect(mSlicer.get(), SIGNAL(toolVisible(
bool)),
this, SLOT(toolVisibleSlot(
bool)));
93 connect(mSlicer.get(), SIGNAL(transformChanged(
Transform3D)),
this, SLOT(sliceTransformChangedSlot(
Transform3D)));
94 connect(mSlicer.get(), SIGNAL(toolTransformAndTimestamp(
Transform3D,
double)),
this, SLOT(toolTransformAndTimestampSlot(
Transform3D,
double)));
95 connect(mSlicer.get(), SIGNAL(toolVisible(
bool)),
this, SLOT(toolVisibleSlot(
bool)));
102 mCursor.reset(
new CrossHair2D(view->getRenderer()) ) ;
103 double bordarOffset = 150.0;
105 mCursor->setValue(
Vector3D(0,0,0), 100, 100, bordarOffset, color );
114 void CrossHairRep2D::sliceTransformChangedSlot(
Transform3D sMr)
118 void CrossHairRep2D::toolTransformAndTimestampSlot(
Transform3D prMt,
double timestamp)
122 void CrossHairRep2D::toolVisibleSlot(
bool visible)
127 void CrossHairRep2D::update()
129 if (!mSlicer || !mSlicer->getTool())
139 mCursor->updateRegCross( vpMt.coord(
Vector3D(0,0,0)) );
boost::shared_ptr< class SpaceProvider > SpaceProviderPtr
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
virtual void addRepActorsToViewRenderer(ViewPtr view)
boost::shared_ptr< class CrossHairRep2D > CrossHairRep2DPtr
virtual ~CrossHairRep2D()
static boost::shared_ptr< REP > wrap_new(REP *object, QString uid)
void setSliceProxy(SliceProxyPtr slicer)
virtual QString getType() const
CrossHairRep2D(SpaceProviderPtr spaceProvider)
boost::shared_ptr< class View > ViewPtr
void set_vpMs(const Transform3D &vpMs)
Default implementation of Rep.
cxLogicManager_EXPORT SpaceProviderPtr spaceProvider()
virtual void removeRepActorsFromViewRenderer(ViewPtr view)
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
static CrossHairRep2DPtr New(SpaceProviderPtr spaceProvider, const QString &uid="")
Helper for drawing a crosshair in 2D.