comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » accessing Siemens magnetom MR images
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
accessing Siemens magnetom MR images [message #11664] Tue, 19 May 1998 00:00 Go to next message
Jonas is currently offline  Jonas
Messages: 23
Registered: May 1998
Junior Member
I could spend some time doing this myself, but there have to be lots of
codes doing this already.

I want to read image files originating from our two Simens MR scanners
(Magnetom Vision/Expert) into IDL. I only need the image information, the
other information (TE, TR, flip, Patient info...) is just a bonus.

Any info/help/code is welcome

/Jonas, the IDL newbie
Re: accessing Siemens magnetom MR images [message #11860 is a reply to message #11664] Thu, 28 May 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Jonas (jonas_2@hotmail.com) writes:

> however, is there really a read_dicom-procedure in IDL? the help file didn't
> tell me about it...

Floating Points Systems in the UK has developed a DICOM 3
reader. You can learn more at this URL:

http://www.floating.co.uk/idl/dicom.html

Cheers,

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: accessing Siemens magnetom MR images [message #11863 is a reply to message #11664] Thu, 28 May 1998 00:00 Go to previous message
Jonas is currently offline  Jonas
Messages: 23
Registered: May 1998
Junior Member
thanx!
however, is there really a read_dicom-procedure in IDL? the help file didn't
tell me about it...

I got some more help from Lars in denmark (thanx Lars, hope you don't mind
me forwarding this):
> The first 6144 bytes in the image file is header information. If you
> know the image dimensions and type, you can use the following simple
> procedure:
>
> pro read_file, filename, xres, yres, ima
> openr,fileid, filename, /get_lun
> header=bytarr(6144)
> readu, fileid, header
> ima=fltarr(xres,yres) ;change type when appropriate
> readu, fileid, ima
> end
>
> This is, of couse, not very general and all "bonus" information is
> lost. Please forward any better answer to me.
>
> Cheers, Lars

Jonas
Re: accessing Siemens magnetom MR images [message #11874 is a reply to message #11664] Wed, 27 May 1998 00:00 Go to previous message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
Jonas -

If you would like a routine to do what Patrick Ford suggests below,
get READ_IMG.PRO from:

ftp://bial8.ucsd.edu/ : pub/software/idl/share/idl_share.tar.gz

There is also a READ_IMG.DOC that explains how to use it.

Basically, you can read any square 8-bit or 16-bit image with
dimensions 64, 128, 256 or 512; any existing header will be returned
as argument. This routine assumes that the image is larger than the
header!

You can also get SHOW_IMG.PRO/.DOC to allow you to view a series
of these images easily and in a variety of useful formats.
There is a README file that lists other routines; if you're working
with MR images then you will probably find a number of them useful.

Dave

Patrick V. Ford wrote:
>
> (A case of where the visually impaired is leading the blind.)
>
> A quick and dirty method is to create two arrays, one for the header and
> the other for the image(s). This assumes that the common format is to have
> a header block followed by the image data. Image sets may have multiple
> sub headers.
>
> header = bytarr(size_of_header)
> images = intarr(X,Y,Z); assuming a 3-D array of 2 byte pixels.
>
> open the file. ( I would have to look this up, but I could e-mail an
> example. )
> read the header and do nothing with it
> read the image.
>
> display the image.
> tvscl, image(*,*,0)
> etc.
> You may have to swap the byte order.
>
> To calculate the header size look at the number of bytes in the file and
> subtract the image size in bytes.
>
> Or if it is in DICOM format, I think there is a read_DICOM in IDL.
>
> Patrick Ford, MD
> Baylor College of Medicine
> pford@bcm.tmc.edu
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Weighted linear fitting?
Next Topic: Re: !p.multi and tv

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 23:09:32 PDT 2025

Total time taken to generate the page: 0.96602 seconds