[Insight-users] FDF Reader
Luis Ibanez
luis.ibanez at kitware.com
Mon, 08 Mar 2004 10:05:12 -0500
Hi Glen,
First,
The obvious question: Have you succeded
visualizing this FDF file with any other tool ?
In other words: Do you trust this file ?
Are you sure that the pixel is encoded in floats
in this file ? a simple verification is that
the file size should have a size of
256 x 256 x 4 = 250880 bytes
Second:
You may want to simplify your MetaHeader
to be just
NDims = 2
DimSize = 256 256
ElementType = MET_FLOAT
ElementSpacing = 1.0 1.0
ElementByteOrderMSB = False
ElementDataFile = brain.raw
That's the minimum number of entries needed
in the header.
Third:
Please post the section of code where you are
instantiating the MetaImage reader and printing
out its content. The order of operations may
be important.
Thanks
Luis
--------------------
Glenn Pierce wrote:
> Hi
>
> I am currently developing a FDFImageIO class to read Varian FDF files
> which are just raw data with a small header describing the dimensions
> and other attributes.
>
> I have got to the point where I can display a window of garbage.
> To check my code I also attempted to read my example FDF file as a
> MetaImage by creating the header such as
>
> NDims = 2
> DimSize = 256 256
> BinaryData = False
> ElementType = MET_FLOAT
> BinaryDataByteOrderMSB = True
> ElementByteOrderMSB = False
> ElementMin = 0.0
> ElementMax = 65000.0
> HeaderSize = -1
> ElementSize = 1 1
> ElementSpacing = 1.0 1.0
> ElementDataFile = brain.raw
>
> However, I get the same results as my FDF class.
>
> Although I specify ElementByteOrderMSB = True and
> BinaryDataByteOrderMSB = True
>
> after sending the instantiated reader to cout <<
> I see
>
> BinaryData = True
> BinaryDataByteOrderMSB = False
>
> Why does BinaryDataByteOrderMSB not get set to true ?
>
> Also I get the warning Min and Max are not valid ?
>
> Are there any other likely reasons for the image not displaying
> correctly ?
>
> I will post the code when I somewhere to upload to.
>
> Thanks
>
>
> ___________________________________________
>
> Glenn Pierce
>
> home phone: 0208 279 4624
> mobile phone: 07782 138354
> icq account: 104903326
> msn account: glennpierce2001 at hotmail.com
> yahoo account: glennpierce2001
> email: glennpierce at connectfree.co.uk
> ___________________________________________
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>