52 return mData->getUid();
57 return mData->getName();
67 QStringList visible = this->
repo()->getVisibleNodeTypes();
69 bool hasData = visible.contains(this->
getType());
73 if (boost::dynamic_pointer_cast<Mesh>(mData) && !visible.contains(
"model"))
75 if (boost::dynamic_pointer_cast<Image>(mData) && !visible.contains(
"image"))
77 if (boost::dynamic_pointer_cast<DataMetric>(mData) && !visible.contains(
"metric"))
85 if (this->
repo()->getMode()==
"flat")
86 return this->
repo()->getNodeForGroup(
"data");
88 if (mData->getParentSpace().isEmpty())
98 this->
getServices()->patient()->getActiveData()->setActive(mData);
103 DataMetricPtr metric = boost::dynamic_pointer_cast<DataMetric>(mData);
106 return mData->getIcon();
111 DataMetricPtr metric = boost::dynamic_pointer_cast<DataMetric>(mData);
113 return metric->getColor();
114 MeshPtr mesh = boost::dynamic_pointer_cast<Mesh>(mData);
116 return mesh->getColor();
123 if (this->
getServices()->patient()->getActiveData()->getActive()==mData)
134 return (this->
repo()->getMode()!=
"flat");
139 this->
getServices()->patient()->removeData(mData->getUid());
146 return Qt::CheckState(0);
148 return Qt::CheckState(2);
149 return Qt::CheckState(1);
165 if (boost::dynamic_pointer_cast<Mesh>(mData))
176 widget->getSelector()->setValue(mData->getUid());
179 if (boost::dynamic_pointer_cast<Image>(mData))
189 if(boost::dynamic_pointer_cast<DataMetric>(mData))
191 boost::shared_ptr<QWidget> widget = wrepo->findMetricWidget(mData);
201 return boost::shared_ptr<QWidget>(
new QLabel(QString(
"Data widget %1 ").arg(mData->getName())));