Sign in to follow this  
Followers 0
boogieoompa

Opening up a non standard image (DICOM)

6 posts in this topic

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

Share this post


Link to post
Share on other sites



Actually it looks like I can upload the file if I zip it. Attached is the image file that I am trying to open.

Thanks ahead of time.

testdicom.zip

Share this post


Link to post
Share on other sites

That would be cool the first Autoit DICOM viewer. If you figure it out can you post your code?

Thanks

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

#5 ·  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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0