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);
106 return mData->getIcon();
114 MeshPtr mesh = boost::dynamic_pointer_cast<
Mesh>(mData);
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())));
boost::shared_ptr< TreeNode > TreeNodePtr
virtual QVariant getFont() const
virtual QVariant getColor() const
VisServicesPtr getServices() const
static DataViewProperties createDefault()
virtual QString getName() const
virtual boost::shared_ptr< QWidget > createPropertiesWidget() const
boost::shared_ptr< DataMetric > DataMetricPtr
virtual QString getUid() const
virtual bool isDefaultExpanded() const
csREF
the data reference space (r) using LPS (left-posterior-superior) coordinates.
boost::weak_ptr< class TreeRepository > TreeRepositoryWeakPtr
virtual QString getType() const
boost::shared_ptr< class Data > DataPtr
DataTreeNode(TreeRepositoryWeakPtr repo, DataPtr data)
virtual void setViewGroupVisibility(int index, bool value)
boost::shared_ptr< class WidgetTypeRepository > WidgetTypeRepositoryPtr
QIcon addBackgroundColorToIcon(QIcon input, QColor color) const
Identification of a Coordinate system.
QWidget * createMetricWidget(DataPtr data)
static StringPropertySelectMeshPtr New(PatientModelServicePtr patientModelService)
virtual TreeNodePtr getParent() const
virtual QVariant getViewGroupVisibility(int index) const
virtual bool isVisibleNode() const
virtual QIcon getIcon() const
boost::shared_ptr< class Mesh > MeshPtr
Base class for all Data Metrics.
boost::shared_ptr< class StringPropertySelectMesh > StringPropertySelectMeshPtr
QColor getColor()
Get the color of the mesh (Values are range 0 - 255)
Namespace for all CustusX production code.