-
Notifications
You must be signed in to change notification settings - Fork 26
Request help on AIMConverter.exe #2
Comments
Hello glhfgg1024,
Based on the information you provided and without seeing the input, I can
say this:
1. The error you are seeing informs you that one or more values for UID
specified in the AIM-003.xml are invalid DICOM UID values. Though
misspelled, the error says that UID content validation fails as the UID
value has things other that digits and periods. See DICOM PS3.5 Chapter 9
for full UID specification:
http://dicom.nema.org/dicom/2013/output/chtml/part05/chapter_9.html
2. Unfortunately, AIMConverter.exe does not create DICOM-RT instances. The
tool only converts between AIM XML documents and proprietary AIM DICOM SR
instances.
Regards,
Vlad
…On Tue, Jan 9, 2018 at 9:26 PM, glhfgg1024 ***@***.***> wrote:
Hi Dear Sir/Madam,
Thanks for sharing this valuable toolkit!
I have a problem, I want to convert the AIM XML files to DICOM-RT file.
I use the following command:
C:\annotation-and-image-markup-master\AIMToolkit_v4.0.0_rv44\source\AIMLib\Release\x64>AIMConverter.exe -i AIM -o SR AMC-003.xml AMC-003
But there are some errors as follows:
Error: Error writing annotation(s) to file "AMC-003":
Annotation Collection Validation Errors:
Annotation Collection Unique Identifier
II value is not a valid UID
UID must constist of digits and periods(.) only
Usage:
AIMConverter.exe -i[nput] AIM|SR|CDA -o[utput] AIM|SR|CDA input_file output_file
If convenient, could you please give some advice? Thanks a lot!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AD2ibPjKiGlfyL_7x9UlY5QZ2KdtmEg8ks5tJC3TgaJpZM4RYwqk>
.
|
Hi, @vkleper, thanks a lot for your kind comments and suggestions! Yeah, after debugging the code, I've found that the UID in AIM-003.xml is as follows:
But in the header of this xml, it shows:
So from the header, it seems the xml is generated from AIM 4.1.0 version. But when I tried to convert the AIM-003.xml to AIM-003.dcm, it would fail. When I commented the validation code in "ModelValidator.cpp",
Then other errors occured:
So, I'm not sure if the AMC-003.xml was generated from AIM 4.1.0. |
Hi @glhfgg1024, I hope I'm not too late with my reply.
As the first test, your may try validating your XML documents against AIM
Schema (AIM_v4_rv44_XML.xsd, etc.) using any standard XML validation tool.
If the annotations validate, without seeing your complete annotation files,
I can only guess that some values are incorrectly represented in them. AIM
Schema uses ISO 21090 data types that allow for multiple different value
formats in a single type. DICOM requirements are more stringent.
Yeah, after debugging the code, I've found that the UID in AIM-003.xml is
as follows:
<uniqueIdentifier root="hnmh13izcz8kr4gxa1efkiaygscgfv77jz79mvoy"></uniqueIdentifier>
As I mentioned earlier, the problem is with the way that specific UID was
created. While it may be a valid ISO 21090 II data type value, for a DICOM
UID to be valid, it has to conform to DICOM PS3.5 Chapter 9 for full UID
specification: http://dicom.nema.org/dicom/2013/output/chtml/part05/
chapter_9.html That's what AIMConverter's validator is checking for.
Then other errors occured:
(base) C:\annotation-and-image-markup-master\AIMToolkit_v4.1.0_rv44\source\AIMLib\Release\x64>AIMConverter.exe -i XML -o SR ./AMC-003.xml AMC-003.dcm
Error: Error writing annotation(s) to file "AMC-003.dcm":
Annotation Collection Validation Errors:
Person is invalid
Birth Date is invalid
Month value must be between 1 and 12
Whoever encoded the Birth Date of a patient, didn't provide a correct
value. And if it's empty, empty values are not allowed.
So, I'm not sure if the AMC-003.xml was generated from AIM 4.1.0.
You are right. It appears that a tool other than AIMToolkit 4.1.0 was used
to generate your annotations.
In general, you may still be able to use AIMConverter if your XML
annotations pass external AIM XML Schema validation and you are able to
correct data errors. One way to fix data errors would be to write a small
XML transformation to correct or remove the offending parts of the
annotations. Then use the AIMConverter on the cleaned up data.
…On Thu, Jan 11, 2018 at 8:52 AM, glhfgg1024 ***@***.***> wrote:
Hi, @vkleper <https://github.com/vkleper>, thanks a lot for your kind
comments and suggestions!
Yeah, after debugging the code, I've found that the UID in AIM-003.xml is
as follows:
<uniqueIdentifier root="hnmh13izcz8kr4gxa1efkiaygscgfv77jz79mvoy"></uniqueIdentifier>
But in the header of this xml, it shows:
<ImageAnnotationCollection aimVersion="AIMv4_0" xmlns="gme://caCORE.caCORE/4.4/edu.northwestern.radiology.AIM" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="gme://caCORE.caCORE/4.4/edu.northwestern.radiology.AIM AIM_v4_rv44_XML.xsd">
So from the header, it seems the xml is generated from AIM 4.1.0 version.
But when I tried to convert the AIM-003.xml to AIM-003.dcm, it would fail.
When I commented the validation code in "ModelValidator.cpp",
bool ModelValidator::isValid(const iso_21090::II& ii, bool allowDefaults /*= false*/)
{
//RETURN_IF_UID_NOT_VALID(ii.toString(), "II");
return true;
}
Then other errors occured:
(base) C:\annotation-and-image-markup-master\AIMToolkit_v4.1.0_rv44\source\AIMLib\Release\x64>AIMConverter.exe -i XML -o SR ./AMC-003.xml AMC-003.dcm
Error: Error writing annotation(s) to file "AMC-003.dcm":
Annotation Collection Validation Errors:
Person is invalid
Birth Date is invalid
Month value must be between 1 and 12
So, I'm not sure if the AMC-003.xml was generated from AIM 4.1.0.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AD2ibAUB7KD-7brxyZTXCDnGqAlD3_cyks5tJiAugaJpZM4RYwqk>
.
|
Hi @vkleper , thanks a lot for your kind reply and suggestions! I'm trying to parse https://wiki.cancerimagingarchive.net/download/attachments/28672347/AIM_files.zip?version=1&modificationDate=1512415990689&api=v2 file. Yeah, I also found that the data creator may use other version of AIMConverter to generate their files. |
Hi @glhfgg1024 , |
Hi Dear Sir/Madam,
Thanks for sharing this valuable toolkit!
I have a problem, I want to convert the AIM XML files to DICOM-RT file.
I use the following command:
But there are some errors as follows:
If convenient, could you please give some advice? Thanks a lot!
The text was updated successfully, but these errors were encountered: