[Insight-users] double to float problem

Luis Ibanez luis.ibanez at kitware.com
Sat Jan 21 20:25:11 EST 2006


Hi Yasser,

Thanks for letting us know that the changes worked for you.


About your questions:

1. Yes, it is very likely that when you update to ITK 2.4.1
    you will have to change other things in your code.
    Although we try hard to maintain backwards compatibility,
    there are always some changes in the API that have to be
    made. You may want to avoid updating to ITK 2.4.1. if you
    are in a critical period in your project.


2.  CMake 2.2 has a different way of asking for your
     compiler. It does it as a popup window. Please make
     sure that when you run CMake 2.2 you are creating
     a fresh binary directory from scratch, and that you
     provide the correct name of the compiler when CMake
     ask for it.



   Regards,


      Luis



--------------------
yasser salman wrote:
> 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