[Insight-users] Re: problem of reading in analyze file
Luis Ibanez
luis.ibanez at kitware.com
Sun Sep 5 11:05:51 EDT 2004
Hi Deliang,
Is 1024 graylevels insuficient for describing
the object that you want to segment ?
If so, what you can do is to apply intensity
windowing in your original image, and instead
of squeezing the original dynamic range into
1024 levels, you select the range of intensities
from your original image that correspond to the
graylevels of the object you want to segment.
For this purpose you can use the
IntensityWindowingImageFilter
http://www.itk.org/Insight/Doxygen/html/classitk_1_1IntensityWindowingImageFilter.html
Regards,
Luis
-------------------
Deliang Ye wrote:
> Hi Luis,
>
> Thanks for your email, I converted the pixel type to unsighed short, and
> open it by SNAP, but the image looks not as good as in other tools (e.g.
> MRIcro, Mipav, etc.). just there are lots of gray spots there.
>
> When I changed the range of intensity of the image into 0-1023, everything
> is fine. So it might have some issues with range of intensity. Do you have
> any good solution?
>
> Thanks,
>
> DL
>
> ----- Original Message -----
> From: "Luis Ibanez" <luis.ibanez at kitware.com>
> To: "Deliang Ye" <dye at jhu.edu>
> Cc: <Insight-users at itk.org>
> Sent: Saturday, September 04, 2004 9:38 AM
> Subject: Re: problem of reading in analyze file
>
>
>
>>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