<div dir="ltr"><div>However, I have reservations about putting this macro in vtkSetGet.h. If it goes in its own header, then the chances of it being confused with vtkDebugMacro are significantly reduced.</div><div><br></div><div> - David</div><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 12, 2014 at 7:24 AM, Andras Lasso <span dir="ltr"><<a href="mailto:lasso@queensu.ca" target="_blank">lasso@queensu.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I completely agree with David. This is an application support feature. There are several examples for such features in VTK, including QVTKWidget or vtkOutputWindow::DisplayText().
 These are not meant to be used in VTK library itself (other than examples and tests) but in VTK-based applications. They make the life of application developers easier, allow standardization, reduces code/feature duplication.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Adding the macro has negligible impact on VTK but would help application developers.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Andras<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><a name="14a3ee31cd8020f7__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></a></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> David Gobbi [mailto:<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>]
<br>
<b>Sent:</b> Friday, December 12, 2014 09:16<br>
<b>To:</b> <a href="mailto:vtk-developers@vtk.org" target="_blank">vtk-developers@vtk.org</a><br>
<b>Cc:</b> Jean-Christophe Fillion-Robin; Berk Geveci; Andras Lasso<br>
<b>Subject:</b> Re: [vtk-developers] Proposal to add "vtkInfoMacro"<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On the one hand, I can see that it is useful to have a message macro that doesn't require a debug build.  In my own apps, I often write app-specific classes that are derived from vtkObject and this is a macro that I might use from time
 to time.  Unlike Berk, I'm not all that worried that it might be abused.  For VTK, we have code review.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">On the other hand, I don't think we have a use case for this within VTK itself, it would be there purely to serve external VTK classes and apps.  And people who need this feature could simply put this macro (or a similar one) in their own
 header files.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Summary: this is a convenience feature, IMHO a mostly harmless one, and one that I might use.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> - David<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Fri, Dec 12, 2014 at 6:27 AM, Berk Geveci <<a href="mailto:berk.geveci@kitware.com" target="_blank">berk.geveci@kitware.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">I disagree with this change. There is no compelling VTK specific example for why this is needed. The examples are all from Slicer - which to me says that they can be implemented in Slicer.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Adding a logging functionality without clear guidelines on how to use it is dangerous. It can lead to folks using it for debugging in performance critical sections and since it is not compiled out in Release builds, it can lead to significant
 performance issues, specially in multi-threaded code. As it is, there are lot of minor issues like this that we will have to go and clean up (progress being one of them).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The main use case seems to be tracking interaction/workflow changes. My suggestion is to employ a method appropriate to that. For example, events and listeners.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Best,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">-berk<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<div>
<p class="MsoNormal">On Thu, Dec 11, 2014 at 12:06 PM, Jean-Christophe Fillion-Robin <<a href="mailto:jchris.fillionr@kitware.com" target="_blank">jchris.fillionr@kitware.com</a>> wrote:<u></u><u></u></p>
</div>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi Folks, <u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">While developing 3D Slicer, we created a macro named
<br>
<br>
                                          vtkInfoMacro<br>
<br>
similar to "vtkErrorMacro/vtkDebugMacro/vtkWarningMacro".<br>
<br>
<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">We would like to contribute it back to VTK core.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
<br>
<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">The associated topic is: <br>
<br>
                      <a href="http://review.source.kitware.com/#/c/18385/" target="_blank">
http://review.source.kitware.com/#/c/18385/</a><br>
<br>
<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">It would be great to get feedback before moving forward.<u></u><u></u></p>
</div>
<p class="MsoNormal">Thanks<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888">Jc<u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div></div></div>
</div>

</blockquote></div><br></div></div>