<p dir="ltr">Luis,</p>
<p dir="ltr">Thanks for the explanation. I agree we probably wouldn't want to frontload the work of transitioning all usage now, but could we mark ::Zero as deprecated for future new use?</p>
<p dir="ltr">I would think that ::ZeroValue() will be inlined out to a constant / immediate value by compilers anyway.</p>
<p dir="ltr">Brian</p>
<div class="gmail_quote">On Feb 10, 2014 6:24 PM, "Luis Ibanez" <<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Just to answer Michka's question about why ITK has:<div><br></div><div>                                     ::Zero </div><div><br></div><div>and </div><div><br></div><div>                                ::ZeroValue()</div>

<div><br></div><div>This is due to historical reasons.</div><div><br></div><div><br></div><div>In the early versions of the toolkit, ITK only had "::Zero", </div><div>that was good enough for all basic types.</div>

<div><br></div><div>However, when ITK started providing better support for images </div><div>whose pixels had multiple components, it turned out that the</div><div>::Zero expression couldn't be used for initializing vectors types.</div>

<div><br></div><div>Therefore the "::ZeroValue()" was introduced, </div><div>to address those cases.</div><div><br></div><div>Retaining the "::ZeroValue()" as the recommended, generic</div><div>way to go, sounds reasonable, but I'm not sure that we could</div>

<div>get rid of the "::Zero" expression, due to the need for providing</div><div>backward compatibility support.</div><div><br></div><div><br></div><div>My humble opinion is that this might be too much work for little</div>

<div>benefit, specially given that the expression ::Zero most likely </div><div>can not be fully removed, (just marked as "not recommended")</div><div><br></div><div>The rule of thumb, could simply be to:</div>
<div>
<br></div><div>    Use ::ZeroValue() if the expression might need to </div><div>    support multi-components (such as RGB pixels)</div><div><br></div><div><br></div><div><br></div><div>    My 2 Cents,</div><div><br></div>

<div><br></div><div>       Luis</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 10, 2014 at 3:27 PM, Brian Helba <span dir="ltr"><<a href="mailto:brian.helba@kitware.com" target="_blank">brian.helba@kitware.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I agree that performance should trump other considerations, but for what it's worth, I agree with Michka's point. Having 2 different ways of getting the exact same value is confusing, unncessarily comples, and plain aesthetically ugly. If one of the two can't be depreciated (at least for internal use), then at the least I think NumericTrails should be better documented as to why there are both a ::Zero and a ::ZeroValue().<br>


