[Insight-users] Re: Resizing an Image

Luis Ibanez luis.ibanez at kitware.com
Mon May 1 16:11:49 EDT 2006


Hi Balaji,

What pixel type did you used for instantiating the ImageFileReader
in your ITK pipeline ?

It is likely that you are using "unsigned char" for that pixel type,
and therefore when you read the input image from a 16 bits/pixel file 
the pixel values get truncated to the highest byte and result in a noisy
field.



It will be *much easier* to help you if you post the source code
of your test to the mailing list....   :-/


Please do so,


   Thanks


      Luis



========================
Balaji Gandhi wrote:
> Hi Luis,
> 
> I would like to add to my previous mail. The same noise is added when I 
> perform Registration on the (16 bit/Gray scale) images. If I convert the 
> images to (8 bit/Indexed Color) images everything (Registration and 
> Sampling) is fine.
> 
> Please let me know if there is a workaround for this or if my technique 
> is wrong.
> 
> Thanks,
> Balaji
> 
> On 5/1/06, *Balaji Gandhi* < bgandhi at mail.ucf.edu 
> <mailto:bgandhi at mail.ucf.edu>> wrote:
> 
>     Hi Luis,
> 
>     Thanks for clarifying. I guess I had the parameters wrong so it gave
>     me a blank image as output. Ok I am trying to resample this image:-
> 
>     http://imgem.ucf.edu/~imgem/ITK_Test/12s.tif
>     <http://imgem.ucf.edu/%7Eimgem/ITK_Test/12s.tif>
> 
>     But I am getting some noise in the output. Am I doing something wrong?
> 
>     http://imgem.ucf.edu/~imgem/ITK_Test/ResampleImageFilterOutput1.tif
>     <http://imgem.ucf.edu/%7Eimgem/ITK_Test/ResampleImageFilterOutput1.tif>
> 
>     Thanks,
>     Balaji
> 
>     On 4/30/06, *Luis Ibanez * <luis.ibanez at kitware.com
>     <mailto:luis.ibanez at kitware.com>> wrote:
> 
> 
>         Hi Balaji,
> 
>         Your TIF image should be read fine with ITK.
> 
>         Please give it a try to the resampling as
>         described in our previous email and let
>         us know if you find any problems.
> 
> 
>             Thanks
> 
> 
>                Luis
> 
> 
> -- 
> ===============================
> Balaji Gandhi
> Research Associate
> Biomolecular Science Center
> University of Central Florida
> Phone: 407-823-3387
> Fax: 407-823-0956
> Project: imgem.ucf.edu <http://imgem.ucf.edu>
> ===============================




More information about the Insight-users mailing list