[Insight-users] double to float problem
Luis Ibanez
luis.ibanez at kitware.com
Fri Jan 20 10:29:44 EST 2006
Hi Yasser,
You could get around this problem, without having to upgrade ITK,
by changing the declarations of the Spacing callbacks in the files:
Insight/
Code/
BasicFilters/
itkVTKImageExport.h
itkVTKImageExport.txx
itkVTKImageExportBase.cxx
itkVTKImageExportBase.h
itkVTKImageImport.h
itkVTKImageImport.txx
You would have to change them from "float" to "double" in order
to match the new VTK types.
----
However, ITK 1.6 is quite old.
I will strongly encourage you to upgrade to ITK 2.4.1
Please let us know if you encounter any other problems.
Thanks
Luis
-----------------------
yasser salman wrote:
> Hi Luis,
> -I did VTK upgrade from 4.0 to 4.4 , but still have
> the old ITK (ver 1.6).
> When I recompile the vtk-itk project there are some
> errors related to the conversion from float to double
> how can I solve it?
> - did I *have to* ugrade my itk to 2.4.1 or I can use
> the old version .
>
> Error message
> D:\MyProject\BrainVol\itkVTKImageToImageFilter.txx(42)
> : error C2664: 'SetSpacingCallback' : cannot convert
> parameter 1 from 'double *(__cdecl *)(void *)' to
> 'float *(__cdecl *const )(void *)'
> This conversion requires a reinterpret_cast, a
> C-style cast or function-style cast
> C:\Program Files\Microsoft Visual
> Studio\VC98\INCLUDE\xmemory(66) : while compiling
> class-template member function '__thiscall
> itk::VTKImageToImageFilter<class itk::Image<unsigned
> short,3> >::itk::VTKImageToImageFilter<class
> itk::Image<unsigned short,3> >(void)'
> D:\MyProject\BrainVol\itkVTKImageToImageFilter.txx(43)
> : error C2664: 'SetOriginCallback' : cannot convert
> parameter 1 from 'double *(__cdecl *)(void *)' to
> 'float *(__cdecl *const )(void *)'
> This conversion requires a reinterpret_cast, a
> C-style cast or function-style cast
> C:\Program Files\Microsoft Visual
> Studio\VC98\INCLUDE\xmemory(66) : while compiling
> class-template member function '__thiscall
> itk::VTKImageToImageFilter<class itk::Image<unsigned
> short,3> >::itk::VTKImageToImageFilter<class
> itk::Image<unsig
> ned short,3> >(void)'
>
> regard's
> yasser
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>
More information about the Insight-users
mailing list