15 #include "boost/bind.hpp" 18 #include <vtkPolyDataMapper.h> 19 #include <vtkProperty.h> 20 #include <vtkRenderer.h> 21 #include <vtkSectorSource.h> 37 DistanceMetricRep2D::DistanceMetricRep2D()
49 mViewportListener.reset();
55 if (mViewportListener)
56 mViewportListener->startListen(view->getRenderer());
64 if (mViewportListener)
65 mViewportListener->stopListen();
93 mLine->setColor(
mMetric->getColor());
100 std::vector<Vector3D> points_r = distanceMetric->getEndpoints();
104 Vector3D p1_vp = vpMs * sMr * points_r[0];
105 Vector3D p2_vp = vpMs * sMr * points_r[1];
108 mLine->updatePosition(p1_vp, p2_vp);
115 mSliceProxy = sliceProxy;
boost::shared_ptr< class DistanceMetricRep2D > DistanceMetricRep2DPtr
vtkRendererPtr getRenderer()
virtual void onModifiedStartRender()
boost::shared_ptr< class DistanceMetric > DistanceMetricPtr
virtual void addRepActorsToViewRenderer(ViewPtr view)
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
static DistanceMetricRep2DPtr New(const QString &uid="")
static boost::shared_ptr< REP > wrap_new(REP *object, QString uid)
boost::shared_ptr< class View > ViewPtr
Listens to changes in viewport and camera matrix.
void setSliceProxy(SliceProxyPtr slicer)
void addRepActorsToViewRenderer(ViewPtr view)
Helper for drawing a line in 2D.
Data class that represents a distance between two points, or a point and a plane. ...
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
void removeRepActorsFromViewRenderer(ViewPtr view)
void setDynamicSize(bool on)
virtual void removeRepActorsFromViewRenderer(ViewPtr view)
Namespace for all CustusX production code.