22 #include <vtkActor2D.h> 23 #include <vtkRenderer.h> 37 mSpaceProvider(spaceProvider)
52 return "vm::CrossHairRep2D";
65 disconnect(mSlicer.get(), SIGNAL(transformChanged(
Transform3D)),
this, SLOT(sliceTransformChangedSlot(
Transform3D)));
66 disconnect(mSlicer.get(), SIGNAL(toolTransformAndTimestamp(
Transform3D,
double)),
this, SLOT(toolTransformAndTimestampSlot(
Transform3D,
double)));
67 disconnect(mSlicer.get(), SIGNAL(toolVisible(
bool)),
this, SLOT(toolVisibleSlot(
bool)));
72 connect(mSlicer.get(), SIGNAL(transformChanged(
Transform3D)),
this, SLOT(sliceTransformChangedSlot(
Transform3D)));
73 connect(mSlicer.get(), SIGNAL(toolTransformAndTimestamp(
Transform3D,
double)),
this, SLOT(toolTransformAndTimestampSlot(
Transform3D,
double)));
74 connect(mSlicer.get(), SIGNAL(toolVisible(
bool)),
this, SLOT(toolVisibleSlot(
bool)));
81 mCursor.reset(
new CrossHair2D(view->getRenderer()) ) ;
82 double bordarOffset = 150.0;
84 mCursor->setValue(
Vector3D(0,0,0), 100, 100, bordarOffset, color );
93 void CrossHairRep2D::sliceTransformChangedSlot(
Transform3D sMr)
97 void CrossHairRep2D::toolTransformAndTimestampSlot(
Transform3D prMt,
double timestamp)
101 void CrossHairRep2D::toolVisibleSlot(
bool visible)
106 void CrossHairRep2D::update()
108 if (!mSlicer || !mSlicer->getTool())
118 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.
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.
Namespace for all CustusX production code.