[Insight-developers] Errors on bcc build

Miller, James V (Research) millerjv@crd.ge.com
Wed, 13 Nov 2002 13:47:50 -0500


I have checked a few to (some of) these compiler errors.

The Borland compiler has a lot of trouble when default template parameters
are used AND the defaults are dependent on other template parameters.

In this case, I just fully spec'ed out the template list to the superclass
instead of relying on the default template.

The LaplacianSegmentationLevelSetImageFilterTest compiles now.  I am still 
getting errors in the ThresholdSegmentationLevelSetImageFilterTest whenever
a method of the ThresholdSegmentationLevelSetFunction is called.  It is like
the SmartPointer type is not defined.  This is a very deep hierarchy
(ThresholdSegmentationLevelSetFunction).  Perhaps that has something to do with
it.



Error E2288 C:\projects\I2\Insight\Code\Algorithms\itkThresholdSegmentationLevelSetImageFilter.txx
30: Pointer to structure required on left side of -> or ->* in function
ThresholdSegmentationLevelSetImageFilter<TSIFTN::SeedImageType,TSIFTN::ImageType,float>::ThresholdSeg
mentationLevelSetImageFilter()
Error E2288 C:\projects\I2\Insight\Code\Algorithms\itkThresholdSegmentationLevelSetImageFilter.txx
31: Pointer to structure required on left side of -> or ->* in function
ThresholdSegmentationLevelSetImageFilter<TSIFTN::SeedImageType,TSIFTN::ImageType,float>::ThresholdSeg
mentationLevelSetImageFilter()
Error E2288 C:\projects\I2\Insight\Code\Algorithms\itkThresholdSegmentationLevelSetImageFilter.h 112:
Pointer to structure required on left side of -> or ->* in function
ThresholdSegmentationLevelSetImageFilter<TSIFTN::SeedImageType,TSIFTN::ImageType,float>::SetUpperThre
shold(typename
SegmentationLevelSetImageFilter<TSIFTN::SeedImageType,TSIFTN::ImageType,float,Image<TOutputPixelType,
> >::ValueType)
Warning W8057 C:\projects\I2\Insight\Code\Algorithms\itkThresholdSegmentationLevelSetImageFilter.h
114: Parameter 'typename
SegmentationLevelSetImageFilter<TSIFTN::SeedImageType,TSIFTN::ImageType,float,Image<TOutputPixelType,
> >::ValueType' is never used in function
ThresholdSegmentationLevelSetImageFilter<TSIFTN::SeedImageType,TSIFTN::ImageType,float>::SetUpperThre
shold(typename
SegmentationLevelSetImageFilter<TSIFTN::SeedImageType,TSIFTN::ImageType,float,Image<TOutputPixelType,
> >::ValueType)
Error E2288 C:\projects\I2\Insight\Code\Algorithms\itkThresholdSegmentationLevelSetImageFilter.h 117:
Pointer to structure required on left side of -> or ->* in function
ThresholdSegmentationLevelSetImageFilter<TSIFTN::SeedImageType,TSIFTN::ImageType,float>::SetLowerThre
shold(typename
SegmentationLevelSetImageFilter<TSIFTN::SeedImageType,TSIFTN::ImageType,float,Image<TOutputPixelType,
> >::ValueType)
Warning W8057 C:\projects\I2\Insight\Code\Algorithms\itkThresholdSegmentationLevelSetImageFilter.h
119: Parameter 'typename
SegmentationLevelSetImageFilter<TSIFTN::SeedImageType,TSIFTN::ImageType,float,Image<TOutputPixelType,
> >::ValueType' is never used in function
ThresholdSegmentationLevelSetImageFilter<TSIFTN::SeedImageType,TSIFTN::ImageType,float>::SetLowerThre
shold(typename
SegmentationLevelSetImageFilter<TSIFTN::SeedImageType,TSIFTN::ImageType,float,Image<TOutputPixelType,
> >::ValueType)
*** 4 errors in Compile ***


Jim



> -----Original Message-----
> From: Joshua Cates [mailto:cates@sci.utah.edu]
> Sent: Monday, November 11, 2002 3:26 PM
> To: Lydia Ng
> Cc: Insight-Developers
> Subject: RE: [Insight-developers] Errors on bcc build
> 
> 
> Hi Lydia,
> 
> Yes I've tried various things like this and it still fails.  
> It's very 
> mysterious because I cannot locate the difference between 
> what you did in 
> your filter and what I'm doing in mine.
> 
> 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
> 
> 
> On Mon, 11 Nov 2002, Lydia Ng wrote:
> 
> > This is just a wild guess - does it make a difference if 
> the declaration of TOuputImage is on
> > one line instead of two?
> >  
> > You did ask for *any* suggestion :-)
> >  
> > -Lydia
> > 
> > 	-----Original Message----- 
> > 	From: Joshua Cates [mailto:cates@sci.utah.edu] 
> > 	Sent: Mon 11/11/2002 11:20 AM 
> > 	To: Insight-Developers 
> > 	Cc: 
> > 	Subject: [Insight-developers] Errors on bcc build
> > 	
> > 	
> > 
> > 	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\itkLaplacianSegm
> entationLevelSetImageFilter.h
> > 	101: Illegal base class type: formal type
> > 	
> 'itk::SegmentationLevelSetImageFilter<TInputImage,TFeatureImag
> e,TOutputPixelType,itk::Image<TOutputPixelType,>
> > 	>' resolves to
> > 	
> 'itk::SegmentationLevelSetImageFilter<LSIFTN::SeedImageType,LS
> IFTN::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
> > 	
> > 	
> > 	_______________________________________________
> > 	Insight-developers mailing list
> > 	Insight-developers@public.kitware.com
> > 	http://public.kitware.com/mailman/listinfo/insight-developers
> > 	
> > 	
> > 
> > 
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers
>