[Insight-users] Re: problem of reading in analyze file
Luis Ibanez
luis.ibanez at kitware.com
Sat Sep 4 12:38:56 EDT 2004
Hi Deliang,
Thanks for checking the type of your image.
SNAP uses images with pixel type = "unsigned short",
This type will not be appropriate for representing
your "float" image.
What type of error did you got from SNAP when you
attempted to read this image ?
You have two options
1) Convert your "float" image to "unsigned short"
using the example
Insight/Examples/IO/
ImageReadCastWrite.cxx
You will have to modify its code in order to
make sure that you are reading "float" and
writing "unsigned short". Note that this example
uses the RescaleIntensityImage filter, which
in addition to casting is scaling the intensity
values of your image. For details on this example,
Please read the ITK Software Guide
http://www.itk.org/ItkSoftwareGuide.pdf
Section 6.2.1, pdf-page 146.
OR
2) Modify the code in SNAP in order to accept float
images. This option will require a significant
amount of effort. SNAP is probalby the more
complex application in Insight Applicatinos.
I will strongly suggest you to attempt option (1) first.
Regards,
Luis
-----------------------
Deliang Ye wrote:
> Hi Luis,
>
> The pixel type is float in my Analyze file. I can not read the image by
> SNAP, even if I converted pixel type from float to unsign short.
> But I can read it in by ImageViewer correctly.
>
> Thanks for your help!
>
> --Deliang
>
> ----- Original Message -----
> From: "Luis Ibanez" <luis.ibanez at kitware.com>
> To: "Deliang Ye" <dye at jhu.edu>
> Cc: <Insight-users at itk.org>
> Sent: Friday, September 03, 2004 3:18 PM
> Subject: Re: problem of reading in analyze file
>
>
>
>>Hi Deliang,
>>
>>What pixel type is used in your Analyze files ?
>>
>>What specific applications did you tried from
>>InsightApplications ?
>>
>>It may be that the applications you used from
>>InsightApplications are expecting a 8bits/pixel
>>image while your image file may be 16bits/pixel.
>>
>>
>>Please let us know,
>>
>>
>> Thanks
>>
>>
>> Luis
>>
>>
>>------------------------
>>Deliang Ye wrote:
>>
>>
>>>----- Original Message -----
>>>*From:* Deliang Ye <mailto:dye at bme.jhu.edu>
>>>*To:* Insight-users at itk.org <mailto:Insight-users at itk.org>
>>>*Sent:* Friday, September 03, 2004 5:32 PM
>>>*Subject:* problem of reading in analyze file
>>>
>>>Good afternoon, everyone,
>>>
>>>I have an analyze file (img, hdr) that can be read in MRIcro, Mipav,
>
> Amira,
>
>>>etc. but when I try to read it into some applications in ITK, I got some
>>>gray spots not the right image. Does anyone meet the similiar situation?
>>>
>>>Thanks in advance,
>>>
>>>--DL
>>
>>
>>
>
>
More information about the Insight-users
mailing list