WADO_RS service issue requesting video or PDF image format

352 views
Skip to first unread message

and.v...@gmail.com

unread,
Jun 1, 2021, 6:27:31 AM6/1/21
to dcm4che
Hi everyone, I have a problem with retrieving images via the RESTful API, specifically via the WADO_RS service.

I am trying to retrieve series images in a video format (MP4 or MPEG) or in PDF format via the following call:

https://{{hostname}}:8443/dcm4chee-arc/aets/DCM4CHEE/rs/studies/114368.13103.184139195.459951040.1383842186.2121555336/series/1.3.46.670589.11.32670.5.0.5256.2018011119131354153/rendered?accept=multipart%2Frelated%3Btype%3Dvideo%2Fmp4

but the response is always:
{"errorMessage": "Not accepted instances present."}

If, on the other hand, I request the image/gif format from the same service, everything works regularly:

https://{{hostname}}:8443/dcm4chee-arc/aets/DCM4CHEE/rs/studies/114368.13103.184139195.459951040.1383842186.2121555336/series/1.3.46.670589.11.32670.5.0.5256.2018011119131354153/rendered?accept=multipart%2Frelated%3Btype%3Dimage%2Fgif

Do you know if there are problems retrieving images in video/PDF format or if I need to configure something in particular?

Thank you very much for the attention.

I wish you all a good day,
Andrea

Gunter Zeilinger

unread,
Jun 8, 2021, 7:39:45 AM6/8/21
to dcm4che
The WADO-RS service of dcm4chee-arc-5 does not support transcoding of multi-frame images to MPEG4 videos, or rendering SR Documents as PDF

and.v...@gmail.com

unread,
Jun 9, 2021, 6:28:15 AM6/9/21
to dcm4che
Ok, thank you for the reply.

I also noticed that transcoding to image/jpeg doesn't work for multi-frame images either; only the one in image/gif works.

Is there any way to get each jpeg images (or any other image file type) from multi-frame image?

Thank you so much!

Gunter Zeilinger

unread,
Jun 9, 2021, 6:34:35 AM6/9/21
to dcm4che
You may retrieve rendered single frames as jpeg, or accept multipart/related;type="image/jpeg", so the server can pack multiple JPEGs in one  multipart/related response.

and.v...@gmail.com

unread,
Jun 9, 2021, 7:31:43 AM6/9/21
to dcm4che
Thank you again for your very quick reply.

However, I think there is something wrong with my image recovery.

When I fetch a specific frame everything works fine:
https://kubernetes.docker.internal:8443/dcm4chee-arc/aets/DCM4CHEE/rs/studies/:studyUID/series/:seriesUID/instances/:instanceUID/frames/:frame/rendered?accept=multipart/related;type=image/jpeg
in the same manner as this request works:
https://kubernetes.docker.internal:8443/dcm4chee-arc/aets/DCM4CHEE/rs/studies/:studyUID/series/:seriesUID/instances/:instanceUID/frames/:frame/rendered?accept=image/jpeg

But if I try to retrieve the same image at the instance or series level using this request:
https://kubernetes.docker.internal:8443/dcm4chee-arc/aets/DCM4CHEE/rs/studies/:studyUID/series/:seriesUID/instances/:instanceUID/rendered?accept=multipart/related;type=image/jpeg
or this request:
https://kubernetes.docker.internal:8443/dcm4chee-arc/aets/DCM4CHEE/rs/studies/:studyUID/series/:seriesUID/rendered?accept=multipart/related;type=image/jpeg

I always get the 406 Not Acceptable response:

{"errorMessage":"Not accepted instances present."}

Could it be related to the fact that the multi-frame image is compressed with JPEG2000 Lossless Only algorithm?

Thank you so much again for the time you are dedicating to me.

Have a nice day,
Andrea

Gunter Zeilinger

unread,
Jun 9, 2021, 7:42:53 AM6/9/21
to dcm4che
Guess you did not encode '/' as %2F in URL

and.v...@gmail.com

unread,
Jun 9, 2021, 9:19:54 AM6/9/21
to dcm4che

Gunter Zeilinger

unread,
Jun 9, 2021, 9:49:31 AM6/9/21
to dcm4che
Ok, could reproduce the issue - will take a look when I find time...

and.v...@gmail.com

unread,
Jun 9, 2021, 10:02:23 AM6/9/21
to dcm4che
Thank you very much, it would be greatly appreciated.

I'm available in case further tests are needed.

Have a nice day,
Andrea

Gunter Zeilinger

unread,
Jun 9, 2021, 10:03:52 AM6/9/21
to dcm4che
BTW, current DICOM PS 3.18 does not specify to support multipart/related payloads for Retrieve Rendered Instance Transaction:

> 9.5.3.3 Response Payload
>
> A success response shall contain a single rendered image encoded in the Selected Media Type.

but does not specify, how a multi-frame image or all objects of a whole series/studies shall be rendered in a single image.

See no use case for such behavior, therefore I implemented to support multipart/relatedfor retrieve on study and series level. Thought I also implemented it for multi-frame images on instance level, but I am not 100% sure.

Andrea Venanzi

unread,
Jun 9, 2021, 10:20:46 AM6/9/21
to dcm...@googlegroups.com
I understand what you said, it seems to me that the one adopted by you is the best behavior.

If it helps, if instead of multipart/related;type=image/jpeg I use multipart/related;type=image/gif, everything works correctly:
https://kubernetes.docker.internal:8443/dcm4chee-arc/aets/DCM4CHEE/rs/studies/:studyUID/series/:seriesUID/rendered?accept=multipart%2Frelated%3Btype%3Dimage%2Fgif

Thank you again,
Andrea

--
You received this message because you are subscribed to a topic in the Google Groups "dcm4che" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dcm4che/ni2YFzZVkUI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dcm4che+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dcm4che/59c6f043-aec2-47d2-9775-ecc5b9dcb0d0n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages