Jump to content

Recommended Posts

Posted

I wanted to try to get a better handle of how medical images work so I decided to play around with trying to open them. To be honest this is way over my head but I think it would be a fun side project to work on (once I get it open I plan on scripting utilities to make it more robust).

So as a history in brief the file type is .dcm (stands for DICOM) it is an image file with a hexadecimal text header. Header and all aside I would like to open up the image part so I scanned in a blank sheet of paper with the word TEST written on it and I attached the result of trying to open it with the following code on the post (test.txt).

$file = FileOpen("testdicom.dcm", 64)
$file2 = FileOpen("test.txt", 1)

If $file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
EndIf

While 1
    $chars = FileRead($file, 20)
    If @error = -1 Then ExitLoop
    FileWriteLine($file2, $chars & @CRLF)   
Wend

FileClose($file)
FileClose($file2)

My question is can anyone lend me a hand as to where to go from here? I could not upload the .dcm file but there are sample files located at http://www.barre.nom.fr/medical/samples/ . It seems that the information I need to construct an image is there I just dont really know where to begin to do so. Sorry for the open ended question but hopefully someone will find this to be mildly amusing.

test.txt

  • 2 months later...
Posted

Hi.

I am really interrested in knowing a little much about that Dicom format, and, specially, how to get the metadatas from a dcm file.

Did you find how to do?

I've read all the links, but my knowledge is too poor at the moment to get it by myself.

Best Regards,

T@PµZ.

Posted (edited)

How about this site?

"This guide gives is a brief description of the DICOM standard, which is commonly used for the transfer and storage of medical images."

At http://www.codeproject.com/KB/graphics/dcmconverter.aspx you can find an article named "Converting a DICOM image to a common graphic format and vice versa with DCMTK and CxImage"

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

Thanks a lot for that reply.

I had already tried to understand about dcmtk, a loooong time ago, when I was younger (last week, in fact), and... I hoped someone had found a kind of similar solution with autoit to explain it to me...

Erf... It sounds like I have to read it again, and again, and again, until I understand that I'm really too dummy to get it out... :D

Best Regards

T@PµZ

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...