本文整理汇总了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);
}
}
示例2: getValue
QString StringPropertyRegistrationMovingImage::getValue() const
{
DataPtr image = mRegistrationService->getMovingData();
if (!image)
return "";
return qstring_cast(image->getUid());
}
示例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);
}
示例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>();
}
示例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));
}
示例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);
}
示例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);
}
}
}
}
示例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();
}
}
示例9: setFixedData
void RegistrationImplService::setFixedData(DataPtr data)
{
this->setFixedData((data) ? data->getUid() : "");
}