24 #include <QQmlContext>
44 QModelIndex modelIndex = QmlMitkDatamanager::model->index(this->m_index);
46 node->SetVisibility(checked);
53 this->m_index =
index;
57 QModelIndex modelIndex = QmlMitkDatamanager::model->index(this->m_index);
60 if(dynamic_cast<mitk::Image*>(node->GetData()) && dynamic_cast<mitk::Image*>(node->GetData())->GetDimension()>=3 )
87 QModelIndex modelIndex = QmlMitkDatamanager::model->index(this->m_index);
91 if ( basedata.IsNotNull() &&
92 basedata->GetTimeGeometry()->IsValid() )
105 QModelIndex modelIndex = QmlMitkDatamanager::model->index(this->m_index);
108 QmlMitkDatamanager::storage->Remove(node);
114 qmlRegisterType<QmlMitkDatamanager>(
"Mitk.Views", 1, 0,
"DataManager");
118 QmlMitkDatamanager::storage = storage;
121 QQmlContext* context = engine.rootContext();
122 context->setContextProperty(
"dataStorage", QmlMitkDatamanager::model);
124 QQmlComponent component(&engine, QUrl(
"qrc:/views/MitkDataManager.qml"));
virtual bool InitializeViews(const BaseGeometry *geometry, RequestType type=REQUEST_UPDATE_ALL, bool preserveRoughOrientationInWorldSpace=false)
void toggleVisibility(bool checked)
static void create(QQmlEngine &engine, mitk::DataStorage::Pointer storage)
static QmlMitkTransferFunctionItem * instance
void notify(mitk::DataNode::Pointer node)
static QmlMitkDatamanager * instance
static RenderingManager * GetInstance()
static Pointer New(const mitk::NodePredicateBase *_arg)
static QmlMitkProperties * instance
static Pointer New(const char *_arg)
void setEnabled(bool enabled)
mitk::DataNode::Pointer getNode(const QModelIndex &index) const
Return the node for given model index.
virtual void InitializeViewsByBoundingObjects(const DataStorage *)
Initializes the renderwindows by the aggregated geometry of all objects that are held in the data sto...
void SetDataNode(mitk::DataNode *node, const mitk::BaseRenderer *renderer=nullptr)
void RequestUpdateAll(RequestType type=REQUEST_UPDATE_ALL)