<div dir="ltr">Matt,<div><br></div><div>Thanks for preparing the patch.</div><div><br></div><div>The removal of the number argument looks right to me.</div><div>I just submitted some comments in the review.</div><div><br></div>
<div>Brad also posted two reviews.</div><div><br></div><div>Brad: would you like to take a cut at fixing the macros ?</div><div><br></div><div> Thanks</div><div><br></div><div> Luis</div><div><br></div><div><br></div><div>
<br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 9, 2014 at 8:20 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">Hi Simplicity and Luis,<br>
<br>
Please review this patch, which fixed the Doxygen macro definition:<br>
<br>
<a href="http://review.source.kitware.com/#/c/15703/" target="_blank">http://review.source.kitware.com/#/c/15703/</a><br>
<br>
Thanks,<br>
Matt<br>
<div class="HOEnZb"><div class="h5"><br>
On Sat, May 10, 2014 at 8:52 AM, Luis Ibanez <<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>> wrote:<br>
> There are some cases in which methods are implemented via Macros.<br>
><br>
> This is done with the purpose of improving consistency and simplicity<br>
> in the code, but come at the price of sometimes not seeing directly<br>
> where the code is implemented.<br>
><br>
> The typical examples are the<br>
><br>
> itkSetMacro( variablename, type )<br>
> itkGetMacro( variablename, type )<br>
><br>
> That are used in most ITK classes to implement Get / Set methods.<br>
><br>
><br>
><br>
> For the particular case of the SetFileName method,<br>
> it helps to look at the Macro<br>
><br>
> itkSetGetDecoratedInputMacro(FileName, std::string);<br>
><br>
><br>
> in the documentation at:<br>
><br>
> <a href="http://www.itk.org/Insight/Doxygen/html/classitk_1_1ImageFileReader.html#a3d0bb0e7bd412a76f92f71acdb42bff2" target="_blank">http://www.itk.org/Insight/Doxygen/html/classitk_1_1ImageFileReader.html#a3d0bb0e7bd412a76f92f71acdb42bff2</a><br>
><br>
><br>
> You will find it used in line 130 of the itkImageFileReader.h file:<br>
><br>
> <a href="https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/IO/ImageBase/include/itkImageFileReader.h#L130" target="_blank">https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/IO/ImageBase/include/itkImageFileReader.h#L130</a><br>
><br>
><br>
> You will find this macro defined in turn in:<br>
><br>
> ITK/Modules/Core/Common/include/itkMacro.h<br>
><br>
> <a href="https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/Common/include/itkMacro.h#L808" target="_blank">https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/Common/include/itkMacro.h#L808</a><br>
><br>
> 808 #define itkSetGetDecoratedInputMacro(name, type) \<br>
> 809 itkSetDecoratedInputMacro(name, type) \<br>
> 810 itkGetDecoratedInputMacro(name, type)<br>
><br>
><br>
> Then, if you follow the itkSetDecoratedInputMacro() in line 758<br>
><br>
> <a href="https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/Common/include/itkMacro.h#L758" target="_blank">https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/Common/include/itkMacro.h#L758</a><br>
><br>
> where the macro defines (in this case) the functions:<br>
><br>
> SetFileNameInput()<br>
><br>
> SetFileName()<br>
><br>
><br>
> by the lines<br>
><br>
><br>
> 759: virtual void Set##name##Input( ...<br>
><br>
> 768: virtual void Set##name( ....<br>
><br>
><br>
> where "name" is the argument of the macro,<br>
> and in this particular case it corresponds to "FileName".<br>
><br>
><br>
><br>
> In principle, we can adjust the configuration of the Doxygen<br>
> documentation to expand this macros in the HTML pages,<br>
> reflecting better what the compiler gets to see, after the<br>
> macros have been used to generate code.<br>
><br>
><br>
> This is done in the file:<br>
><br>
> ITK/Utilities/Doxygen/<a href="http://doxygen.config.in" target="_blank">doxygen.config.in</a><br>
><br>
> <a href="https://github.com/InsightSoftwareConsortium/ITK/blob/master/Utilities/Doxygen/doxygen.config.in#L1961" target="_blank">https://github.com/InsightSoftwareConsortium/ITK/blob/master/Utilities/Doxygen/doxygen.config.in#L1961</a><br>
><br>
><br>
><br>
><br>
> ---------------------------------------<br>
><br>
><br>
> Hope this helps,<br>
><br>
><br>
> Thanks<br>
><br>
> Luis<br>
><br>
><br>
><br>
><br>
><br>
> On Sat, May 10, 2014 at 6:15 AM, Michka Popoff <<a href="mailto:michkapopoff@gmail.com">michkapopoff@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hi<br>
>><br>
>> I merged your two questions in one topic, so I can answer the two at once.<br>
>><br>
>> In the class ImageFileReader, there is no SetFileName method. But the<br>
>> documentation states:<br>
>> This source object is a general filter to read data from a variety of file<br>
>> formats. It works with a ImageIOBase subclass to actually do the reading of<br>
>> the data.<br>
>><br>
>> So if you go the ImageIOBase [1] class definition, you will find the<br>
>> SetFileName method. This can be confusing at the beginning, but when you<br>
>> don’t find a method somewhere (and this is often the case for most of<br>
>> projects you’ll find around, not only ITK), think to look at the parent<br>
>> class and the child/subclass. Often the methods are defined somewhere else.<br>
>><br>
>><br>
>> For the Update() call, this is related to the ITK pipeline. Some detailed<br>
>> description can be found here [2]. There is also one article here [3] that<br>
>> is more readable, or there is a section (13.3) in the ITK software guide<br>
>> here [4].<br>
>><br>
>> Finally, we have a nice set of examples here [5] which show you how to use<br>
>> the ITK pipeline. This should help you getting started.<br>
>><br>
>><br>
>> [1] <a href="http://www.itk.org/Insight/Doxygen/html/classitk_1_1ImageIOBase.html" target="_blank">http://www.itk.org/Insight/Doxygen/html/classitk_1_1ImageIOBase.html</a><br>
>> [2] <a href="http://www.itk.org/Doxygen/html/classitk_1_1DataObject.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1DataObject.html</a><br>
>> [3] <a href="http://www.kitware.com/media/html/IOStreamingInITK.html" target="_blank">http://www.kitware.com/media/html/IOStreamingInITK.html</a><br>
>> [4] <a href="http://www.itk.org/ItkSoftwareGuide.pdf" target="_blank">http://www.itk.org/ItkSoftwareGuide.pdf</a><br>
>> [5] <a href="http://itk.org/ITKExamples/" target="_blank">http://itk.org/ITKExamples/</a><br>
>><br>
>><br>
>> On 9 mai 2014, at 22:45, Simplicity Peace <<a href="mailto:simplicitypeacescm@gmail.com">simplicitypeacescm@gmail.com</a>><br>
>> wrote:<br>
>><br>
>> Hello,<br>
>><br>
>> For instance, I tried to look for the functions of the class<br>
>> "ImageFileReader". In the ITK software guide, a function called<br>
>> "SetFileName" was used. I thought of looking for the functions that come<br>
>> under that class here, but couldn't find that "SetFileName" function. Am I<br>
>> searching in the wrong place?<br>
>><br>
>> Thanks.<br>
>> _______________________________________________<br>
>> Community mailing list<br>
>> <a href="mailto:Community@itk.org">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>
>> Hello,<br>
>><br>
>> I'm new to `ITK`. I just want to ask, what does `Update()` mean? For<br>
>> example, I found that I had to use it with an `ImageFileReader`. Why is<br>
>> that?<br>
>><br>
>> Thanks.<br>
>><br>
>><br>
>> _______________________________________________<br>
>> Community mailing list<br>
>> <a href="mailto:Community@itk.org">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>
> Community mailing list<br>
> <a href="mailto:Community@itk.org">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>
</div></div></blockquote></div><br></div>