InsightSoftwareConsortium / ITKVtkGlue

This module contains classes that bridge ITK image processing and VTK visualization pipelines.
Apache License 2.0
15 stars 7 forks source link

Recompiling ITK after compiling ITKVtkGlue #14

Open fbudin69500 opened 5 years ago

fbudin69500 commented 5 years ago

I am getting the following error message when trying to recompile ITK after having compiled ITKVtkGlue as a separate project:

/home/francois.budin/devel/itk/ITK/build/Wrapping/Modules/ITKVTK/itkVTKImageImportPython.cpp:4609:10: fatal error: vtkImageImport.h: No such file or directory
 #include "vtkImageImport.h"
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
Wrapping/Modules/ITKVTK/CMakeFiles/ITKVTKPython.dir/build.make:295: recipe for target 'Wrapping/Modules/ITKVTK/CMakeFiles/ITKVTKPython.dir/itkVTKImageImportPython.cpp.o' failed
make[2]: *** [Wrapping/Modules/ITKVTK/CMakeFiles/ITKVTKPython.dir/itkVTKImageImportPython.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/francois.budin/devel/itk/ITK/build/Wrapping/Modules/ITKVTK/itkVTKImageExportPython.cpp:4566:10: fatal error: vtkImageImport.h: No such file or directory
 #include "vtkImageImport.h"
          ^~~~~~~~~~~~~~~~~~
compilation terminated.

This could be related to the fact that ITKVtkGlue is both inside and outside the ITK repository.

thewtex commented 5 years ago

What is the state of Module_* related to VTK in the ITK build directory CMakeCache.txt file?

fbudin69500 commented 5 years ago

Everything was set to OFF originally inside the ITK build directory.

See the result of the following command:

more  CMakeCache.txt |grep -i vtk |grep -i module
ITKIOMeshVTK_BINARY_DIR:STATIC=/home/francois.budin/devel/itk/ITK/build/Modules/IO/MeshVTK
ITKIOMeshVTK_SOURCE_DIR:STATIC=/home/francois.budin/devel/itk/ITK/Modules/IO/MeshVTK
ITKIOVTK_BINARY_DIR:STATIC=/home/francois.budin/devel/itk/ITK/build/Modules/IO/VTK
ITKIOVTK_SOURCE_DIR:STATIC=/home/francois.budin/devel/itk/ITK/Modules/IO/VTK
ITKVTK_BINARY_DIR:STATIC=/home/francois.budin/devel/itk/ITK/build/Modules/Bridge/VTK
ITKVTK_SOURCE_DIR:STATIC=/home/francois.budin/devel/itk/ITK/Modules/Bridge/VTK
Module_ITKVtkGlue:BOOL=OFF
//ADVANCED property for variable: Module_ITKIOMeshVTK
Module_ITKIOMeshVTK-ADVANCED:INTERNAL=1
Module_ITKIOMeshVTK:INTERNAL=OFF
//ADVANCED property for variable: Module_ITKIOVTK
Module_ITKIOVTK-ADVANCED:INTERNAL=1
Module_ITKIOVTK:INTERNAL=OFF
//ADVANCED property for variable: Module_ITKVTK
Module_ITKVTK-ADVANCED:INTERNAL=1
Module_ITKVTK:INTERNAL=OFF
//ADVANCED property for variable: Module_ITKVtkGlue
Module_ITKVtkGlue-ADVANCED:INTERNAL=1
WRAP_ITK_MODULES:INTERNAL=ITKCommon;ITKFiniteDifference;ITKImageFilterBase;ITKCurvatureFlow;ITKStatistics;ITKTransform;ITKImageFunction;ITKImageGrid;ITKAnisotropicSmoothing;ITKImageCompose;ITKMesh;ITKSpatialObjects;ITKImageStatistics;ITKPath;ITKImageIntensity;ITKImageLabel;ITKLabelMap;ITKThresholding;ITKConnectedComponents;ITKMathematicalMorphology;ITKBinaryMathematicalMorphology;ITKNarrowBand;ITKDistanceMap;ITKQuadEdgeMesh;ITKFastMarching;ITKIOImageBase;ITKImageCompare;ITKSmoothing;ITKImageGradient;ITKImageSources;ITKImageFeature;ITKOptimizers;ITKLevelSets;ITKAntiAlias;ITKBiasCorrection;ITKBridgeNumPy;ITKClassifiers;ITKColormap;ITKFFT;ITKConvolution;ITKDeconvolution;ITKDisplacementField;ITKEigen;ITKRegistrationCommon;ITKPDEDeformableRegistration;ITKIOBMP;ITKIOBioRad;ITKIOBruker;ITKIOGDCM;ITKIOIPL;ITKIOGE;ITKIOGIPL;ITKIOHDF5;ITKIOJPEG;ITKIOJPEG2000;ITKIOTIFF;ITKIOLSM;ITKIOMINC;ITKIOMRC;ITKVoronoi;ITKIOMeshBase;ITKIOMeshBYU;ITKIOMeshFreeSurfer;ITKIOMeshGifti;ITKIOMeshOBJ;ITKIOMeshOFF;ITKIOMeshVTK;ITKIOMeta;ITKIONIFTI;ITKIONRRD;ITKIOPNG;ITKIORAW;ITKIOSiemens;ITKIOSpatialObjects;ITKIOStimulate;ITKIOTransformBase;ITKIOVTK;ITKImageFrequency;ITKImageFusion;ITKImageNoise;ITKLabelVoting;ITKOptimizersv4;ITKMetricsv4;ITKQuadEdgeMeshFiltering;ITKRegionGrowing;ITKRegistrationMethodsv4;ITKSuperPixel;ITKTestKernel;ITKVTK;ITKWatersheds
thewtex commented 5 years ago

I could not reproduce this :-(

fbudin69500 commented 5 years ago

Everything was set to OFF originally inside the ITK build directory.

See the result of the following command:

more CMakeCache.txt |grep -i vtk |grep -i module ITKIOMeshVTK_BINARY_DIR:STATIC=/home/francois.budin/devel/itk/ITK/build/Modules/IO/MeshVTK ITKIOMeshVTK_SOURCE_DIR:STATIC=/home/francois.budin/devel/itk/ITK/Modules/IO/MeshVTK ITKIOVTK_BINARY_DIR:STATIC=/home/francois.budin/devel/itk/ITK/build/Modules/IO/VTK ITKIOVTK_SOURCE_DIR:STATIC=/home/francois.budin/devel/itk/ITK/Modules/IO/VTK ITKVTK_BINARY_DIR:STATIC=/home/francois.budin/devel/itk/ITK/build/Modules/Bridge/VTK ITKVTK_SOURCE_DIR:STATIC=/home/francois.budin/devel/itk/ITK/Modules/Bridge/VTK Module_ITKVtkGlue:BOOL=OFF //ADVANCED property for variable: Module_ITKIOMeshVTK Module_ITKIOMeshVTK-ADVANCED:INTERNAL=1 Module_ITKIOMeshVTK:INTERNAL=OFF //ADVANCED property for variable: Module_ITKIOVTK Module_ITKIOVTK-ADVANCED:INTERNAL=1 Module_ITKIOVTK:INTERNAL=OFF //ADVANCED property for variable: Module_ITKVTK Module_ITKVTK-ADVANCED:INTERNAL=1 Module_ITKVTK:INTERNAL=OFF //ADVANCED property for variable: Module_ITKVtkGlue Module_ITKVtkGlue-ADVANCED:INTERNAL=1 WRAP_ITK_MODULES:INTERNAL=ITKCommon;ITKFiniteDifference;ITKImageFilterBase;ITKCurvatureFlow;ITKStatistics;ITKTransform;ITKImageFunction;ITKImageGrid;ITKAnisotropicSmoothing;ITKImageCompose;ITKMesh;ITKSpatialObjects;ITKImageStatistics;ITKPath;ITKImageIntensity;ITKImageLabel;ITKLabelMap;ITKThresholding;ITKConnectedComponents;ITKMathematicalMorphology;ITKBinaryMathematicalMorphology;ITKNarrowBand;ITKDistanceMap;ITKQuadEdgeMesh;ITKFastMarching;ITKIOImageBase;ITKImageCompare;ITKSmoothing;ITKImageGradient;ITKImageSources;ITKImageFeature;ITKOptimizers;ITKLevelSets;ITKAntiAlias;ITKBiasCorrection;ITKBridgeNumPy;ITKClassifiers;ITKColormap;ITKFFT;ITKConvolution;ITKDeconvolution;ITKDisplacementField;ITKEigen;ITKRegistrationCommon;ITKPDEDeformableRegistration;ITKIOBMP;ITKIOBioRad;ITKIOBruker;ITKIOGDCM;ITKIOIPL;ITKIOGE;ITKIOGIPL;ITKIOHDF5;ITKIOJPEG;ITKIOJPEG2000;ITKIOTIFF;ITKIOLSM;ITKIOMINC;ITKIOMRC;ITKVoronoi;ITKIOMeshBase;ITKIOMeshBYU;ITKIOMeshFreeSurfer;ITKIOMeshGifti;ITKIOMeshOBJ;ITKIOMeshOFF;ITKIOMeshVTK;ITKIOMeta;ITKIONIFTI;ITKIONRRD;ITKIOPNG;ITKIORAW;ITKIOSiemens;ITKIOSpatialObjects;ITKIOStimulate;ITKIOTransformBase;ITKIOVTK;ITKImageFrequency;ITKImageFusion;ITKImageNoise;ITKLabelVoting;ITKOptimizersv4;ITKMetricsv4;ITKQuadEdgeMeshFiltering;ITKRegionGrowing;ITKRegistrationMethodsv4;ITKSuperPixel;ITKTestKernel;ITKVTK;ITKWatersheds

melrobin commented 4 years ago

I am having the same problem now, but with a different source file: [ 5%] Generating ../../itkImageToVTKImageFilter.xml cd /home/melrobin/packages/ITK/build/Wrapping/Modules/ITKVtkGlue && /usr/bin/ccache /home/melrobin/packages/ITK/build/Wrapping/Generators/CastXML/castxml/bin/castxml -o /home/melrobin/packages/ITK/build/Wrapping/itkImageToVTKImageFilter.xml --castxml-gccxml --castxml-start wrapping --castxml-cc-gnu "(" /usr/lib64/ccache/c++ -mtune=native -march=corei7 -Wall -Wcast-align -Wdisabled-optimization -Wextra -Wformat=2 -Winvalid-pch -Wno-format-nonliteral -Wpointer-arith -Wshadow -Wunused -Wwrite-strings -funit-at-a-time -Wno-strict-overflow -Wno-deprecated -Wno-invalid-offsetof -Woverloaded-virtual -Wstrict-null-sentinel -msse2 -msse2 -std=c++11 ")" -w -c @/home/melrobin/packages/ITK/build/Wrapping/ITKVtkGlue.castxml.inc /home/melrobin/packages/ITK/build/Wrapping/itkImageToVTKImageFilter.cxx In file included from /home/melrobin/packages/ITK/build/Wrapping/itkImageToVTKImageFilter.cxx:16: /home/melrobin/packages/ITK/Modules/Bridge/VtkGlue/include/itkImageToVTKImageFilter.h:22:10: fatal error: 'vtkImageImport.h' file not found

include "vtkImageImport.h"

     ^~~~~~~~~~~~~~~~~~

1 error generated.

The include file does exist on my system, but the compiler flags do not have a path to this file.

thewtex commented 4 years ago

@melrobin it is worth checking that we have the VTK targets listed that include vtkImageImport.h in your version of VTK.