Convert image in Analyze format to Dicom images
Show older comments
I am working in Medical Image Processing. I am in need to convert the image in Analyze format to Dicom images. Kindly tell me the solution.
Thanks in advance.
Answers (1)
Image Analyst
on 2 Jul 2013
0 votes
I don't know what Analyze format is. What program made the images? Have you looked in the File Exchange to see if anyone has uploaded a reader or writer for that format? Have you looked up "Working with DICOM files" in the MATLAB help documentation?
5 Comments
Octa
on 2 Jul 2013
Image Analyst
on 2 Jul 2013
OK, so you say that you " can read the slices from this file". That's good - at least can read your input images and that part is solved.
Now, if you have read the section of the help I referred you to, you would have found this:
Writing Image Data or Metadata to a DICOM File
To write image data or metadata to a file in DICOM format, use the dicomwrite function. This example writes the image I to the DICOM file ankle.dcm.
dicomwrite(I,'ankle.dcm')
Since you're still asking, I presume you didn't want to read the help for dicomwrite(), or just prefer for someone to give you code to do it, or you just don't understand how to execute the dicomwrite() function call. Is that true? Where exactly are you stuck calling dicomwrite()? I don't have or use dicom format files, or analyze format files, so I can't really write anything for you.
Octa
on 2 Jul 2013
Edited: Walter Roberson
on 1 Oct 2016
Image Analyst
on 2 Jul 2013
The dicom file you create will not somehow magically figure out the parameters and store them - you have to tell it. You have an "Analyze" format reader program already - I suggest you look at that, or else use knowledge from some other source such as the CT or MRI instrument itself, or figure it out using a phantom of known dimensions and measuring it.
Octa
on 2 Jul 2013
Categories
Find more on Convert Image Type in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!