Question regarding compression when fetching instance via DicomWeb

When an image instance is requested from Orthanc via dicomweb by a viewer is it compressed in some way before being sent? If not then is it possible to do this currently in Orthanc?

Please read the DICOMweb standard:
http://dicom.nema.org/medical/dicom/2019a/output/chtml/part18/sect_6.5.3.html

=> Check out the “Accept” header.

To transcode a DICOM image to JPEG Lossless:

$ curl https://demo.orthanc-server.com/dicom-web/studies/1.3.6.1.4.1.14519.5.2.1.2193.7172.847236098565581057121195872945/series/1.3.6.1.4.1.14519.5.2.1.2193.7172.215111709746721743805035350686/instances/1.3.6.1.4.1.14519.5.2.1.2193.7172.322430993793648679416020061986 -H ‘Accept: multipart/related; type=“application/dicom”; transfer-syntax=1.2.840.10008.1.2.4.70’

To download a DICOM image in its source transfer syntax:

$ curl https://demo.orthanc-server.com/dicom-web/studies/1.3.6.1.4.1.14519.5.2.1.2193.7172.847236098565581057121195872945/series/1.3.6.1.4.1.14519.5.2.1.2193.7172.215111709746721743805035350686/instances/1.3.6.1.4.1.14519.5.2.1.2193.7172.322430993793648679416020061986 -H ‘Accept: multipart/related; type=“application/dicom”; transfer-syntax=*’

Thank you for the reply. Can you tell me what the default behavior of if the “Accept” header is not set?

Also how can which syntax is being served be changed on the Orthanc side? Is it even possible?

Also how can which syntax is being served be changed on the Orthanc side? Is it even possible?

Read the standard: It is up to the client to decide the transfer syntax to be used.

Thank you for the reply. Can you tell me what the default behavior of if the “Accept” header is not set?

Give a try, and you’ll see by yourself.

Is there a way to tell Orthanc to automatically transcode all instances to a particular syntax before it is sent to the client? Basically I want all instances requested by any client to be transcoded to JPEG2000

Have you at least read my previous answer?

"Also how can which syntax is being served be changed on the Orthanc side? Is it even possible?
=> Read the standard: It is up to the client to decide the transfer syntax to be used."

To get you in the right direction, the client proposes the syntaxes it wants to use. The client and the server then go through the list of syntaxes that the client wants to use and the first one that matches a syntax that the server is able to use is chosen.

So if you want the client to use a particular syntax, you have to ensure it is the first one in the list at the client end. Maybe the only one of that’s all you want to consider.

thanks