[Insight-users] Building ITK and VTK on linux

Ofri Sadowsky ofri@cs.jhu.edu
Sun, 19 Jan 2003 13:59:00 -0500


Simpler solution -- use all-cvs version of vtk and itk. This seems to work.

Ofri.

Bill Lorensen wrote:

> Ofri,
> You have entered vtk/itk version hell. There is hope, but you may have to make a couple of fixes to your itk1.0. The errors are because the vtk developers have been sweeping through vtk to remove "unnecessary" include files. So, go into vtk2itk.cxx and add
> #include "vtkCellArray.h"
>
> There may be other places you will have to do this.
>
> Sorry about the inconvenience,
>
> Bill
>
> At 03:59 PM 1/17/03 -0500, Ofri Sadowsky wrote:
> >Hi Bill & All,
> >
> >I installed the newest cvs version of VTK (I think it's 4.1.something) and rebuilt the whole VTK from
> >scratch. Then I rebuild Insight 1.0.0 again from scratch, but I keep getting compilation errors. Now
> >it's in the file:
> >
> >InsightToolkit-1.0.0/Auxiliary/vtk/vtk2itk.cxx
> >
> >and the last error message is
> >
> >In
> >   function `vtkUnstructuredGrid* MeshToUnstructuredGrid(floatMesh*)':
> >/usr/local/erc-share/downloaded-src/itk10/InsightToolkit-1.0.0/Auxiliary/vtk/vtk2itk.cxx:271: no
> >   method `vtkCellArray::New'
> >/usr/local/erc-share/downloaded-src/itk10/InsightToolkit-1.0.0/Auxiliary/vtk/vtk2itk.cxx:272: invalid
> >   use of undefined type `struct vtkCellArray'
> >/usr/local/erc-share/downloaded-src/vtk4x-cvs/VTK/IO/vtkDataWriter.h:36: forward   declaration of
> >`struct vtkCellArray'
> >/usr/local/erc-share/downloaded-src/itk10/InsightToolkit-1.0.0/Auxiliary/vtk/vtk2itk.cxx:292: invalid
> >   use of undefined type `struct vtkCellArray'
> >/usr/local/erc-share/downloaded-src/vtk4x-cvs/VTK/IO/vtkDataWriter.h:36: forward   declaration of
> >`struct vtkCellArray'
> >
> >
> >Now, I cannot be sure if the problem is because of the VTK version or because of ITK. All I could find
> >on the VTK web page was:
> >
> >1. Download VTK 4.0
> >2. Download VTK 4.x Nightly Release
> >3. Unsupported Linux Pre-Compiled Binaries (RPMS)
> >
> >The unofficial rpm has problems with TCL support, so I dropped it. But in general it should be no
> >different from the nightly release. Bill has ruled out the use of VTK 4.0. What is the next step, then?
> >
> >
> >Thanks,
> >
> >Ofri.
> >
> >
> >"Lorensen, William E (Research)" wrote:
> >
> >> Orfi,
> >>
> >> I suspect that ITK will not build witk VTK4.0. 4.0 is about a year old and, if I recall, itk may be
> >> taking advantage of features added shortly after the VTK 4.0 release. We are attempting to
> >> synchronize a vtk 4.2 and itk 1.1 release in the next few weeks. If you can't wait for that, you'll
> >> have to take cvs checkouts of both systems.
> >>
> >> Bill
> >>
> >> -----Original Message-----
> >> From: Ofri Sadowsky [mailto:ofri@cs.jhu.edu]
> >> Sent: Thursday, January 16, 2003 5:22 PM
> >> To: insight users
> >> Subject: [Insight-users] Building ITK and VTK on linux
> >>
> >> Hi,
> >>
> >> I am trying to build the Insight 1.0.0 release on a Linux workstation,
> >> where VTK 4.0 has already been installed.
> >>
> >> The ITK package without VTK examples is built successfully. But when
> >> I tryo to add the VTK examples - by setting
> >>
> >> BUILD_EXAMPLES                   ON
> >> USE_VTK                          ON
> >>
> >> in ccmake, the build fails on the file
> >>
> >> InsightToolkit-1.0.0/Examples/vtkITK/Common/vtkITKMutualInformationTransform.cxx
> >>
> >> with many errors. The last of which is
> >> "class vtkITKMutualInformationTransform' has no member named
> >> `Superclass'
> >> /usr/local/erc-share/downloaded-src/itk10/InsightToolkit-1.0.0/Examples/vtkITK/Common/vtkITKMutualInf
> >> ormationTransform.cxx:90:
> >> parse
> >>    error before `::' token"
> >>
> >> I use gmake and g++/gcc for the compilation. The operating system is
> >> "Red Hat Linux release 8.0 (Psyche)". The error occurs only if both the
> >> above flags are ON. cmake and ccmake do not report any problems.
> >>
> >> Please help me find the problems, as I would like to evaluate the use of
> >> VTK and ITK together.
> >>
> >> Thanks,
> >>
> >> Ofri.
> >>
> >> _______________________________________________
> >> Insight-users mailing list
> >> Insight-users@public.kitware.com
> >> http://public.kitware.com/mailman/listinfo/insight-users
> >
> >_______________________________________________
> >Insight-users mailing list
> >Insight-users@public.kitware.com
> >http://public.kitware.com/mailman/listinfo/insight-users