Reputation: 73
In OHIF I need to get base 64 value from cornerstone.because I need to pass the jpeg/png to a api for some prediction task in python flask.
Upvotes: 1
Views: 392
Reputation: 3062
OHIF uses Cornerstone.js to render the image to a canvas. If you only need the rendered pixel values, you can use the Canvas API's toDataUrl
. If you need the underlying / original pixel data, you can use the underlying cornerstone image's getPixelData
method.
Upvotes: 1