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

Home » Public Forums » archive » Philips Gyroscan ACS-NT: Raw data format
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
Philips Gyroscan ACS-NT: Raw data format [message #16747] Fri, 20 August 1999 00:00 Go to next message
Jonas is currently offline  Jonas
Messages: 23
Registered: May 1998
Junior Member
I have some MR image raw data exported from a Philips Gyroscan ACS-NT MRI
scanner.
I have never worked with images from Philips MR scanners before, therefore
having trouble opening the images. Has anyone out there any experience of
the file format used?
The images are acquired using a 3-D sequence and the whole image volume (50
images) are stored in one single file, 42,025,472 bytes large.
I do not really understand the size of the file, since the images have a
resolution of 256*256, and I suppose that each pixel is a complex number
(4+4 byte), i.e. the file size should be 256*256*8*50+header =
26,214,400+header byte. A 16 MB large header???
I would appreciate any info on header size, position of image data within
file, how the image data is stored, big/little-endian etc....

Sincerely
Jonas

--
_________________________________________________
Jonas Svensson, MSc, http://www.sparta.lu.se/~jonas
Department of Radiation Physics, Lund University
Malm� University Hospital
SE-205 02 Malm�
tel: +46 40 332501, fax: +46 40 963185
Re: Philips Gyroscan ACS-NT: Raw data format [message #16861 is a reply to message #16747] Mon, 23 August 1999 00:00 Go to previous messageGo to next message
Struan Gray is currently offline  Struan Gray
Messages: 178
Registered: December 1995
Senior Member
Jonas, jonas_2@hotmail.com writes:

> As I see it there is three possibilites:
> interleaved for each pixel
> interleaved for each image
> interleaved for the whole volume
> Phew, I have some serious trial and error in front of me...

There's row interleaving too. :-)

One trick that will cut down on trial and error is to treat the
datafile as if it were a time series of type BYTE. If you do an FFT
and display the power spectrum the interleaving often shows up as
peaks at the relevant byte spacing, and for most image data the number
of bytes per pixel is also pretty obvious.

The next step is to vary the offset into the file while plotting
the 'image' on screen until something recognisable appears. This can
also be automated by looking for correlations in the second and third
dimension, but the process can be fooled if there is a lot of
periodicity in the data so unless you have a lot of files with
different structures it is usually just as fast to go with trial and
error.


Struan
Re: Philips Gyroscan ACS-NT: Raw data format [message #16864 is a reply to message #16747] Mon, 23 August 1999 00:00 Go to previous messageGo to next message
jajones is currently offline  jajones
Messages: 2
Registered: August 1999
Junior Member
In article <7pk1p3$bqi$1@news.lth.se>, Jonas <jonas_2@hotmail.com> wrote:
> Thank you for your interesting comments. See furhter comments below
>
> Jonathan Jones <jajones@ermine.ox.ac.uk> skrev i
> diskussionsgruppsmeddelandet:7pjmtp$19o$1@news.ox.ac.uk...
>> In article <7pj827$55u$1@news.lth.se>, Jonas <jonas_2@hotmail.com> wrote:
>>> The images are acquired using a 3-D sequence and the whole image volume
> (50
>>> images) are stored in one single file, 42,025,472 bytes large.
>>> I do not really understand the size of the file, since the images have a
>>> resolution of 256*256, and I suppose that each pixel is a complex number
>>> (4+4 byte), i.e. the file size should be 256*256*8*50+header =
>>> 26,214,400+header byte. A 16 MB large header???
>>> I would appreciate any info on header size, position of image data within
>>> file, how the image data is stored, big/little-endian etc....
>>
>> Some things to bear in mind:
>>
>> 1) The data is probably stored as 64 256*256 images (not 50), which at
>> 8 bytes per point gives 33554432 bytes = 32 Mb of data, leaving a mere
>> 8Mb or so of headers.
>
> why 64 images? in order to simplify fft-reconstruction?

Well if it really is a 3D sequence (i.e., an FT is required in *all*
dimensions) rather than some sort of multi slice 2D, I'm a bit surprised
that you have only 50 pts in the 3rd dimension; most NMR machines in my
experience (but I haven't done any imaging for a few years) insist on
powers of two in all FT dimensions. Even when not doing an FT many
packages still round everything up to the next power of two.

>> 3) The actual data is probably floating point numbers in the standard
>> format; headers are often a mixture of integers and text. You can often
>> locate the data regions by just reading the raw file as floats and looking
>> for regions that "make sense". Decoding the header, rather than just
>> locating it, is much trickier!
>>
>
> I'll try that

It helps if you have a package which lets you read in arbitrary chunks of
data, and display it, either as a 1D line or as some sort of 2D intensity
plot. Matlab would be quite good if you can get to it, or you can write
your own if you speak C or something like it. You have to make sure it
does something sensible with NaNs though if you read as floats.

>> 4) The complex data could be stored as interleaved real and imag, or all
>> real followed by all imag.
>>
>
> As I see it there is three possibilites:
> interleaved for each pixel
> interleaved for each image
> interleaved for the whole volume

Four in fact. There's interleaved for each row as well.

> Phew, I have some serious trial and error in front of me...
> In fact the only time I have obtained anything similar to MR image raw data
> is when I read the file as 16-bit integer. Think I'll have to keep trying
> that way

Well that would make sense if it was storing just image intensity data,
but in that case you wouldn't expect complex numbers, so you would have only
256*256*64*2=16Mb of data.

> Earlier I have only been working with images produced on Siemens scanners.
> The raw data from those scanners are saved in separate files for each image
> and with a 6144 byte header followed by complex data pixel interleaved.
>
>> 5) If you have a 2D image to hand it may be easier to start work on that.
>
> Well, I have the corresponding images as well, but so far I have not been
> able to produce any images looking anything like those when i reconstruct
> them...

