필터 지우기
필터 지우기

Why is dicomanon giving this error?

조회 수: 2 (최근 30일)
Qinwan Rabbani
Qinwan Rabbani 2016년 6월 10일
댓글: Nasser Hosseini 2017년 12월 11일
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.

답변 (1개)

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

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by