<HTML>
<HEAD>
<TITLE>Re: [Insight-users] ITK_USE_REVIEW_STATISTICS compilation glitch when Tcl wrapping is generated as well</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hi Luis,<BR>
<BR>
In building with Review/Statistics and Tcl Wrapping, I find I need to avoid with #if 0 the code in Insight/Code/Review/Statistics/itkScalarImageToHistogramGenerator.txx lines 72 thru 93, definitions of SetHistogramMin and SetHistogramMax since SampleToHistogramFilter does not in turn provide methods for SetHistogramMin and SetHistogramMax now that Histogram is going to develop its own Min and Max based on what it observes. This code would not get tested for compilability with wrapping turned off.<BR>
<BR>
Thanks,<BR>
Greg<BR>
<BR>
<BR>
On 8/8/09 9:19 AM, "Luis Ibanez" <<a href="luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hi Greg,<BR>
<BR>
The offending symbols have been removed:<BR>
<BR>
<a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Review/Statistics/itkScalarImageToHistogramGenerator.h?root=Insight&r1=1.1&r2=1.2&sortby=date">http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Review/Statistics/itkScalarImageToHistogramGenerator.h?root=Insight&r1=1.1&r2=1.2&sortby=date</a><BR>
<BR>
<a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Review/Statistics/itkScalarImageToHistogramGenerator.txx?root=Insight&r1=1.2&r2=1.3&sortby=date">http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Review/Statistics/itkScalarImageToHistogramGenerator.txx?root=Insight&r1=1.2&r2=1.3&sortby=date</a><BR>
<BR>
<BR>
Please let us know if you find any other problem.<BR>
<BR>
<BR>
Thanks<BR>
<BR>
<BR>
Luis<BR>
<BR>
<BR>
-------------------------------------------<BR>
On Sat, Aug 8, 2009 at 10:13 AM, Luis Ibanez <<a href="luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>> wrote:<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hi Greg,<BR>
<BR>
Thanks for pointing this out.<BR>
<BR>
This is a mistake on our part.<BR>
<BR>
I practice, none of the classes in Code/Review/Statistics<BR>
should have to use or refer to the symbol:<BR>
<BR>
ITK_USE_REVIEW_STATISTICS<BR>
<BR>
The reason is that, if the symbol is not defined, then<BR>
these files should not be included at all in the first place.<BR>
<BR>
In other words, the only way to get to include these files<BR>
is to set ITK_USE_REVIEW_STATISTICS to ON.<BR>
<BR>
<BR>
We will remove the ITK_USE_REVIEW_STATISTICS<BR>
conditionals from that file.<BR>
<BR>
<BR>
Regards,<BR>
<BR>
<BR>
Luis<BR>
<BR>
<BR>
----------------------<BR>
<BR>
On Fri, Aug 7, 2009 at 5:20 PM, Greg Harris <<a href="Gregory-Harris@uiowa.edu">Gregory-Harris@uiowa.edu</a>> wrote:<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Oops, I think I misdiagnosed it: in Code/Review/Statistics, the files<BR>
itkScalarImageToHistogramGenerator.{h,txx} do not agree when<BR>
ITK_USE_REVIEW_STATISTICS is ON: I would add the<BR>
#ifndef ITK_USE_REVIEW_STATISTICS<BR>
Around the .h prototypes to match the .txx implementations.<BR>
<BR>
My bad.<BR>
<BR>
<BR>
On 8/7/09 3:17 PM, "Greg Harris" <<a href="Gregory-Harris@uiowa.edu">Gregory-Harris@uiowa.edu</a>> wrote:<BR>
<BR>
> Dear Insight user's help list:<BR>
><BR>
> I have been compiling ITK with the ITK_USE_REVIEW_STATISTICS flag ON, and<BR>
> with wrapping of Tcl turned ON as well. Along the way, there is this<BR>
> glitch:<BR>
><BR>
> While linking a library to include the glue for the wrapping file<BR>
> WrapITK/Modules/Calculators/wrap_itkScalarImageToHistogramGenerator.cmake<BR>
> the method functions for SetHistogramMax and SetHistogramMin have no<BR>
> implementation. Rightly so, but there should be no wrapped methods for<BR>
> them.<BR>
><BR>
> On the face of it, the two versions of ScalarImageToHistogramGenerator,<BR>
> Code/Numerics/Statistics/itkScalarImageToHistogramGenerator.{h,txx} and<BR>
> Code/Review/Statistics/itkScalarImageToHistogramGenerator.{h,txx} are both<BR>
> available to the wrapping compiler, but only the standard version has Set<BR>
> methods for HistogramMin and HistogramMax.<BR>
><BR>
> Since I don't know why -- apparently only in this one case of superceding an<BR>
> itk class definition with a Review method, which happens all the time -- the<BR>
> Tcl glue-interface is being generated for the standard class by that name<BR>
> and then linked against the review definition of the same class name, I have<BR>
> temporarily adopted the expedient of renaming<BR>
> wrap_itkScalarImageToHistogramGenerator.cmake to a safe place nearby so the<BR>
> entire class's glue code won't be generated at all.<BR>
><BR>
> This won't do for the long run as we would like to wrap the Review version<BR>
> of ScalarImageToHistogramGenerator, and we would not like to tamper with the<BR>
> source download each time. I know I could devise a patch that modifies the<BR>
> Code/Numerics/Statistics copy, but why are we dealing with it at all, after<BR>
> ITK_USE_REVIEW_STATISTICS is ON?<BR>
><BR>
> Should I have a sinking fear that Whenever people supercede a class<BR>
> implementation with a Review version, the non-Review version is driving the<BR>
> Tcl wrapper glue generation? That would be wrong; it would need serious<BR>
> fixing, even if this is the first known case where it has made a difference.<BR>
><BR>
> I hope someone who knows what's what will kindly help us with this.<BR>
> Greg Harris<BR>
> Brain Imaging Application Developer<BR>
> Iowa Psychiatric Neuroimaging Consortium<BR>
> Carver College of Medicine<BR>
> The University of Iowa<BR>
><BR>
> _____________________________________<BR>
> Powered by www.kitware.com <<a href="http://www.kitware.com">http://www.kitware.com</a>> <BR>
><BR>
> Visit other Kitware open-source projects at<BR>
> <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><BR>
><BR>
> Please keep messages on-topic and check the ITK FAQ at:<BR>
> <a href="http://www.itk.org/Wiki/ITK_FAQ">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-users">http://www.itk.org/mailman/listinfo/insight-users</a><BR>
<BR>
_____________________________________<BR>
Powered by www.kitware.com <<a href="http://www.kitware.com">http://www.kitware.com</a>> <BR>
<BR>
Visit other Kitware open-source projects at<BR>
<a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><BR>
<BR>
Please keep messages on-topic and check the ITK FAQ at: <a href="http://www.itk.org/Wiki/ITK_FAQ">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-users">http://www.itk.org/mailman/listinfo/insight-users</a><BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
<BR>
</SPAN></FONT></BLOCKQUOTE>
</BODY>
</HTML>