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;
144 val->setGraphicsSize(
settings()->value(
"View3D/sphereRadius").toDouble());
145 val->setShowLabel(
settings()->value(
"View/showLabels").toBool());
146 val->setLabelSize(
settings()->value(
"View3D/labelSize").toDouble());
147 val->setShowAnnotation(!
settings()->value(
"View/showMetricNamesInCorner").toBool());