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

Greg Harris Gregory-Harris at uiowa.edu
Fri Aug 7 16:17:01 EDT 2009


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



More information about the Insight-users mailing list