[Insight-users] Weighted adding of images

Fran Serrano sercha at gmail.com
Tue Nov 18 17:20:52 EST 2008


Dear Insight users,

I want to add 5 images weighted by its respective coefficient:

*out = a * in1 + b * in2 + c * in3 + d * in4 + e * in5
*
Due to there is no one ITK function, there are multiple options for
implementations of the filter:

-Using the class  itk::MultiplyByConstantImageFilter< TInputImage,
TConstant, TOutputImage
><http://www.itk.org/Doxygen/html/classitk_1_1MultiplyByConstantImageFilter.html>for
each image and
then use* * the class  itk::TernaryAddImageFilter< TInputImage1,
TInputImage2, TInputImage3, TOutputImage
><http://www.itk.org/Doxygen/html/classitk_1_1TernaryAddImageFilter.html>twice
to sum the 5 images.

-My second option is implementing an iterator which open the images, add the
weighted values.

Which option do you recomend? There is any other fast option for doing that?

Thanks,

Fran Serrano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081118/8af8180a/attachment.htm>


More information about the Insight-users mailing list