[Insight-users] ITK_USE_REVIEW_STATISTICS compilation glitch when Tcl wrapping is generated as well

Luis Ibanez luis.ibanez at kitware.com
Sat Aug 8 10:13:48 EDT 2009


Hi Greg,

Thanks for pointing this out.

This is a mistake on our part.

I practice, none of the classes in Code/Review/Statistics
should have to use or refer to the symbol:

          ITK_USE_REVIEW_STATISTICS

The reason is that, if the symbol is not defined, then
these files should not be included at all in the first place.

In other words, the only way to get to include these files
is to set ITK_USE_REVIEW_STATISTICS to ON.


We will remove the ITK_USE_REVIEW_STATISTICS
conditionals from that file.


     Regards,


          Luis


----------------------
On Fri, Aug 7, 2009 at 5:20 PM, Greg Harris <Gregory-Harris at uiowa.edu>wrote:

> Oops, I think I misdiagnosed it:  in Code/Review/Statistics, the files
> itkScalarImageToHistogramGenerator.{h,txx} do not agree when
> ITK_USE_REVIEW_STATISTICS is ON:  I would add the
> #ifndef ITK_USE_REVIEW_STATISTICS
> Around the .h prototypes to match the .txx implementations.
>
> My bad.
>
>
> On 8/7/09 3:17 PM, "Greg Harris" <Gregory-Harris at uiowa.edu> wrote:
>
> > Dear Insight user's help list:
> >
> > I have been compiling ITK with the ITK_USE_REVIEW_STATISTICS flag ON, and
> > with wrapping of Tcl turned ON as well.  Along the way, there is this
> > glitch:
> >
> > While linking a library to include the glue for the wrapping file
> > WrapITK/Modules/Calculators/wrap_itkScalarImageToHistogramGenerator.cmake
> > the method functions for SetHistogramMax and SetHistogramMin have no
> > implementation.  Rightly so, but there should be no wrapped methods for
> > them.
> >
> > On the face of it, the two versions of ScalarImageToHistogramGenerator,
> > Code/Numerics/Statistics/itkScalarImageToHistogramGenerator.{h,txx} and
> > Code/Review/Statistics/itkScalarImageToHistogramGenerator.{h,txx} are
> both
> > available to the wrapping compiler, but only the standard version has Set
> > methods for HistogramMin and HistogramMax.
> >
> > Since I don't know why -- apparently only in this one case of superceding
> an
> > itk class definition with a Review method, which happens all the time --
> the
> > Tcl glue-interface is being generated for the standard class by that name
> > and then linked against the review definition of the same class name, I
> have
> > temporarily adopted the expedient of renaming
> > wrap_itkScalarImageToHistogramGenerator.cmake to a safe place nearby so
> the
> > entire class's glue code won't be generated at all.
> >
> > This won't do for the long run as we would like to wrap the Review
> version
> > of ScalarImageToHistogramGenerator, and we would not like to tamper with
> the
> > source download each time.  I know I could devise a patch that modifies
> the
> > Code/Numerics/Statistics copy, but why are we dealing with it at all,
> after
> > ITK_USE_REVIEW_STATISTICS is ON?
> >
> > Should I have a sinking fear that Whenever people supercede a class
> > implementation with a Review version, the non-Review version is driving
> the
> > Tcl wrapper glue generation?  That would be wrong; it would need serious
> > fixing, even if this is the first known case where it has made a
> difference.
> >
> > I hope someone who knows what's what will kindly help us with this.
> > Greg Harris
> > Brain Imaging Application Developer
> > Iowa Psychiatric Neuroimaging Consortium
> > Carver College of Medicine
> > The University of Iowa
> >
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.itk.org/mailman/listinfo/insight-users
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090808/34083ffb/attachment-0001.htm>


More information about the Insight-users mailing list