本文整理汇总了C++中DcmStack::top方法的典型用法代码示例。如果您正苦于以下问题:C++ DcmStack::top方法的具体用法?C++ DcmStack::top怎么用?C++ DcmStack::top使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DcmStack
的用法示例。
在下文中一共展示了DcmStack::top方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadFileHeader
//------------------------------------------------------------------------------
void ctkDICOMDatabase::loadFileHeader (QString fileName)
{
Q_D(ctkDICOMDatabase);
DcmFileFormat fileFormat;
OFCondition status = fileFormat.loadFile(fileName.toLatin1().data());
if (status.good())
{
DcmDataset *dataset = fileFormat.getDataset();
DcmStack stack;
while (dataset->nextObject(stack, true) == EC_Normal)
{
DcmObject *dO = stack.top();
if (dO->isaString())
{
QString tag = QString("%1,%2").arg(
dO->getGTag(),4,16,QLatin1Char('0')).arg(
dO->getETag(),4,16,QLatin1Char('0'));
std::ostringstream s;
dO->print(s);
d->LoadedHeader[tag] = QString(s.str().c_str());
}
}
}
return;
}
示例2: cbPStk
void cbPStk(DcmStack& stk) {
stack<DcmType*> items;
while (!stk.empty()) {
items.push(stk.top());
stk.pop();
}
while (!items.empty()) {
dcmout << items.top()->repr() << ' ';
stk.push(items.top());
items.pop();
}
dcmout << endl;
}
示例3:
const DcmElement * tissuestack::imaging::DicomFileWrapper::findDcmElement(
const DcmDataset * dataSet, const DcmTagKey & tagKey) const
{
DcmStack stack;
OFCondition status = const_cast<DcmDataset *>(dataSet)->nextObject(stack, OFTrue);
while (status.good())
{
const DcmObject * dobject = stack.top();
const DcmElement * delem = (DcmElement *) dobject;
if (delem->getTag().getXTag() == tagKey)
return delem;
status = const_cast<DcmDataset *>(dataSet)->nextObject(stack, OFTrue);
}
return nullptr;
}
示例4: cbClear
void cbClear(DcmStack& stk) {
while (!stk.empty()) {
del(stk.top());
stk.pop();
}
}