[Insight-users] Re: Does Problem persists with Insight 1.2 ? ( Reading MetaImages) ( header file attached )

Luis Ibanez luis.ibanez@kitware.com
Fri, 14 Mar 2003 12:47:29 -0500


Hi Neha,

Thanks for sending the header file of you metaimage.

The problem is that the RAW file that you are providing is
using 16 bits (unsigned short) while your header is saying
that it contains 8bits (unsigned char).

By changing this in the header I can load your image.

Note that the image is encoded in 16bits but the actual
content is not filling the dynamic range, so the image
appears quite dark when you loaded in a viewer.


Here is the content of the correct header:

--------  begin of header ------------

NDims = 2
DimSize = 512 512
ElementSpacing = 0.7 0.585
Position = 0 0
ElementByteOrderMSB = True
ElementType = MET_USHORT
HeaderSize = -1
ElementDataFile = pp37.raw

---------- end of header ------------


Regards,


Luis


-----------------------------------


shilpa kinkar wrote:
>   Hi Luis,
> 
> I have attached the header file as well as data file which I need to 
> work on. Now, I have tested InsightApplication/RawImageReadWrite  and it 
> works fine with Data provided by Insight. ( 
> Examples\Data\ResampleImageFilterInput2x3b.RAW )
> 
> Since this application is working excellent with my image data ( 
> pp37.raw ), now I don't need to use MetaImageReader.
> 
> Now, what I want to do is, apply Guassian Filter on raw file. I could 
> successfully test the DiscreteFuassian Filter on PNG file , ( I used the 
> same program which i was using with Insight 1.0.0 but this time used 
> Insight 1.2.0 Binaries and it worked fine for PNG files ) BUT ...NOT on 
> raw file. I think, Filters do not create objects for RAW files ? Can you 
> tell me what I should  do to apply filter on RAW images ?
> 
> Thanks,
> 
> Neha
> 

> 
> NDims = 2
> DimSize = 512 512
> ElementSpacing = 0.7 0.585
> Position = 0 0
> ElementByteOrderMSB = True
> ElementType = MET_UCHAR
> HeaderSize = -1
> ElementDataFile = pp37.raw