When using tools/create-dicom endpoint, and uploading a JPEG, I suspect Orthanc is decoding the JPEG and saving an uncompressed raw 8 bit image as the DICOM image.
Other than transcoding this newly created dicom file into JPEG encoded DICOM, is it possible if a JPEG is uploaded, to store the raw jpeg in the DICOM as a JPEG transfer syntax.
There’s already an item in our TODO to add “TransferSyntax” to the /create-dicom route but I’ve not gone through the analysis yet so let’s go.
I would assume various situations:
if IngestTranscoding is configured in Orthanc: Whatever the TransferSyntax in /create-dicom, at the end, the image is converted to the IngestTranscoding Transfer Syntax anyway.
else:
if no TransferSyntax is specified in /create-dicom → create a “raw image”
else if a TransferSyntax is specified in /create-dicom, since the pixels might be provided as raw, png or jpeg, for genericity, we would likely uncompress the pixels to raw before targeting the requested TransferSyntax.
I have the feeling that you’re requesting a 4th case in which you’d like to “Force” the Transfer Syntax because you know that you are already providing the pixels in the right format. Is my understanding correct ?
Please feel free to comment on the first 3 cases as well