We use this endpoint in the backend to generate pdf, so we can’t use any viewer like Stone Web viewer or OHIF. We can only make requests, get buffer of the image and add it to pdf.
Is there any tool that renders an image correctly and returns it?
The /instances/{...}/preview is not dedicated to the rendering of PDF. You must use /instances/{...}/pdf to retrieve the PDF embedded in a DICOM instance (cf. documentation).
Sorry i did’t explain it well. We generate regular pdf of doctor’s conclusion to study. We need to add some images to pdf. We use /preview feature, but sometimes it generates invalid png. In our case we can’t send viewer rendered image from client to backend (like JS canvas.toBlob() or something), so is there any orthanc tool to get image from dicom without viewer on backend?
We’ve tried /instances/…/image-uint8 and image-uint16, but it generates black screen.
Thanks
Wow. Thanks. Because of this response https://groups.google.com/g/orthanc-users/c/CVwYMUwycO8 i thought viewer is required.
Is there any caveats of using /render instead of /preview? I mean why /preview is used in admin dashboard?
/preview only considers the pixel data (which is fine for an administration dashboard), while /rendered takes into account the DICOM tags associated with windowing (which is more adapted to medical applications, even though this could lead to a bad rendering if the DICOM modality has not correctly populated this information). This depends upon your application.