1. How can one read and display Dicom files in Euphoria?
- Posted by rneu Sep 09, 2017
- 1468 views
DICOM image format is most commonly used in medical images. Can one read and display Dicom files ( https://en.wikipedia.org/wiki/DICOM ) in Euphoria? If so, how? Thanks for your help.
PS: Sample images can be downloaded from this page: http://www.barre.nom.fr/medical/samples/
2. Re: How can one read and display Dicom files in Euphoria?
- Posted by ChrisB (moderator) Sep 09, 2017
- 1450 views
Hi
Dicom is too proprietary to be freely available to import as a bmp into an eu program, ie I don't think there's a dicom reading dll. Your best bet is to load an external program from eu, and your best bet for that looks like http://www.microdicom.com/downloads.html. You could also use irfanview which has dicom plugins available, and also has a command line option.
Chris
3. Re: How can one read and display Dicom files in Euphoria?
- Posted by rneu Sep 09, 2017
- 1419 views
Apparently both these are available for MS Windows only. What is the best option for viewing DICOM images in Linux?
4. Re: How can one read and display Dicom files in Euphoria?
- Posted by ChrisB (moderator) Sep 09, 2017
- 1425 views
Now you are asking!
5. Re: How can one read and display Dicom files in Euphoria?
- Posted by ChrisB (moderator) Sep 09, 2017
- 1448 views
I have no experience of these, but try https://www.google.co.uk/search?q=dicom+viewer+linux&oq=dicom+viewer+&aqs=chrome.4.0l2j69i57j0l3.7079j0j8&sourceid=chrome&ie=UTF-8]] - again, find a command line version rather than exclusive GUI version. Best of luck.
Cheers
Chris
6. Re: How can one read and display Dicom files in Euphoria?
- Posted by irv Sep 09, 2017
- 1423 views
A few are listed here:
https://askubuntu.com/questions/909692/is-there-a-way-to-open-dicom-files
I haven't looked, but odds are that at least one may use a library that could perhaps be wrapped for Eu.
7. Re: How can one read and display Dicom files in Euphoria?
- Posted by rneu Sep 10, 2017
- 1394 views
DCMTK is a very useful useful package for this purpose: http://dicom.offis.de/dcmtk.php.en It offers a large number of packages and command-line utilities for various manipulations of dicom files: http://support.dcmtk.org/docs/ For example, to convert to regular image file formats: http://support.dcmtk.org/docs/dcm2pnm.html
DCMTK can be installed by Linux package managers. What will be the best way to use it in Euphoria? Some example code will be very useful.
8. Re: How can one read and display Dicom files in Euphoria?
- Posted by ChrisB (moderator) Sep 10, 2017
- 1390 views
Hi
They look good.
Looks like those libraries might be C++, which is more awkward to wrap with Eu. What I personally would do is call
dcmj2pnm: Convert DICOM images to PGM/PPM, PNG, TIFF, JPEG or BMP
and then use eu to load up the jpg/bmp, display it and then delete it from disk - if you are using a gui (like eugtk which is the best GUI for euphoria), then the command line conversion would happen in the background. I know it's neither efficient or elegant, but it will get the job done.
eugtk has it's own image loading examples, and use system() to call the external program.
Cheers
Chris
9. Re: How can one read and display Dicom files in Euphoria?
- Posted by irv Sep 10, 2017
- 1362 views
EuGTK can load (and automatically resize) an image with just 1 line of code. Since the numerous functions in dcmj2pnm are tested and ready to use, I would just add menu items, buttons or sliders to choose what options I wanted to implement, and build up a "command line" to call dcmj.
EuGTK does have the ability to overlay images with text or graphics, if you want to annotate things. I have also experimented with adding "false color" to gray-scale x-rays, based on selecting a range of densities and replacing those pixels with a color or range of colors. Kinda works, at least has some possibilities for experimentation.
10. Re: How can one read and display Dicom files in Euphoria?
- Posted by ghaberek (admin) Sep 11, 2017
- 1373 views
DCMTK can be installed by Linux package managers. What will be the best way to use it in Euphoria? Some example code will be very useful.
They look good.
Looks like those libraries might be C++, which is more awkward to wrap with Eu. What I personally would do is call
There's also GDCM, but that appears to be C++ as well. Wrapping these is not impossible but unfortunately it's quite difficult.
-Greg