介绍
DataManager是管理医疗数据的核心组件,医疗数据包括图像、分割标识、注册、曲面、点集、注释、测量等。数据加载后,在标准的四视图中显示。用户可以在Standard Display中对数据进行交互,可以使用Segment插件、Basic ImageProcessing插件或DataManager中的上下文菜单进行交互。
数据
所有数据对象如image或surface都包含在DataNode中。这些DataNode描述数据本身。(mitk::BaseData及其派生类),如:
- 以二维或三维的渲染方式呈现(一个mitk::Mapper列表);
- 与它关联的交互器mitk::Interactor;
- 属性列表如名称、可视性和不透明度等;
mitk::DataNode 的协作图
关于数据对象在空间/时间中的位置信息被存储在一个被附着在数据本身的Geometry中,而不是附着在节点DataNode;
BaseData:mitk::BaseData是所有数据对象的基类,它继承自itk::DataObject;
DataNode:这个类封装了BaseData对象并提供统一的处理;
DataStorage:MITK DataStorage用于管理和存储DataNode,它提供如下功能:
- 添加和删除节点;
- 高级功能如:获取当前DataStorage中所有特定数据类型(如image或surface)、特定名称或其他属性的数据节点DataNode;
实例:
mitk::DataNode::Pointer resultNode = mitk::DataNode::New();
// create data node
std::string nameOfResultImage = node->GetName();
// get property "name" of the original node,this is a convenience method
nameOfResultImage.append("Otsu");
// extend the "name" to "nameOtsu"
resultNode->SetProperty("name", mitk::StringProperty::New(nameOfResultImage) );
// write name property to new node
resultNode->SetProperty("binary", mitk::BoolProperty::New(true) );
// set binary property of new node true
resultNode->SetData( mitk::ImportItkImage ( filter->GetOutput() ) );
// set data of new node
this->GetDataStorage()->Add(resultNode, node);
// add new node to datastorage