当前位置: 首页>>代码示例>>C++>>正文


C++ DataPtr::getUid方法代码示例

本文整理汇总了C++中DataPtr::getUid方法的典型用法代码示例。如果您正苦于以下问题:C++ DataPtr::getUid方法的具体用法?C++ DataPtr::getUid怎么用?C++ DataPtr::getUid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataPtr的用法示例。


在下文中一共展示了DataPtr::getUid方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: importPointMetricsToLandmarkButtonClickedSlot

void ImageLandmarksWidget::importPointMetricsToLandmarkButtonClickedSlot()
{
	DataPtr image = this->getCurrentData();
	if(!image)
		return;

	std::map<QString, DataPtr> point_metrics = mServices->patient()->getChildren(image->getUid(), "pointMetric");
	std::map<QString, DataPtr>::iterator it = point_metrics.begin();

	//Make sure we have enough landmarks
	int number_of_landmarks = mServices->patient()->getLandmarkProperties().size();
	int number_of_metrics = point_metrics.size();
	for(int i=number_of_landmarks; i<number_of_metrics; ++i)
	{
		QString uid = mServices->patient()->addLandmark();
	}

	for(; it != point_metrics.end(); ++it)
	{
		PointMetricPtr point_metric = boost::static_pointer_cast<PointMetric>(it->second);
		if(!point_metric)
			continue;

		Vector3D pos_x = point_metric->getCoordinate();
		//Transform3D d_M_x = mServices->spaceProvider()->get_toMfrom(CoordinateSystem::fromString(image->getSpace()), point_metric->getSpace());
		//Vector3D pos_d = d_M_x.coord(pos_x);
		QString point_metric_name = point_metric->getName();
		image->getLandmarks()->setLandmark(Landmark(point_metric_name, pos_x));
		this->activateLandmark(point_metric_name);
	}
}
开发者ID:SINTEFMedtek,项目名称:CustusX,代码行数:31,代码来源:cxImageLandmarksWidget.cpp

示例2: getValue

QString StringPropertyRegistrationMovingImage::getValue() const
{
	DataPtr image = mRegistrationService->getMovingData();
  if (!image)
    return "";
  return qstring_cast(image->getUid());
}
开发者ID:,项目名称:,代码行数:7,代码来源:

示例3: updateCheckBoxFromClipper

void ClipperWidget::updateCheckBoxFromClipper(QCheckBox *checkbox, DataPtr data)
{
	if(!mClipper)
		return;
	std::map<QString, DataPtr> datas = mClipper->getDatas();
	bool checked = datas.count(data->getUid());
	checkbox->setChecked(checked);
}
开发者ID:c0ns0le,项目名称:CustusX,代码行数:8,代码来源:cxClipperWidget.cpp

示例4:

boost::shared_ptr<QWidget> WidgetTypeRepository::findMetricWidget(DataPtr data)
{
	for (unsigned i=0; i<mWidgets.size(); ++i)
	{
		boost::shared_ptr<SingleMetricWidget> w = boost::dynamic_pointer_cast<SingleMetricWidget>(mWidgets[i]);
		if(w && w->getData() && data && w->getData()->getUid() == data->getUid())
			return w;
	}
	return boost::shared_ptr<QWidget>();
}
开发者ID:SINTEFMedtek,项目名称:CustusX,代码行数:10,代码来源:cxTreeRepository.cpp

示例5: insertDataNode

void TreeRepository::insertDataNode(DataPtr data)
{
	if (this->getNode(data->getUid()))
		return;

	this->appendNode(new DataTreeNode(mSelf, data));

	this->appendNode(new ShowVolumeDataTreeNode(mSelf, data));
	this->appendNode(new ShowSlice2DDataTreeNode(mSelf, data));
	this->appendNode(new ShowSlice3DDataTreeNode(mSelf, data));
}
开发者ID:SINTEFMedtek,项目名称:CustusX,代码行数:11,代码来源:cxTreeRepository.cpp

示例6: addXml

void RegistrationImplService::addXml(QDomNode& parentNode)
{
	QDomDocument doc = parentNode.ownerDocument();
	QDomElement base = doc.createElement("registrationManager");
	parentNode.appendChild(base);

	QDomElement fixedDataNode = doc.createElement("fixedDataUid");
	DataPtr fixedData = this->getFixedData();
	if(fixedData)
	{
		fixedDataNode.appendChild(doc.createTextNode(fixedData->getUid()));
	}
	base.appendChild(fixedDataNode);

	QDomElement movingDataNode = doc.createElement("movingDataUid");
	DataPtr movingData = this->getMovingData();
	if(movingData)
	{
		movingDataNode.appendChild(doc.createTextNode(movingData->getUid()));
	}
	base.appendChild(movingDataNode);
}
开发者ID:normit-nav,项目名称:CustusX,代码行数:22,代码来源:cxRegistrationImplService.cpp

示例7:

void ViewWrapper3D::addVolumeDataRep(DataPtr data)
{
	if (!data)
		return;
	ImagePtr image = boost::dynamic_pointer_cast<Image>(data);
	if (image)
	{
		mMultiVolume3DRepProducer->addImage(image);
	}
	else
	{
		if (!mDataReps.count(data->getUid()))
		{
			RepPtr rep = this->createDataRep3D(data);
			if (rep)
			{
				mDataReps[data->getUid()] = rep;
				mView->addRep(rep);
			}
		}
	}
}
开发者ID:c0ns0le,项目名称:CustusX,代码行数:22,代码来源:cxViewWrapper3D.cpp

示例8: loadData

void DataManagerImpl::loadData(DataPtr data)
{
	if (data->getUid().contains('%'))
	{
		QString uid = data->getUid();
		QString name = data->getName();
		this->generateUidAndName(&uid, &name);
		data->setName(name);
		data->setUid(uid);
	}

	if (data)
	{
		if (mData.count(data->getUid()) && mData[data->getUid()]!=data)
			reportError(QString("Overwriting Data with uid=%1 with new object into PasM").arg(data->getUid()));
//		this->verifyParentFrame(data);
		mData[data->getUid()] = data;
		emit dataAddedOrRemoved();
	}
}
开发者ID:c0ns0le,项目名称:CustusX,代码行数:20,代码来源:cxDataManagerImpl.cpp

示例9: setFixedData

void RegistrationImplService::setFixedData(DataPtr data)
{
	this->setFixedData((data) ? data->getUid() : "");
}
开发者ID:normit-nav,项目名称:CustusX,代码行数:4,代码来源:cxRegistrationImplService.cpp


注:本文中的DataPtr::getUid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。