[Insight-users] problem compiling itkapplications

Luis Ibanez luis.ibanez at kitware.com
Thu, 08 Jan 2004 09:36:37 -0500


Hi Felix,

InsightApplications will *not* build
with the CVS version of VTK.

You should build it using VTK 4.2 which
is the latest stable release of VTK.

VTK recently started using doubles instead
of float for representing a number of values
like the spacing in images. That change
produces the error messages that you are
getting.


In order to get the correct version of VTK,
just go back to your VTK source tree and do:

       cvs update -r  release-4-2

Then rebuild VTK and finally rebuild
InsightApplications.


Regards,



     Luis



------------------------
Felix Schwenk wrote:
> hi all,
> i did a cvs update of vtk, itk and itkapplications last night.
> vtk compiles
> itk compiles
> but itkapplications gives me errors when compiling an application that 
> uses vtk.
> errors are something like this:
> 
> c:\projects\itk\Insight\InsightApplications\vtkITK\Common\vtkITKUtility.h(39) 
> : error C2664: 'itk::VTKImageImport<TOutputImage>::SetSpacingCallback' : 
> cannot convert parameter 1 from 'vtkImageExport::SpacingCallbackType' to 
> 'const itk::VTKImageImport<TOutputImage>::SpacingCallbackType'
> 
>         with
>         [
>             TOutputImage=vtkITKImageToImageFilterFUL::InputImageType
>         ]
>         and
>         [
>             TOutputImage=vtkITKImageToImageFilterFUL::InputImageType
>         ]
>         This conversion requires a reinterpret_cast, a C-style cast or 
> function-style cast
>         
> c:\projects\itk\Insight\InsightApplications\vtkITK\Common\vtkITKImageToImageFilterFUL.h(48) 
> : see reference to function template instantiation 'void 
> ConnectPipelines<vtkImageExport,itk::VTKImageImport<TOutputImage>::Pointer>(VTK_Exporter 
> *,ITK_Importer)' being compiled
> 
>         with
>         [
>             TOutputImage=vtkITKImageToImageFilterFUL::InputImageType,
>             VTK_Exporter=vtkImageExport,
>             
> ITK_Importer=itk::VTKImageImport<vtkITKImageToImageFilterFUL::InputImageType>::Pointer 
> 
>         ]
> 
> 
> what am i doing wrong?
> 
> felix.
>