[Insight-users] Problem with the RawReaderImageViewer
Luis Ibanez
luis . ibanez at kitware . com
Fri, 12 Jul 2002 08:33:19 -0400
Hi Alexandra,
The problem seems to be related with the image pixel type.
The example uses by default "unsigned char", and your
images seem to be "unsigned short". The ImageIO readers
perform castings but just naive C-Style casting without
any dynamic range adjustment.
The simple solution is to change one line in the code
of the example in order to manage "unsigned short".
Please do the following:
1) go to /Insight/Examples/RawImageReaderViewer
2) edit the file itkRawImageReaderViewer.h
3) in line #36 change the line:
typedef unsigned char PixelType;
for
typedef unsigned short PixelType;
and recompile the example.
That should get rid of the problem.
Please let us know if that works for you,
Thanks,
Luis
====================================================
Alexandra La Cruz wrote:
> Hi,
>
> I did the modification in line 145 about the dimension
> ..
> m_RawReader->SetFileDimensionality( 3 );
>
> but I can read the data but in the disply I can not see any coherent images
> and the aplication show an violation error
>
> someone know about this problem or what it is my error. I dowloaded an
> example image in
> The BrainWeb project home page :
>
> http://www.bic.mni.mcgill.ca/brainweb
>
> image data
> BrainWeb download: PD ICBM normal 1mm pn3 rf20
> Modality=PD, Protocol=ICBM, Phantom_name=normal, Slice_thickness=1mm,
> Noise=3%, INU=20%
> MINC volume info:
> image: signed__ short 0 to 4095
> image dimensions: zspace yspace xspace
> dimension name length step start
> -------------- ------ ---- -----
> zspace 181 1 -72
> yspace 217 1 -126
> xspace 181 1 -90
> Original MINC file size: 10.5 Mb
> NDims = 3
> DimSize = 181 217 180
> ElementType = MET_UCHAR
> ElementSpacing = 1.0 1.0 1.0
> ElementByteOrderMSB = False
> ElementDataFile = brainweb1e1a10f20Rot10Tx15.raw
>
>
> Greetings
> ALC
>
> --------------------------------------------------------------
> Alexandra La Cruz
> Institute of Computer Graphics and Algorithms
> Vienna University of Technology
> mailto:alacruz@cg.tuwien.ac.at
> http://www.cg.tuwien.ac.at/staff/AlexandraLaCruz.html
> Tel.: +43 1 58801-18670 Fax: +43 1 58801-18698
> --------------------------------------------------------------
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>
>