[Insight-developers] Errors on bcc build

Joshua Cates cates@sci.utah.edu
Mon, 11 Nov 2002 12:20:40 -0700 (MST)


Hi,


itk::FastMarchingExtensionImageFilter has the following template parameter 
definition,


template <
  class TLevelSet, 
  class TSpeedImage = 
Image<float,::itk::GetImageDimension<TLevelSet>::ImageDimension> >
class ITK_EXPORT FastMarchingImageFilter :
  public ImageToImageFilter<TSpeedImage,TLevelSet>


itk::SegmentationLevelSetImageFilter uses an almost identical construction 
but with the addition of a template parameter to define the output pixel 
type,


template <class TInputImage,
          class TFeatureImage,
          class TOutputPixelType = float,
          class TOutputImage = Image<TOutputPixelType,
                 ::itk::GetImageDimension<TInputImage>::ImageDimension> >
class ITK_EXPORT SegmentationLevelSetImageFilter
  : public SparseFieldLevelSetImageFilter<TInputImage, TOutputImage>



The BCC compiler cannot handle this second construction, but then also 
chokes on,

template <class TInputImage,
          class TFeatureImage,
          class TOutputImage = Image<float,
                 ::itk::GetImageDimension<TInputImage>::ImageDimension> >
class ITK_EXPORT SegmentationLevelSetImageFilter
  : public SparseFieldLevelSetImageFilter<TInputImage, TOutputImage>


which is essentially identical to FastMarchingExtensionImageFilter.


The problem seems to be that 
::itk::GetImageDimension<TInputImage>::ImageDimension is not resolving to 
a unsigned int number as it should.

Witness the original error statement from bcc as seen on the dashboard:

Error E2402 
C:\itkQuality\Borland\Insight\Code\Algorithms\itkLaplacianSegmentationLevelSetImageFilter.h 
101: Illegal base class type: formal type 
'itk::SegmentationLevelSetImageFilter<TInputImage,TFeatureImage,TOutputPixelType,itk::Image<TOutputPixelType,> 
>' resolves to 
'itk::SegmentationLevelSetImageFilter<LSIFTN::SeedImageType,LSIFTN::ImageType,float,itk::Image<TOutputPixelType,> 
>' in function itkLaplacianSegmentationLevelSetImageFilterTest(int,char * *)



Note that the fourth parameter to itk::SegmentationLevelSetImageFilter is 
an incomplete definition of an itk::Image.


Any ideas or help with debugging this problem would be appreciated.

Thanks,

Josh.






______________________________
 Josh Cates			
 School of Computer Science	
 University of Utah
 Email: cates@sci.utah.edu
 Phone: (801) 587-7697
 URL:   www.cs.utk.edu/~cates