New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help Exporting Dicom to 16-bit Jpeg... #783
Comments
The RenderImage is intended to create something, that can be displayed on a screen - currently they all are still 8bit per color channel. And so is jpeg. Does jpeg support 16bit? never heard about it, would be great if you could show me some links. I only know from digital cammera raw formats of 16 or 32 bit. Anyway: There are 2 possibilities you have: The intended is, that you just use fo-dicom. The DicomImage has two properties called Or if you want to do the windowing pipeline yourself, you can extract the original pixelarray from the dicomImage and then process it yourself as you like. Mia-san has provided some code how to the the raw pixels as uncompressed, in case your DicomFile is stored in a compressed Transfer syntax. |
Thank you very much for your help and insights. I am no expert here. A few searches online indicate Jpeg 2000 supports 16-bit, but not widely used. Windows APIs look shady on it's support also. I know with 8-bit, we can only show up to 256 shades of gray? So how does fo-dicom translate a much wider range of grayscale values to this much smaller range (after setting the width and level properties)? I guess this is what I am confused about? I like the idea of using fo-dicom for this. In my application, I need to also apply pixel coloring to value ranges while the user scrolls through the images. Does fo-dicom support a pixel pipeline of some sort when .RenderImage() is called that I can hook into in order to keep performance good? I need to be able to apply window/level + colorization in realtime as the user scrolls. Please advise?! |
Right, Jpeg2000 can handle 8, 12 and 16bit. Thats the compression where lots of DICOM images are compressed with, but thats nothing that windows or webbrowsers etc can handle. fo-dicom uses the windowing pipeline that is defined in DICOM standard. This is important, since a DICOM viewer has to guarantee that the image are rendered exactly as it is intended. Since this is no issue (bug, enhancement etc), I would recommend to coninue on gitter (https://gitter.im/fo-dicom/fo-dicom), which is a more active board to ask questions. |
some links to read in advance: |
Will close this now, if there are still some issues or questions please feel free to reopen this issue. |
I have a 16-bit source dicom file loaded into a DicomImage. Whenever I export this image via .RenderImage(), I get an 8-bit Jpeg file. However, I would like to retain all the pixel information because I need to be able to display the full window / level data inside my target application, just like a traditional dicom viewer would support. This is not working properly and I assume its because the created Jpeg is 8-bit (verified) instead of 16-bit, so I have lost much of the information. Can someone tell me how to export the Jpeg so the full pixel data is retained? Many thanks.
The text was updated successfully, but these errors were encountered: