Limit frame numbers

Hallo Everything,

I am using Orthanc. I fetching a multi frame dicom series using rest api call as following:

In Orthanc cheat sheet, there is an example to get the frames like:

My question is:
" when we are fetching the multiframe dicom series from Orthance, can we limit the number frames we want? For example, if a series have 30 frames. Can we limit the view only to 10 to 20 ??
Please feel free to ask if you have any question. Thanks in advance.


You can use the dicom-web/studies/{study}/series/{series}/instances/{instance}/frames/{frames} uri to retrieve individual frames one by one.

Thanks for the reply.
But if i have 100 frames in a mutliframe dicom. And I need only to show from 20-
70. I have to call the api so many times. Also, there will be another problem. How to bind them together again as single multiframe dicom.

So, is there any way to to call the api like :

dicom-web/studies/{study}/series/{series}/instances/{instance}/frames/{frames 20 -50}

Or something similar to that ?

No, there’s no such thing in the dicom-web standard.

Note that you can still write a python plugin that would rebuild a DICOM file server side with only the requested frames.
However, note that the Orthanc Rest-API currently does not allow you to create multi-frame files ( so you would probably have to use pydicom to generate that file.

Another alternative is still to call N times the …/frames/{id} route. That’s how most web-viewers work.



The DICOMweb standard allows you to retrieve multiple frames as follows:

$ curl,11,12

Note the comma-separated list of frames.


Hi Sebastien,
Nice, if it works.
$curl http://myorthanc_server/dicom-web/studies/[studyUID]/series/[seriesUID]/instances/[SOPinstanceUID ?]/frames/10,11,12

My question is after …/instances/ which id to put ?
It is supposed to be SOP instance UID or Orthanc assigned instance id ? I guess the first one ( SOP instance UID )?

Thanks a lot again.

Hi Sebastien,
I tried the curl command as following:

$curl [http://myorthanc_server/dicom-web/studies/[studyUID]/series/[seriesUID]/instances/SOPinstanceUID ]/frames/1,2,3

Unfortunately it does not work. It throws error:
“Invoke-WebRequest : Cannot convert ‘System.Object[]’ to the type ‘System.Uri’ required by parameter ‘Uri’. Specified method is not

You must use the “Study Instance UID”, “Series Instance UID” and “SOP Instance UID” tags from DICOM, not the Orthanc identifiers.

This is because you are using the Microsoft Windows PowerShell, not a UNIX-like shell. Check out this section of the Orthanc Book:


Hey Sebastien,
You are correct :slight_smile:
I was using windows Power shell. The command worked in a GitBash and in Ubunutu .
Thanks a lot :slight_smile:
Note for others:
_________ Issue resolved. See The answer of Sebastien.___________