51 mSliceProxy = sliceProxy;
61 for (RepMap::iterator iter=mDataReps.begin(); iter!=mDataReps.end(); ++iter)
69 if (boost::dynamic_pointer_cast<Mesh>(data))
71 this->meshAdded(boost::dynamic_pointer_cast<Mesh>(data));
73 else if (boost::dynamic_pointer_cast<PointMetric>(data))
75 this->pointMetricAdded(boost::dynamic_pointer_cast<PointMetric>(data));
77 else if (boost::dynamic_pointer_cast<SphereMetric>(data))
79 this->sphereMetricAdded(boost::dynamic_pointer_cast<SphereMetric>(data));
85 if (!mDataReps.count(uid))
88 mView->removeRep(mDataReps[uid]);
92 void DataRepContainer::meshAdded(
MeshPtr mesh)
96 if (mDataReps.count(mesh->getUid()))
100 rep->setSliceProxy(mSliceProxy);
103 mDataReps[mesh->getUid()] = rep;
110 if (mDataReps.count(mesh->getUid()))
114 rep->setSliceProxy(mSliceProxy);
115 rep->setDataMetric(mesh);
116 rep->setDynamicSize(
true);
118 mDataReps[mesh->getUid()] = rep;
126 if (mDataReps.count(mesh->getUid()))
130 rep->setSliceProxy(mSliceProxy);
131 rep->setDataMetric(mesh);
133 mDataReps[mesh->getUid()] = rep;
143 val->setGraphicsSize(
settings()->value(
"View3D/sphereRadius").toDouble());
144 val->setShowLabel(
settings()->value(
"View/showLabels").toBool());
145 val->setLabelSize(
settings()->value(
"View3D/labelSize").toDouble());
146 val->setShowAnnotation(!
settings()->value(
"View/showMetricNamesInCorner").toBool());
void setSliceProxy(SliceProxyPtr sliceProxy)
void setView(ViewPtr view)
boost::shared_ptr< class SphereMetric > SphereMetricPtr
void addData(DataPtr data)
boost::shared_ptr< class PointMetricRep2D > PointMetricRep2DPtr
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
boost::shared_ptr< class PointMetric > PointMetricPtr