[Insight-users] Problem compiling the example CourseWare...

Luis Ibanez luis.ibanez at kitware.com
Wed, 14 Jan 2004 09:45:26 -0500


Hi Peppe,


1) What compiler are you using ?

    This option will currently appear only for
    Visual Studio 6.0 which is the one suffering
    from the ambiguity in the use of the headers.

    If you are using Visual Studio 7 (.NET or
    .NET 2003) the VTK_USE_ANSI_STDLIB option
    will not be displayed by CMake. In these
    compilers you don't need to care about this
    option because it is the compiler's default.



2) You should not use the CVS version of VTK
    along with code in InsightApplications.
    All the programs in InsightApplications are
    built against VTK 4.2 which is the latest
    stable release of VTK.

    The problems you are facing are the consequence
    of recent support added in VTK for using "double"
    instead of "float" for representing image spacing.

    Please use VTK 4.2.



Regards,


   Luis


---------------------
peppe megali wrote:
> Hi Luis,
> 
> thanks for your quick reply...
> but I haven't solved my problems:
> 
>> 1) In order to see the VTK_USE_ANSI_STDLIB option
>>    in CMake you must enable the "Advanced" mode.
>>    Rerun CMake over VTK, enable the option and
>>    then rebuild VTK. 
> 
> 
> 
> I did it (I enabled the "advanced"), but the option VTK_USE_ANSI_STDLIB 
> there isn't visualized.
> 
>> 2) The itkImageToVTKImageFilter.h file can be
>>    found in
>>
>>        InsightApplications/Auxiliary/vtk
>>
>>    You must copy this file (along with the .txx)
>>    into your project
>>
>>    Or
>>
>>    you can add this directory to the list of
>>    include directories in your CMakeLists.txt
>>    file.  Use the CMake command
>>
>>            INCLUDE_DIRECTORIES(   )
> 
> 
> I did it (both solutions) and what I obtained is the following errors 
> (during compilation):
> 
> error C2664: 'vtkImageImport::SetSpacingCallback' : cannot convert 
> parameter 1 from 'itk::VTKImageExportBase::SpacingCallbackType' to 
> 'vtkImageImport::SpacingCallbackType'
> 
> error C2664: 'vtkImageImport::SetOriginCallback' : cannot convert 
> parameter 1 from 'itk::VTKImageExportBase::OriginCallbackType' to 
> 'vtkImageImport::OriginCallbackType'
>       This conversion requires a reinterpret_cast, a C-style cast or 
> function-style cast
> 
> Maybe these errors are due to the fact that I have not enabled (because 
> I can't) the VTK_USE_ANSI_STDLIB.
> 
> Any other suggestion?
> 
> Regards
> peppe
> 
> 
> 
>>
>> peppe megali wrote:
>>
>>> Dear all,
>>>
>>> I'm new in ITK. I'm starting with the CourseWare tutorials (..ITK 1.4 
>>> CVS\InsightDocuments\CourseWare\Training).
>>> I downloaded and compiled ITK and VTK (both downloaded in CVS 
>>> version), following the instruction of the GettingStarted-I and 
>>> GettingStarted-II  ppt presentations.
>>> First of all I didn't find the VTK_USE_ANSI_STDLIB option during the 
>>> configuration of CMake for VTK.
>>>
>>> I'm trying to reproduce the example of "Getting Started with ITK + 
>>> VTK", using Visual C++ 7 2003, but when I compile (following just the 
>>> instruction of GettingStarted-I and GettingStarted-II) I obtain the 
>>> following error:
>>>
>>> fatal error C1083: Cannot open include file: 
>>> 'itkImageToVTKImageFilter.h': No such file or directory
>>>
>>> can someone help me, please?
>>> thanks
>>> peppe
>>>
>>>
>>>
>>
>>
>>
>> _______________________________________________
>> 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
>