[Insight-users] double to float problem

yasser salman yass71 at yahoo.com
Sat Jan 21 14:32:04 EST 2006


Hello luis
thanks luis it works but i have 2 questions:
1- is there any modification that i'll do in my itk
code when converting to 2.4.1 ?
2- what Cmake suitable for my VC++ ver 6?
 ( i use 1.8.3 and when i try 2.2 the message error
occured requesting MFC7.dll !! may it needs VC.net or
somthing like that).
thanks luis.,
yasser
 

--- Luis Ibanez <luis.ibanez at kitware.com> wrote:

> 
> 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
> > 
> > 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Insight-users mailing list