FNNDSC / ami

AMI Medical Imaging (AMI) JS ToolKit
https://fnndsc.github.io/ami/#viewers_upload
MIT License
717 stars 213 forks source link

How to display each dicom file / each slice? #403

Open thuythao1912 opened 4 years ago

thuythao1912 commented 4 years ago

I'm trying to display each dicom file like the left panel in the picture below: image (source : https://www.dicomlibrary.com)

But I just can display the black squares like this, for example, I choose 4 dicom files, so 4 blacks squares were created. image

So how can I display the image inside the square? Maybe it relates to the the camera and the scene, but I don't know how to make it. Can anybody help me? Thank you a lot!

NicolasRannou commented 4 years ago

You should be able to access the frame data via https://github.com/FNNDSC/ami/blob/master/src/models/models.frame.js#L203, then you can add it in an HTML img.

NicolasRannou commented 4 years ago

(btw the best option may be to generate those previews as jpgs on the backend if that is an option for you!)