32 mSliceProxy = sliceProxy;
42 for (RepMap::iterator iter=mDataReps.begin(); iter!=mDataReps.end(); ++iter)
50 if (boost::dynamic_pointer_cast<Mesh>(data))
52 this->meshAdded(boost::dynamic_pointer_cast<Mesh>(data));
54 else if (boost::dynamic_pointer_cast<PointMetric>(data))
56 this->pointMetricAdded(boost::dynamic_pointer_cast<PointMetric>(data));
58 else if (boost::dynamic_pointer_cast<SphereMetric>(data))
60 this->sphereMetricAdded(boost::dynamic_pointer_cast<SphereMetric>(data));
62 else if (boost::dynamic_pointer_cast<DistanceMetric>(data))
64 this->distanceMetricAdded(boost::dynamic_pointer_cast<DistanceMetric>(data));
70 if (!mDataReps.count(uid))
73 mView->removeRep(mDataReps[uid]);
77 void DataRepContainer::meshAdded(
MeshPtr mesh)
81 if (mDataReps.count(mesh->getUid()))
85 rep->setSliceProxy(mSliceProxy);
88 mDataReps[mesh->getUid()] = rep;
95 if (mDataReps.count(mesh->getUid()))
99 rep->setSliceProxy(mSliceProxy);
100 rep->setDataMetric(mesh);
101 rep->setDynamicSize(
true);
103 mDataReps[mesh->getUid()] = rep;
111 if (mDataReps.count(mesh->getUid()))
115 rep->setSliceProxy(mSliceProxy);
116 rep->setDataMetric(mesh);
117 rep->setDynamicSize(
true);
119 mDataReps[mesh->getUid()] = rep;
127 if (mDataReps.count(mesh->getUid()))
131 rep->setSliceProxy(mSliceProxy);
132 rep->setDataMetric(mesh);
134 mDataReps[mesh->getUid()] = rep;
145 val->setShowLabel(
settings()->value(
"View/showLabels").toBool());
146 val->setLabelSize(
settings()->value(
"View3D/labelSize").toDouble());
147 val->setShowAnnotation(!
settings()->value(
"View/showMetricNamesInCorner").toBool());
boost::shared_ptr< class DistanceMetricRep2D > DistanceMetricRep2DPtr
boost::shared_ptr< class DistanceMetric > DistanceMetricPtr
void setSliceProxy(SliceProxyPtr sliceProxy)
static DistanceMetricRep2DPtr New(const QString &uid="")
void setView(ViewPtr view)
boost::shared_ptr< class SphereMetric > SphereMetricPtr
void addData(DataPtr data)
boost::shared_ptr< class PointMetricRep2D > PointMetricRep2DPtr
Base class for all Data Metric reps.
boost::shared_ptr< class DataMetricRep > DataMetricRepPtr
boost::shared_ptr< class View > ViewPtr
static PointMetricRep2DPtr New(const QString &uid="")
static SphereMetricRep2DPtr New(const QString &uid="")
void removeData(QString uid)
boost::shared_ptr< class Data > DataPtr
Settings * settings()
Shortcut for accessing the settings instance.
static GeometricRep2DPtr New(const QString &uid="")
boost::shared_ptr< class SphereMetricRep2D > SphereMetricRep2DPtr
boost::shared_ptr< class Mesh > MeshPtr
boost::shared_ptr< class Rep > RepPtr
boost::shared_ptr< class GeometricRep2D > GeometricRep2DPtr
void setGraphicsSize(double size)
Namespace for all CustusX production code.
boost::shared_ptr< class PointMetric > PointMetricPtr