30 mSliceProxy = sliceProxy;
40 for (RepMap::iterator iter=mDataReps.begin(); iter!=mDataReps.end(); ++iter)
48 if (boost::dynamic_pointer_cast<Mesh>(data))
50 this->meshAdded(boost::dynamic_pointer_cast<Mesh>(data));
52 else if (boost::dynamic_pointer_cast<PointMetric>(data))
54 this->pointMetricAdded(boost::dynamic_pointer_cast<PointMetric>(data));
56 else if (boost::dynamic_pointer_cast<SphereMetric>(data))
58 this->sphereMetricAdded(boost::dynamic_pointer_cast<SphereMetric>(data));
64 if (!mDataReps.count(uid))
67 mView->removeRep(mDataReps[uid]);
71 void DataRepContainer::meshAdded(
MeshPtr mesh)
75 if (mDataReps.count(mesh->getUid()))
79 rep->setSliceProxy(mSliceProxy);
82 mDataReps[mesh->getUid()] = rep;
89 if (mDataReps.count(mesh->getUid()))
93 rep->setSliceProxy(mSliceProxy);
94 rep->setDataMetric(mesh);
95 rep->setDynamicSize(
true);
97 mDataReps[mesh->getUid()] = rep;
105 if (mDataReps.count(mesh->getUid()))
109 rep->setSliceProxy(mSliceProxy);
110 rep->setDataMetric(mesh);
112 mDataReps[mesh->getUid()] = rep;
123 val->setShowLabel(
settings()->value(
"View/showLabels").toBool());
124 val->setLabelSize(
settings()->value(
"View3D/labelSize").toDouble());
125 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
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