【学习DCMTK】VC读取dicom图像

添加include、lib目录,还有依赖库

依赖库:

netapi32.lib
wsock32.lib
ofstd.lib
oflog.lib
dcmimgle.lib
ijg8.lib
ijg12.lib
ijg16.lib
dcmdata.lib
dcmimage.lib
dcmjpeg.lib
dcmnet.lib
zlib.lib


#include "stdafx.h"
#include "dcmtk/dcmdata/dctk.h"
#include "dcmtk/dcmimgle/dcmimage.h"
#include "dcmtk/dcmdata/dcfilefo.h"

using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
	DcmFileFormat pDicomFile;
	OFCondition oc = pDicomFile.loadFile("原始图像.dcm");
	//数据集
	DcmDataset *pDataset = pDicomFile.getDataset();
	//头文件 
	DcmMetaInfo *pMetaInfo = pDicomFile.getMetaInfo();
	//传输语法
	E_TransferSyntax xfer = pDataset->getOriginalXfer();

	pMetaInfo->print(cout);

	return 0;
}


你可能感兴趣的:(C/C++,医疗设备,c++,dcmtk)