<div dir="ltr"><div><div><div><div><div><div>Hi Mathieu,<br></div>Thanks for pointing this out. I agree that it might not be the best solution, yet one could argue that you could simply create a constant image with 0 to do what you'd like from the current implementation. My main problem is that I just tried to do what you suggest and some tests then fail... which shows the obvious, it's not a backward compatible change.<br>I see two solutions:<br>- keep it as is and you use ConstantImageFilter + we remove useless add filters,<br></div></div>- a more complex but maybe more elegant solution: add a third template parameter for the operation that would allow the user to do what he'd like in a functor. That's what's done with filters that derive from <a href="http://www.itk.org/Doxygen/html/classitk_1_1UnaryFunctorImageFilter.html" target="_blank">itk::UnaryImageFilter</a>. The default would be itk::Add2 but we could find or implement another one that simply discards the pixel value.<br></div>What do you think?<br></div>Simon<br><br></div>PS: looking in the code, I just found that rtk::DrawConeImageFilter is not consistent with the others, it was always setting to 0 outside... that's been fixed!<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 28, 2015 at 4:47 PM, Mathieu Dupont <span dir="ltr"><<a href="mailto:mdupont@cppm.in2p3.fr" target="_blank">mdupont@cppm.in2p3.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello everyone,<br>
<br>
I have a question/suggestion about the set of rtkDraw*ImageFilter. This filter are written as additive filters: for example, in rtkDrawEllipsoidImageFilter.txx, we can find<br>
<br>
for(..)<br>
 itOut.Set( ellipsoid.density + itIn.Get() )<br>
<br>
instead of<br>
<br>
for(..)<br>
itOut.Set( ellipsoid.density )<br>
<br>
<br>
I think it can be more flexible the second option, because we can always associate Draw*ImageFilter and itkAddImageFilter to get an additive filter.<br>
<br>
Moreover, the  rtkDrawGeometricPhantomImageFilter class already uses itkAddImageFilter in order to have additive filters (which is redundant in current situation).<br>
<br>
What do you think ?<br>
<br>
<br>
<br>
<br>
<br>
Regards<br>
<br>
<br>
<br>
_______________________________________________<br>
Rtk-users mailing list<br>
<a href="mailto:Rtk-users@public.kitware.com" target="_blank">Rtk-users@public.kitware.com</a><br>
<a href="http://public.kitware.com/mailman/listinfo/rtk-users" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/rtk-users</a><br>
</blockquote></div><br></div>