DCMTK在一个序列图像中安插一项
DCMTK在一个序列图像中插入一项?Howto: Add an item to a sequence#include dcmtk/config/osconfig.h #i
DCMTK在一个序列图像中插入一项
?
Howto: Add an item to a sequence#include "dcmtk/config/osconfig.h" #include "dcmtk/dcmdata/dctk.h" int main(int argc, char *argv[]) { DcmFileFormat fileformat; if (fileformat.loadFile("test.dcm").good()) { DcmItem *item = NULL; DcmDataset *dataset = fileformat.getDataset(); if (dataset->findOrCreateSequenceItem(DCM_ReferencedImageSequence, item, -2 /* append */).good()) { item->putAndInsertString(DCM_ReferencedSOPClassUID, UID_SecondaryCaptureImageStorage); item->putAndInsertString(DCM_ReferencedSOPInstanceUID, "1.2.276.0.7230010.3.1.4.1787205428.14833.1256718852.966062"); fileformat.saveFile("test_out.dcm"); } } return 0;}?转载:http://support.dcmtk.org/wiki/dcmtk/howto/addsequenceitem