本文整理汇总了C++中DcmDataset::findAndGetLongInt方法的典型用法代码示例。如果您正苦于以下问题:C++ DcmDataset::findAndGetLongInt方法的具体用法?C++ DcmDataset::findAndGetLongInt怎么用?C++ DcmDataset::findAndGetLongInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DcmDataset
的用法示例。
在下文中一共展示了DcmDataset::findAndGetLongInt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: tstr
//.........这里部分代码省略.........
Uint16 samplesPerPixel = 0;
res = ditem->findAndGetUint16(DCM_SamplesPerPixel, samplesPerPixel).good();
if (!res)
{
LOG0("IO/IODicom::Read: Warning: Cannot fetch SamplesPerPixel");
} else if (samplesPerPixel > sizeof(T))
{
LOG2("IO/IODicom::Read: Cannot read SamplesPerPixel: %d, target resolution smaller: %d yet", samplesPerPixel, sizeof(T));
return false;
}
oMetaDataObject.SetSamplesPerPixel(samplesPerPixel);
// DCM_PhotometricInterpretation
OFString photoInterpretationStr;
res = metaInfo->findAndGetOFString(DCM_PhotometricInterpretation, photoInterpretationStr).good();
if (!res)
{
#ifdef _DEBUG
LOG0("IO/IODicom::Read:Warning Cannot fetch PhotometricInterpretation");
#endif
} else if (strcmp(kPgPhotometricRepresentationMChrome2, photoInterpretationStr.c_str()))
{
#ifdef _DEBUG
LOG1("IO/IODicom::Read: Cannot read PhotometricInterpretation %s", photoInterpretationStr.c_str());
#endif
return false;
}
// DCM_NumberOfFrames
long numFrames = 1;
res = dataset->findAndGetLongInt(DCM_NumberOfFrames, numFrames).good();
if (!res)
{
#ifdef _DEBUG
LOG0("IO/IODicom::Read: Warning: Cannot fetch NumberOfFrames");
#endif
oMetaDataObject.SetFrameCount(1);
} else
{
oMetaDataObject.SetFrameCount(numFrames);
}
// size
Uint16 imageRows = 0;
Uint16 imageColumns = 0;
res = ditem->findAndGetUint16(DCM_Rows, imageRows).good();
if (!res)
{
LOG0("IO/IODicom::Read: Cannot fetch rows");
return false;
}
res = ditem->findAndGetUint16(DCM_Columns, imageColumns).good();
if (!res)
{
LOG0("IO/IODicom::Read: Cannot fetch columns");
return false;
}
oMetaDataObject.SetSize(PGMath::Vector3D<int>(imageColumns, imageRows, 1));
#ifdef _DEBUG
LOG2("\tIODicom::Read: Size: Rows: %d, Columns: %d", imageRows, imageColumns);
#endif
// number of bits