[Insight-users] division and rescaling

Xavier Penya xavier.penya at epfl.ch
Tue Mar 20 10:06:18 EST 2007


Hi everybody,

I'm doing a program in which I divide two similar images (pixel type = double). The values of those images goes from 0 to 255.
When I divide them into an other image which is also 'double' pixel type, as they are similar the pixel values goes from 0 to 1,1.
I've tried to reescale it with the code below in orther to obtain values from 0 to 255 in the output image, but nothing happens (it remains from 0 to 1,1).
Does anybody know why is it not working?
Thanks!

        Xavier

//rescaling the image from (0,1) to (0,255)

rescaleFilter->SetInput( image );

rescaleFilter->SetOutputMinimum( 0 );

rescaleFilter->SetOutputMaximum( 255 );

rescaleFilter->Update();

(...)

writer->SetInput( rescaleFilter->GetOutput() );
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070320/5ff867ea/attachment.htm


More information about the Insight-users mailing list