Effacer les filtres
Effacer les filtres

Why is dicomanon giving this error?

3 vues (au cours des 30 derniers jours)
Qinwan Rabbani
Qinwan Rabbani le 10 Juin 2016
Commenté : Nasser Hosseini le 11 Déc 2017
I am trying to use dicomanon to anonymize some files. However, with a particular files series, I am getting this error:
Error using dicom_add_attr>validate_data (line 118)
Attribute (0008,9123) has wrong data type.
Error in dicom_add_attr (line 103)
attr_str(pos).Data = validate_data(data, attr_str(pos), specificCharacterSet);
Error in dicom_convert_meta_to_attr (line 39)
attr = dicom_add_attr([], tag(1), tag(2), dictionary, specificCharacterSet, data, VR);
Error in dicom_convert_meta_to_attr>encode_item (line 151)
new_attr = dicom_convert_meta_to_attr(attr_names{p}, item_struct, dictionary, txfr, specificCharacterSet);
Error in dicom_convert_meta_to_attr>encode_SQ (line 125)
data = encode_item(SQ_struct.(items{p}), dictionary, txfr, specificCharacterSet);
Error in dicom_convert_meta_to_attr (line 26)
data = encode_SQ(metadata.(attr_name), dictionary, txfr, specificCharacterSet);
Error in dicom_copy_IOD (line 49)
new_attr = dicom_convert_meta_to_attr(attr_name, metadata, dictionary, options.txfr, specificCharacterSet);
Error in dicomwrite>write_message (line 277)
[attrs, status] = dicom_copy_IOD(X, map, ...
Error in dicomwrite (line 208)
[status, options] = write_message(X, filename, map, metadata, options);
Error in dicomanon (line 157)
dicomwrite(X, filename_out, metadata, ...
I've anonymized other DICOM files (not from the same series) just fine. I have a feeling that there might be a problem in the headers, but I'm not sure. I see that the base error is technically in validating the data. I tried turning of 'UseVRHeuristic,' but that didn't fix it. Does anyone know who to fix this error?
Thanks in advance.

Réponses (1)

Nasser Hosseini
Nasser Hosseini le 8 Déc 2017
Hi Qinwan! I have the same issue with other types of attribute (0028,0060 for instance). Could you find any solution? /Nasser Hosseini
  2 commentaires
Qinwan Rabbani
Qinwan Rabbani le 9 Déc 2017
I ended up just manually anonymizing sensitive fields using dicomwrite to replace their values in the header. Hope this helps!
Nasser Hosseini
Nasser Hosseini le 11 Déc 2017
I'm thinking about doing the same, but I'll report this to Mathworks as well. There might actually be a bug in dicomanon!

Connectez-vous pour commenter.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by