Dear Insight users,<br><br>I want to add 5 images weighted by its respective coefficient:<br><br><i>out = a * in1 + b * in2 + c * in3 + d * in4 + e * in5<br></i><br>Due to there is no one ITK function, there are multiple options for implementations of the filter:<br>
<br>-Using the class <a class="el" href="http://www.itk.org/Doxygen/html/classitk_1_1MultiplyByConstantImageFilter.html">itk::MultiplyByConstantImageFilter< TInputImage, TConstant, TOutputImage ></a> for each image <font size="2">and then use</font><i><font size="2"> </font></i> the class <a class="el" href="http://www.itk.org/Doxygen/html/classitk_1_1TernaryAddImageFilter.html">itk::TernaryAddImageFilter< TInputImage1, TInputImage2, TInputImage3, TOutputImage ></a> twice to sum the 5 images.<br>
<br>-My second option is implementing an iterator which open the images, add the weighted values.<br><br>Which option do you recomend? There is any other fast option for doing that?<br><br>Thanks,<br><br>Fran Serrano<br>