[Insight-users] Multiply an Image by Constant
Miller, James V (Research)
millerjv at crd.ge.com
Tue, 17 Feb 2004 11:02:49 -0500
Sergio,
You can use the ShiftScaleImageFilter to add a constant and scale the
intensity of every pixel in an image.
Jim
-----Original Message-----
From: Sergio Andres [mailto:sergio at unizar.es]
Sent: Tuesday, February 17, 2004 9:34 AM
To: insight-users at itk.org
Subject: [Insight-users] Multiply an Image by Constant
Hi all,
I think is a little stupid question, but
could anyone tell me how can multiply a given image by a constant??
I am using filters like AddImageFilter, or MultiplyImageFilter.. for
doing things like:
Image3 = Image1 + Image2
Image4 = Image1 * Image2
But I did not found a filter or function to do:
Image2 = Image1 * K
I thought about iterate over pixels and multiply each pixel by K.
But I don't know if there is a better solution....
Thanks for your possible answers..
Sergio.
_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users