Dcmtk — Tutorial

findscu -aet MYAE -aec PACSNAME pacs_host 104 -W query.wl First query to get StudyInstanceUID, then:

#include "dcmtk/config/osconfig.h" #include "dcmtk/dcmdata/dctk.h" #include <iostream> int main() DcmFileFormat file; OFCondition status = file.loadFile("patient.dcm"); if (status.good()) OFString patientName; file.getDataset()->findAndGetOFString(DCM_PatientName, patientName); std::cout << "Patient Name: " << patientName << std::endl; else std::cerr << "Error: " << status.text() << std::endl; dcmtk tutorial

movescu -aet MYAE -aec PACSNAME -aet MOVE_DESTINATION pacs_host 104 -k StudyInstanceUID=1.2.3.4... where MOVE_DESTINATION must match the AE title of your storescp . Compile with -ldcmdata -ldcmnet -loflog -lofstd . findscu -aet MYAE -aec PACSNAME pacs_host 104 -W query

dcmodify -ma PatientName="ANONYMOUS" -ma PatientID="12345" patient.dcm Change Study Description: int main() DcmFileFormat file