rii-mango / Papaya

A pure JavaScript medical research image viewer.
Other
549 stars 205 forks source link

Negative image #210

Open joweste opened 2 years ago

joweste commented 2 years ago

Hi, How can I get a negative of the dicom image showing in the viewer container?

niks2060 commented 6 months ago

@joweste I think you want inverted images. Refer how you can implement ColorTable and add flowing as data. Sample code papaya.viewer.ColorTable.TABLE_GRAYSCALE = {"name": "Grayscale", "data": [[0, 0, 0, 0], [1, 1, 1, 1]], "gradation": true};

and value need to be added as data : [[0, 1, 1, 1], [1, 0, 0, 0]]

This will be added in next checkin that I am going to do.