javascriptpapaya

Is there any possibility to view jpeg images in papaya Dicom viewer?


I want to view the JPEG images in papaya Dicom viewer (Only main view).

Because I need xy position and xy coordinates have same like DCM images.

Is it possible in papaya Dicom viewer?


Solution

  • This feature doesn't yet exist in Papaya, but it should be possible to add it with some minor effort. DICOM compression supports JPEG, so the necessary decoders are already there in the project.

    The way to do it would be to add another header type, say:

    papaya.volume.Header.HEADER_TYPE_JPEG = 3;
    

    Then add file header-jpeg.js, implementing all the functions you see in header-dicom.js and header-nifti.js.

    Since you'll be missing all the usual DICOM metadata, most of the header info would fall to being defaults (e.g., voxel dimensions 1x1x1, etc).

    An alternative way would be to use something like DCTMK to convert the JPEGs to DICOM files: https://support.dcmtk.org/docs/img2dcm.html