Recent

Author Topic: DICOM viewer  (Read 11657 times)

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
DICOM viewer
« on: June 15, 2013, 07:43:49 pm »
Just a start(3-days work) and
BGRABitmap, incredible..
Regards!

p.s. win7 32bit  CT4.3, Firebird2.5-super

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
Re: DICOM viewer
« Reply #1 on: June 15, 2013, 07:44:48 pm »
More pictures...

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: DICOM viewer
« Reply #2 on: June 15, 2013, 08:12:23 pm »
Nice.

BTW, there already exist applications in Lazarus for this job, MRIcron a MRIcronGL. I tried them ~ 1 year ago - worked well (although they are GTK2 app. and I run them on KDE4 distro).
See in gallery: http://wiki.freepascal.org/Lazarus_Application_Gallery#MRIcroGL

AFAIK there are more formats of MRI, not sure which ones are supported in MRIcron. Also, I don't know if MRIcron is open source.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: DICOM viewer
« Reply #3 on: June 15, 2013, 08:21:28 pm »
MRIcron does not natively support DICOM IIRC, but there is apparently a conversion utility.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: DICOM viewer
« Reply #4 on: June 15, 2013, 08:40:24 pm »
Yes, I see now: dcm2nii & dcm2niigui. I still have it on disk.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
Re: DICOM viewer
« Reply #5 on: June 15, 2013, 09:19:49 pm »
Nice.
Thank you very much!
See:
http://sourceforge.net/projects/dicomwidow/files/dicomwidow/
http://sourceforge.net/projects/ezdicom/
Written in Delphi(both), excellent work, and so much can be learned by studying the code.
Regards!

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
Re: DICOM viewer
« Reply #6 on: June 16, 2013, 09:03:53 am »
Also, with BGRABitmap it's easy to convert both app to Lazarus projects,
with some modifications.
Regards
p.s. Of course, read the license!

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
Re: DICOM viewer
« Reply #7 on: June 27, 2013, 10:11:26 am »
Some changes, convert dcm to jpg, read data etc.
Regards

circular

  • Hero Member
  • *****
  • Posts: 4455
    • Personal webpage
Re: DICOM viewer
« Reply #8 on: July 14, 2013, 09:31:48 pm »
That's interesting.

What about adding image comparison using BlendImage or BlendImageOver (in case you use an alpha channel) ?

Code: [Select]
var
  img1,img2,comp: TBGRABitmap;
begin
  ...
  comp := TBGRABitmap.Create(img1.Width, img1.Height);
  comp.PutImage(0,0, img1,dmSet);
  comp.BlendImage(0,0,img2,boDifference);
Conscience is the debugger of the mind

jwdietrich

  • Hero Member
  • *****
  • Posts: 1266
    • formatio reticularis
Re: DICOM viewer
« Reply #9 on: July 14, 2013, 09:45:42 pm »
I would recommend to make the GUI elements a bit darker (e.g. similar to the task bar on the bottom of the last screenshot) in order to make it easier to view the also dark X-ray images.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 4.2.0 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
Re: DICOM viewer
« Reply #10 on: July 15, 2013, 08:21:18 am »
Circular, jwdietrich, thank you very much!
The problem is that I had not dealt with graphics,
relatively slow finding the necessary things and I have a lot to learn.
There are so many possibilities(BGRA)...
Thanks for the suggestions, I'll try to improve existing code.
Thank you very much and
best regards!
p.s. BGRA, amazing lib, thank you very much

 

TinyPortal © 2005-2018