73 return mData->getUid();
78 return mData->getName();
88 QStringList visible = this->
repo()->getVisibleNodeTypes();
90 bool hasData = visible.contains(this->
getType());
94 if (boost::dynamic_pointer_cast<Mesh>(mData) && !visible.contains(
"model"))
96 if (boost::dynamic_pointer_cast<Image>(mData) && !visible.contains(
"image"))
98 if (boost::dynamic_pointer_cast<DataMetric>(mData) && !visible.contains(
"metric"))
106 if (this->
repo()->getMode()==
"flat")
107 return this->
repo()->getNodeForGroup(
"data");
109 if (mData->getParentSpace().isEmpty())
119 this->
getServices()->patient()->getActiveData()->setActive(mData);
127 return mData->getIcon();
135 MeshPtr mesh = boost::dynamic_pointer_cast<
Mesh>(mData);
144 if (this->
getServices()->patient()->getActiveData()->getActive()==mData)
155 return (this->
repo()->getMode()!=
"flat");
160 this->
getServices()->patient()->removeData(mData->getUid());
167 return Qt::CheckState(0);
169 return Qt::CheckState(2);
170 return Qt::CheckState(1);
186 if (boost::dynamic_pointer_cast<Mesh>(mData))
197 widget->getSelector()->setValue(mData->getUid());
200 if (boost::dynamic_pointer_cast<Image>(mData))
210 if(boost::dynamic_pointer_cast<DataMetric>(mData))
212 boost::shared_ptr<QWidget> widget = wrepo->findMetricWidget(mData);
222 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
std::string toString(T const &value)
converts any type to a string
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.