我有一些与DCMTK有关的代码.如果我从命令行使用g ++,我可以成功构建并运行它.这是代码:
#include "dcmtk/config/osconfig.h"
#include "dcmtk/dcmdata/dctk.h"
int main()
{
DcmFileFormat fileformat;
OFCondition status = fileformat.loadFile("test.dcm");
if (status.good())
{
OFString patientsName;
if (fileformat.getDataset()->findAndGetOFString(DCM_PatientsName, patientsName).good())
{
cout << "Patient's Name: " << patientsName << endl;
} else
cerr << "Error: cannot access Patient's Name!" << endl;
} else
cerr << "Error: cannot read DICOM file (" << status.text() << ")" << endl;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
这是构建命令:
g++ testeapp.cxx -DHAVE_CONFIG_H -I/path_to_dcmtk/include -L/path_to_dcmtk/lib -pthread -ldcmdata -lz -loflog -lofstd -o main
Run Code Online (Sandbox Code Playgroud)
我想制作一个CMakeLists.txt来在Kdevelop中构建它.这就是我目前拥有的:
# Configure toplevel …Run Code Online (Sandbox Code Playgroud) 我对dicom标准中的图像类型有疑问.在dicom文档中我发现图像类型有五种类型:
MONOCHROME1
MONOCHROME2 MPEG2 -single component data
YBR_ICT
YBR_RCT
YBR_PARTIAL_420 MPEG2 -multi-component data
Run Code Online (Sandbox Code Playgroud)
如果dicom文件中的图像类型是MONOCHROME1或MONOCHROME2,它是压缩还是不压缩?两种类型有什么不同:MONOCHROME1或MONOCHROME2?谢谢