반응형
string filename = "output.dcm";

DicomDataset ds = new DicomDataset(); //Main dataset
ds.Add(DicomTag.SpecificCharacterSet, "ISO_IR 100"); //Add some items
ds.Add(DicomTag.PatientID, "191212121212");

DicomDataset sqContent = new DicomDataset(); //Content of the sequence
sqContent.Add(DicomTag.Modality, "US");
sqContent.Add(DicomTag.ScheduledProcedureStepStartDate, DateTime.Now.Date);

DicomSequence sq = new DicomSequence(DicomTag.ScheduledProcedureStepSequence, sqContent); // Create sequence, add content
ds.Add(sq); //Add sequence to main dataset

DicomFile file = new DicomFile();
file.Dataset.Add(ds); //Add main dataset to DicomFile
file.FileMetaInfo.TransferSyntax = DicomTransferSyntax.ImplicitVRLittleEndian; //Specify transfer syntax
file.Save(filename); //Save file to disk
반응형

'[====== Development ======] > DICOM' 카테고리의 다른 글

DCMTK DICOM Print SCU  (1) 2023.03.24
DCMTK on Linux  (0) 2022.08.02
[DCMTK] JPEG 압축  (0) 2022.06.10
DICOM DOSE SR 관련 자료  (0) 2021.09.24
[DCMTK] Source Code 빌드 방법 정리  (2) 2021.08.27

+ Recent posts