[Insight-developers] Explicit Instantiation

Miller, James V (GE, Research) millerjv at crd.ge.com
Fri May 19 17:19:28 EDT 2006


I think Bill saw this as well.  I thought he had figured out how 
to get around it. I think for any ImageRegion that you are explicitly
instantiating, you MUST also explicitly instantiate the ImageRegions
for every lower dimension.  While this is not necessary for other
classes, it is necessary for ImageRegion because of the reference
to an ImageRegion one dimension less.

Jim

-----Original Message-----
From: insight-developers-bounces+millerjv=crd.ge.com at itk.org
[mailto:insight-developers-bounces+millerjv=crd.ge.com at itk.org]On Behalf
Of Hans Johnson
Sent: Friday, May 19, 2006 3:53 PM
To: ITK
Subject: [Insight-developers] Explicit Instantiation


Hello Experts,

I am trying to build with explicit instantiation on gcc 3.4.5 under  
linux (RHEL4).

I am getting the following error:

/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h: In instantiation of `const unsigned int  
itk::ImageRegion<2u>::SliceDimension':
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h:85:   instantiated from `itk::ImageRegion<2u>'
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
Templates/itkImageRegion2.h:4:   instantiated from here
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h:85: error: explicit instantiation of  
`itk::ImageRegion<2u>::SliceDimension' but no definition available
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h: In instantiation of `const unsigned int  
itk::ImageRegion<3u>::SliceDimension':
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h:85:   instantiated from `itk::ImageRegion<3u>'
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
Templates/itkImageRegion3.h:4:   instantiated from here
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h:85: error: explicit instantiation of  
`itk::ImageRegion<3u>::SliceDimension' but no definition available
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h: In instantiation of `const unsigned int  
itk::ImageRegion<2u>::SliceDimension':
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h:85:   instantiated from `itk::ImageRegion<2u>'
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
Templates/itkImageRegion2.h:4:   instantiated from here
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h:85: error: explicit instantiation of  
`itk::ImageRegion<2u>::SliceDimension' but no definition available
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h: In instantiation of `const unsigned int  
itk::ImageRegion<3u>::SliceDimension':
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h:85:   instantiated from `itk::ImageRegion<3u>'
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
Templates/itkImageRegion3.h:4:   instantiated from here
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h:85: error: explicit instantiation of  
`itk::ImageRegion<3u>::SliceDimension' but no definition available


I believe that the problem is that the itk::ImageRegion<Dimension>  
recursively depends on itk::ImageRegion<Dimension-1>, and that the  
explicit instantiation mechanism does not support such cascading  
definitions yet.

Any ideas?

Thanks,
Hans

_______________________________________________
Insight-developers mailing list
Insight-developers at itk.org
http://www.itk.org/mailman/listinfo/insight-developers


More information about the Insight-developers mailing list