</div><div class="gmail_extra"><div><div><br><br><div class="gmail_quote">On Mon, Feb 10, 2014 at 11:11 AM, Matt McCormick <span dir="ltr"><<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If there is a performance benefit, it could be reverted, but otherwise<br>
I think it is fine as-is.  In general, I think the function version<br>
has broader application.<br>
<br>
Thanks,<br>
Matt<br>
<div><div><br>
On Mon, Feb 10, 2014 at 9:18 AM, Michka Popoff <<a href="mailto:michkapopoff@gmail.com" target="_blank">michkapopoff@gmail.com</a>> wrote:<br>
> Speaking of sidestepping, in this case should we revert the changes I made<br>
> (from ::Zero to ::ZeroValue()) ?<br>
> People may wonder way there are two ways of accessing Zero ? Or should we<br>
> just leave it as is.<br>
><br>
> (We can discuss this in another topic if you wish, I don't want to clutter<br>
> this one with unrelated discussions)<br>
><br>
> Michka<br>
><br>
> Le 10 févr. 2014 à 15:02, Bradley Lowekamp a écrit :<br>
><br>
> Hello Michka,<br>
><br>
> Yes. I based this patch on "v4.5.0" tag, ( not including the SimpleITK patch<br>
> or your patch below ). This fixed all linking error message that were of the<br>
> form mentioned in JIRA ITK-3229. So I think this is the correct fix for it<br>
> not side stepping the issue.<br>
><br>
> This patch should be merged into release.<br>
><br>
> Brad<br>
><br>
> On Feb 7, 2014, at 4:12 PM, Michka Popoff <<a href="mailto:michkapopoff@gmail.com" target="_blank">michkapopoff@gmail.com</a>> wrote:<br>
><br>
> Is this why there were all these errors when wrapping for python on OS<br>
> 10.8.5 with clang 5.0.2 ?<br>
><br>
> (Which were fixed with this patch :<br>
> <a href="http://review.source.kitware.com/#/c/14033/" target="_blank">http://review.source.kitware.com/#/c/14033/</a> )<br>
><br>
> Le 7 févr. 2014 à 22:04, Bradley Lowekamp a écrit :<br>
><br>
> Hello Folks,<br>
><br>
> I updated mini7's continuous to be shared libraries. So that's going to be<br>
> all red tomorrow.<br>
><br>
> But I have the patch for it here:<br>
> <a href="http://review.source.kitware.com/#/c/14319/" target="_blank">http://review.source.kitware.com/#/c/14319/</a><br>
><br>
> Have a good weekend folks!<br>
> Brad<br>
><br>
> On Feb 7, 2014, at 2:02 PM, Bradley Lowekamp <<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>> wrote:<br>
><br>
> Hello,<br>
><br>
> As I recently turn on shared libraries for on my Mavericks build, I am<br>
> getting many more linking  error on the release branch now:<br>
> <a href="http://open.cdash.org/buildSummary.php?buildid=3211313" target="_blank">http://open.cdash.org/buildSummary.php?buildid=3211313</a><br>
> I'll need to look into the further.<br>
><br>
> Brad<br>
><br>
> On Feb 7, 2014, at 8:35 AM, Brian Helba <<a href="mailto:brian.helba@kitware.com" target="_blank">brian.helba@kitware.com</a>> wrote:<br>
><br>
> Please note, one of the dashboard clients testing the release branch has 16<br>
> new failing tests, as a result of the TIFF patch that was merged yesterday.<br>
><br>
> On Feb 7, 2014 8:16 AM, "Bradley Lowekamp" <<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>> wrote:<br>
>><br>
>> Matt,<br>
>><br>
>> Also this patch fixes an infinite loop with libc++:<br>
>><br>
>> commit b5dd8d4b9cfa8b798ac182a31dcbdaca290958e5<br>
>> Author: Bradley Lowekamp <<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>><br>
>> Date:   Sat Jan 18 23:32:15 2014 -0500<br>
>><br>
>>     COMP: fix failing voronoi segmentation tests<br>
>><br>
>>     Internal comp method used for std::sort didn't induce a strict weak<br>
>>     ordering ( <= vs < ) as required, since it returned true on<br>
>>     equal. This cause failures likely due to difference algorithms in<br>
>>     libc++.<br>
>><br>
>>     Change-Id: Ic4c8f61d53bce6858b4edcd3a93c605271b0c65b<br>
>><br>
>> Brad<br>
>><br>
>> On Feb 7, 2014, at 8:09 AM, Bradley Lowekamp <<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>><br>
>> wrote:<br>
>><br>
>> > Matt,<br>
>> ><br>
>> > I think we should consider including the following patch:<br>
>> ><br>
>> > commit b5e114f94a7a64ff0c426067335cf3f42976eb29<br>
>> > Author: Hans Johnson <<a href="mailto:hans-johnson@uiowa.edu" target="_blank">hans-johnson@uiowa.edu</a>><br>
>> > Date:   Thu Sep 26 23:51:17 2013 -0500<br>
>> ><br>
>> >    PERF: Reviewing code for facilitating compiler optimizations<br>
>> ><br>
>> >    The itkLinearInterpolateImageFunction.h is such a core<br>
>> >    function, it deserves special attention for gaining<br>
>> >    any amount of speed improvement can help<br>
>> >    improve the speed of many programs.<br>
>> ><br>
>> >    Change-Id: Ibba6caa0468e850ab6b487565943d07af9f82f8c<br>
>> ><br>
>> > This will provide a large benefit to many users.<br>
>> ><br>
>> > Additionally the SCIFIO issue with linked libraries is a good candidate.<br>
>> ><br>
>> > Brad<br>
>> ><br>
>> > On Feb 6, 2014, at 12:44 AM, Matt McCormick <<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>><br>
>> > wrote:<br>
>> ><br>
>> >> Hi,<br>
>> >><br>
>> >> ITK 4.5 is progressing nicely, and a number of important bug fixes<br>
>> >> have been applied.  Thanks to everyone that has contributed.  We want<br>
>> >> to make sure that all low-risk patches that fix critical issues are<br>
>> >> included in 4.5.1.  The current list (to be pushed following testing)<br>
>> >> is<br>
>> >><br>
>> >> Bill Lorensen (1):<br>
>> >>     BUG: Tiff compression was broken and untested<br>
>> >><br>
>> >> Bradley Lowekamp (5):<br>
>> >>     BUG: Correctly re-throw exception to restore AbortEvent,<br>
>> >> ProcessAborted<br>
>> >>     BUG: Adding export specification to Exception objects<br>
>> >>     BUG: disable ipa-cp-clone in GDCM<br>
>> >>     COMP: fix unused variable warning in abort test<br>
>> >>     BUG: Do not throw exception in Probes with mis-matched Stop<br>
>> >><br>
>> >> Brian Helba (2):<br>
>> >>     BUG: Fix uninitialized variable in<br>
>> >> GradientRecursiveGaussianImageFilter<br>
>> >>     BUG: Make all specializations NumericTrails::SetLength re-zero<br>
>> >> contents<br>
>> >><br>
>> >> Hans Johnson (2):<br>
>> >>     COMP: SimpleITK linkage failure<br>
>> >>     BUG: Missing Modified() call<br>
>> >><br>
>> >> Luke Bloy (2):<br>
>> >>     BUG: Fixes itkBoxSpatialObject part of issue ITK-3153<br>
>> >>     BUG: Fixes itkImageMaskSpatialObject part of issue ITK-3153<br>
>> >><br>
>> >> Matthew McCormick (2):<br>
>> >>     COMP: Update libminc to latest version.<br>
>> >>     BUG: Remove unused itkAffineTransformXX.txt content links.<br>
>> >><br>
>> >> Michka Popoff (1):<br>
>> >>     BUG: Fix for the WrapITK.pth destination path<br>
>> >><br>
>> >> Sean McBride (1):<br>
>> >>     BUG: initialize m_SmallBlock ivar in ctor; fixes garbage read<br>
>> >><br>
>> >> Anything missing?<br>
>> >><br>
>> >> Thanks,<br>
>> >> Matt<br>
>> >> _______________________________________________<br>
>> >> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>> >><br>
>> >> Visit other Kitware open-source projects at<br>
>> >> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>> >><br>
>> >> Kitware offers ITK Training Courses, for more information visit:<br>
>> >> <a href="http://kitware.com/products/protraining.php" target="_blank">http://kitware.com/products/protraining.php</a><br>
>> >><br>
>> >> Please keep messages on-topic and check the ITK FAQ at:<br>
>> >> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
>> >><br>
>> >> Follow this link to subscribe/unsubscribe:<br>
>> >> <a href="http://www.itk.org/mailman/listinfo/insight-developers" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
>> ><br>
>> > _______________________________________________<br>
>> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>> ><br>
>> > Visit other Kitware open-source projects at<br>
>> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>> ><br>
>> > Kitware offers ITK Training Courses, for more information visit:<br>
>> > <a href="http://kitware.com/products/protraining.php" target="_blank">http://kitware.com/products/protraining.php</a><br>
>> ><br>
>> > Please keep messages on-topic and check the ITK FAQ at:<br>
>> > <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
>> ><br>
>> > Follow this link to subscribe/unsubscribe:<br>
>> > <a href="http://www.itk.org/mailman/listinfo/insight-developers" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
>><br>
>> _______________________________________________<br>
>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>><br>
>> Visit other Kitware open-source projects at<br>
>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>><br>
>> Kitware offers ITK Training Courses, for more information visit:<br>
>> <a href="http://kitware.com/products/protraining.php" target="_blank">http://kitware.com/products/protraining.php</a><br>
>><br>
>> Please keep messages on-topic and check the ITK FAQ at:<br>
>> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://www.itk.org/mailman/listinfo/insight-developers" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
>> _______________________________________________<br>
>> Community mailing list<br>
>> <a href="mailto:Community@itk.org" target="_blank">Community@itk.org</a><br>
>> <a href="http://public.kitware.com/cgi-bin/mailman/listinfo/community" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/community</a><br>
><br>
><br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://kitware.com/products/protraining.php" target="_blank">http://kitware.com/products/protraining.php</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-developers" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
><br>
><br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://kitware.com/products/protraining.php" target="_blank">http://kitware.com/products/protraining.php</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-developers" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
> _______________________________________________<br>
> Community mailing list<br>
> <a href="mailto:Community@itk.org" target="_blank">Community@itk.org</a><br>
> <a href="http://public.kitware.com/cgi-bin/mailman/listinfo/community" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/community</a><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Community mailing list<br>
> <a href="mailto:Community@itk.org" target="_blank">Community@itk.org</a><br>
> <a href="http://public.kitware.com/cgi-bin/mailman/listinfo/community" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/community</a><br>
><br>
_______________________________________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org" target="_blank">Community@itk.org</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/community" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/community</a><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div><span><font color="#888888">-- <br>Brian Helba<br>Medical Imaging<br>Kitware, Inc.<br>
</font></span></div>
<br>_______________________________________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org" target="_blank">Community@itk.org</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/community" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/community</a><br>
<br></blockquote></div><br></div>
</blockquote></div>