Unable to set RetrieveAETitle & RetrieveLocationUID on KOS manifest

104 views
Skip to first unread message

Remco Overdevest

unread,
Oct 15, 2015, 7:59:20 AM10/15/15
to dcm4che
Hi,

Is their any way to set the RetrieveAETitle and RetrieveLocationUID in a KOS object. I tried it with the mkkos tool as follow: 

mkkos --title DCM-113000 -s CurrentRequestedProcedureEvidenceSequence/ReferencedSeriesSequence/RetrieveAETitle=aet -o kos.dcm /path/to/study
mkkos --title DCM-113000 -s 0040A375/00081115/00080054=aet -o kos.dcm /path/to/study
mkkos --title DCM-113000 -s RetrieveAETitle=aet -o kos.dcm /path/to/study

none of them work. I want to make this work in java to use (copy) the source code of the mkkos tool and add additional attributes. I tried to just add attributes to the ReferencesSeriesSequence but nothing outputs a valid KOS object.

Any tips?

Terry

unread,
Feb 26, 2016, 1:23:08 PM2/26/16
to dcm4che
I also need to do the exact same thing (add the RetrieveAETitle and RetrieveLocationUID to the KOS object using the mkkos utility).  I also tried the same options you show below but similarly had no success ... did you ever figure out how to accomplish this with mkkos or did you find a different utility to do this?

Thanks,

Terry 

Remco Overdevest

unread,
May 18, 2016, 2:47:35 AM5/18/16
to dcm4che
I copied the MkKOS source code to a custom MkKOS class. I modified the getOrAddItem method as following:

private Attributes getOrAddItem(Sequence seq, int tag, String value) {
for (Attributes item : seq)
if (value.equals(item.getString(tag)))
return item;

Attributes item = new Attributes(2);
item.setString(tag, VR.UI, value);
if (tag == Tag.SeriesInstanceUID) {
item.setString(Tag.
RetrieveAETitle, VR.AE, "aetitle");
item.setString(Tag.RetrieveLocationUID, VR.UI, "location");
}
seq.add(item)
;
return item;
}

Once I made this change the location and aetitle were filled as expected.

Remco
Reply all
Reply to author
Forward
0 new messages