Re: Philips Gyroscan ACS-NT: Raw data format [message #16864 is a reply to message #16747] |
Mon, 23 August 1999 00:00   |
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
|
|
|