One really bizarre possibility, which is popular for chemistry 2D spectra
(though I haven't seen it on images before) is that they might have used
a submatrix format. For a 2D each image is divided up into rectangular
areas; the whole of the first area is stored, followed by the whole of the
next area, and so on. Messy.

If I have some spare time I might be able to have a look with some of the
tools at my end. Email me privately if you want to arrange this.

Jonathan
Re: Philips Gyroscan ACS-NT: Raw data format [message #17110 is a reply to message #16747] Fri, 10 September 1999 00:00 Go to previous messageGo to next message
Bill Wahlberg is currently offline  Bill Wahlberg
Messages: 2
Registered: September 1999
Junior Member
In article <7pj827$55u$1@news.lth.se>,
"Jonas" <jonas_2@hotmail.com> wrote:
> I have some MR image raw data exported from a Philips Gyroscan ACS-NT
MRI
> scanner.
> I have never worked with images from Philips MR scanners before,
therefore
> having trouble opening the images. Has anyone out there any experience
of
> the file format used?
> The images are acquired using a 3-D sequence and the whole image
volume (50
> images) are stored in one single file, 42,025,472 bytes large.
> I do not really understand the size of the file, since the images have
a
> resolution of 256*256, and I suppose that each pixel is a complex
number
> (4+4 byte), i.e. the file size should be 256*256*8*50+header =
> 26,214,400+header byte. A 16 MB large header???
> I would appreciate any info on header size, position of image data
within
> file, how the image data is stored, big/little-endian etc....
>
> Sincerely
> Jonas

Hi Jonas,

Is it possible that the pixels are double floats (8 bytes each)? That
works out to 33,554,432 bytes. I guess it is also possible that there
are multiple images for each slice in varying formats.

I have software that can be configured to read any format (sometimes it
takes a little work). If you can send me a chunk from the front of the
file (a few MB), I could take a look at it and give you my 2 cents
worth.

Good Luck,

Bill


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Re: Philips Gyroscan ACS-NT: Raw data format [message #17176 is a reply to message #16747] Tue, 14 September 1999 00:00 Go to previous message
Bill Wahlberg is currently offline  Bill Wahlberg
Messages: 2
Registered: September 1999
Junior Member
In article <7pj827$55u$1@news.lth.se>,
"Jonas" <jonas_2@hotmail.com> wrote:
> I have some MR image raw data exported from a Philips Gyroscan ACS-NT
MRI
> scanner.
> I have never worked with images from Philips MR scanners before,
therefore
> having trouble opening the images. Has anyone out there any experience
of
> the file format used?
> The images are acquired using a 3-D sequence and the whole image
volume (50
> images) are stored in one single file, 42,025,472 bytes large.
> I do not really understand the size of the file, since the images have
a
> resolution of 256*256, and I suppose that each pixel is a complex
number
> (4+4 byte), i.e. the file size should be 256*256*8*50+header =
> 26,214,400+header byte. A 16 MB large header???
> I would appreciate any info on header size, position of image data
within
> file, how the image data is stored, big/little-endian etc....
>

Hi Jonas,

I looked at the chunk of the file that you sent. As you had mentioned it
is raw (k-space) data, and not reconstructed image data.

This is my guess:

The format is 16 bit little endian.
The data starts at an offset of 1536.
There is 1 data set of 640x64 (81,920 bytes)
This is followed by 256 640x128 (163,840 bytes) data sets for a total of
41,943,040 bytes.

So 41,943,040 + 81,920 + 1,536 = 42,026,496.

This works out to be 1024 bytes more than your reported file size. If
the offset is 512 then the math works out, but the data sets don't align
properly (when displayed graphically).

I will follow up by sending you some plots and pictures of what I see.

Bill









Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: HowTo convert a GUI builder app. to a ActiveX controled app?
Next Topic: Re: Expose events

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

Current Time: Wed Oct 08 13:49:44 PDT 2025

Total time taken to generate the page: 0.00583 seconds