[Insight-users] Build error with SNAP in InsightApplications-2.8.1

Luis Ibanez luis.ibanez at kitware.com
Sun Sep 17 10:49:23 EDT 2006


Hi Martin,


You may also want to try replacing the declaration:

      typedef GLvoid (*TessCallback)();

with

     typedef GLvoid (*TessCallback)(...);


Which is what your local OpenGL headers seems to be
expecting. That is, having an arbitrary number of
arguments in the callback function.


Please let us know if it works



    Thanks


       Luis


--------------------------
Martin M Connell wrote:
> The same type of error is reported with the different cast for the 
> modification
> typedef GLvoid (*TessCallback)();
> in line 25 of the file PolygonScanConvert.cxx.
> 
> Removing all code from line 33 to 138 in
> void
> PolygonScanConvertBase
> ::RasterizeFilled(double *vArray, unsigned int nVertices,
>   unsigned int width, unsigned int height, GLenum glType, void *buffer)
> allows compilation to proceed. Viewing of the surface using update mesh
> appears still to be normal.
> 
> Other SNAP users may be interested that it is possible to output a 3D 
> model of
> the surface (for CFD or rapid prototyping) when the mesh is updated 
> using code similar to the following modifications:
> 
> diff Logic/Mesh/VTKMeshPipeline.cxx.orig Logic/Mesh/VTKMeshPipeline.cxx
> 78a79
> 
>>   m_STLWriter = vtkSTLWriter::New();
> 
> 127a129
> 
>>   m_STLWriter->Delete();
> 
> 283a286
> 
>>   m_STLWriter->SetInput(pipePolyTail );
> 
> 306a310,315
> 
>>   char STLfilename[160];
>>   strcpy(STLfilename,"model.stl");
>>   m_STLWriter->SetFileName(STLfilename);
>>   m_STLWriter->Update();
>>   m_STLWriter->Write();
>>
> 
> diff Logic/Mesh/VTKMeshPipeline.h.orig Logic/Mesh/VTKMeshPipeline.h
> 37a38
> 
>> #include <vtkSTLWriter.h>
> 
> 116c117
> <
> ---
> 
>>   vtkSTLWriter *m_STLWriter;
> 
> ***********************************************************************
> Errors reported for suggested modification in line 25 of the file 
> PolygonScanConvert.cxx:
> Building CXX object 
> SNAP/CMakeFiles/itksnapui.dir/UserInterface/SliceWindow/PolygonScanConvert.o 
> 
> /image6/itk/InsightApplications-2.8.1/SNAP/UserInterface/SliceWindow/PolygonScanConvert.cxx: 
> In
>    static member function `static void
>    PolygonScanConvertBase::RasterizeFilled(double*, unsigned int, 
> unsigned int,
>    unsigned int, unsigned int, void*)':
> /image6/itk/InsightApplications-2.8.1/SNAP/UserInterface/SliceWindow/PolygonScanConvert.cxx:49: 
> error: invalid
>    conversion from `GLvoid (*)()' to `GLvoid (*)(...)'
> /image6/itk/InsightApplications-2.8.1/SNAP/UserInterface/SliceWindow/PolygonScanConvert.cxx:50: 
> error: invalid
>    conversion from `GLvoid (*)()' to `GLvoid (*)(...)'
> /image6/itk/InsightApplications-2.8.1/SNAP/UserInterface/SliceWindow/PolygonScanConvert.cxx:51: 
> error: invalid
>    conversion from `GLvoid (*)()' to `GLvoid (*)(...)'
> /image6/itk/InsightApplications-2.8.1/SNAP/UserInterface/SliceWindow/PolygonScanConvert.cxx:53: 
> error: invalid
>    conversion from `GLvoid (*)()' to `GLvoid (*)(...)'
> /image6/itk/InsightApplications-2.8.1/SNAP/UserInterface/SliceWindow/PolygonScanConvert.cxx:55: 
> error: invalid
>    conversion from `GLvoid (*)()' to `GLvoid (*)(...)'
> *** Error code 1
> The following command caused the error:
> /usr/local/bin/c++   -ftemplate-depth-50 -D_PTHREADS  -Wno-deprecated 
> -I/image6/itk/InsightApplications-2.8.1/SNAP 
> -I/image6/itk/InsightToolkit-2.8.1/Utilities/gdcm/src 
> -I/image6/itk/InsightToolkit-2.8.1/bin/Utilities/gdcm 
> -I/image6/itk/InsightToolkit-2.8.1/bin/Utilities/vxl/core 
> -I/image6/itk/InsightToolkit-2.8.1/bin/Utilities/vxl/vcl 
> -I/image6/itk/InsightToolkit-2.8.1/Utilities/vxl/core 
> -I/image6/itk/InsightToolkit-2.8.1/Utilities/vxl/vcl 
> -I/image6/itk/InsightToolkit-2.8.1/Utilities 
> -I/image6/itk/InsightToolkit-2.8.1/bin/Utilities 
> -I/image6/itk/InsightToolkit-2.8.1/Utilities/nifti/znzlib 
> -I/image6/itk/InsightToolkit-2.8.1/Utilities/nifti/niftilib 
> -I/image6/itk/InsightToolkit-2.8.1/Utilities/expat 
> -I/image6/itk/InsightToolkit-2.8.1/bin/Utilities/expat 
> -I/image6/itk/InsightToolkit-2.8.1/bin/Utilities/DICOMParser 
> -I/image6/itk/InsightToolkit-2.8.1/Utilities/DICOMParser 
> -I/image6/itk/InsightToolkit-2.8.1/Utilities/NrrdIO 
> -I/image6/itk/InsightToolkit-2.8.1/Utilities/MetaIO 
> -I/image6/itk/InsightToolkit-2.8.1/Code/SpatialObject 
> -I/image6/itk/InsightToolkit-2.8.1/Code/Numerics/NeuralNetworks 
> -I/image6/itk/InsightToolkit-2.8.1/Code/Numerics/Statistics 
> -I/image6/itk/InsightToolkit-2.8.1/Code/Numerics/FEM 
> -I/image6/itk/InsightToolkit-2.8.1/Code/IO 
> -I/image6/itk/InsightToolkit-2.8.1/Code/Numerics 
> -I/image6/itk/InsightToolkit-2.8.1/Code/Common 
> -I/image6/itk/InsightToolkit-2.8.1/Code/BasicFilters 
> -I/image6/itk/InsightToolkit-2.8.1/Code/Algorithms 
> -I/image6/itk/InsightToolkit-2.8.1/bin -I/image6/itk/vtk44/VTK 
> -I/image6/itk/vtk44/VTK/Hybrid -I/image6/itk/vtk44/VTK/Patented 
> -I/image6/itk/vtk44/VTK/Rendering -I/image6/itk/vtk44/VTK/IO 
> -I/image6/itk/vtk44/VTK/Imaging -I/image6/itk/vtk44/VTK/Graphics 
> -I/image6/itk/vtk44/VTK/Filtering -I/image6/itk/vtk44/VTK/Common 
> -I/image6/itk/vtk44/VTK/Common/Testing/Cxx 
> -I/image6/itk/vtk44/VTK/Utilities/zlib 
> -I/image6/itk/vtk44/VTK/Utilities/jpeg 
> -I/image6/itk/vtk44/VTK/Utilities/png 
> -I/image6/itk/vtk44/VTK/Utilities/tiff 
> -I/image6/itk/vtk44/VTK/Utilities/expat 
> -I/image6/itk/vtk44/VTK/Utilities/DICOMParser 
> -I/usr/utils/tktcl/tcl8.3.4/include -I/usr/utils/tktcl/tk8.3.4/include 
> -I/image6/itk/fltk-1.1.6 
> -I/image6/itk/InsightToolkit-2.8.1/bin/Utilities/zlib 
> -I/image6/itk/InsightApplications-2.8.1/SNAP/Common 
> -I/image6/itk/InsightApplications-2.8.1/SNAP/Common/ITKExtras 
> -I/image6/itk/InsightApplications-2.8.1/SNAP/Logic 
> -I/image6/itk/InsightApplications-2.8.1/SNAP/Logic/Common 
> -I/image6/itk/InsightApplications-2.8.1/SNAP/Logic/Framework 
> -I/image6/itk/InsightApplications-2.8.1/SNAP/Logic/ImageWrapper 
> -I/image6/itk/InsightApplications-2.8.1/SNAP/Logic/LevelSet 
> -I/image6/itk/InsightApplications-2.8.1/SNAP/Logic/Mesh 
> -I/image6/itk/InsightApplications-2.8.1/SNAP/Logic/Preprocessing 
> -I/image6/itk/InsightApplications-2.8.1/SNAP/Logic/Slicing 
> -I/image6/itk/InsightApplications-2.8.1/SNAP/Testing 
> -I/image6/itk/InsightApplications-2.8.1/SNAP/UserInterface/BasicComponents 
> -I/image6/itk/InsightApplications-2.8.1/SNAP/UserInterface/Common 
> -I/image6/itk/InsightApplications-2.8.1/SNAP/UserInterface/ImageIOWizard 
> -I/image6/itk/InsightApplications-2.8.1/SNAP/UserInterface/MainComponents 
> -I/image6/itk/InsightApplications-2.8.1/SNAP/UserInterface/MainComponents/Artwork 
> -I/image6/itk/InsightApplications-2.8.1/SNAP/UserInterface/SliceWindow 
> -I/image6/itk/InsightApplications-2.8.1/SNAP/UserInterface/Window3D -o 
> SNAP/CMakeFiles/itksnapui.dir/UserInterface/SliceWindow/PolygonScanConvert.o 
> -c 
> /image6/itk/InsightApplications-2.8.1/SNAP/UserInterface/SliceWindow/PolygonScanConvert.cxx 
> 
> 
> 
> 
>> Hi Martin,
>>
>>
>> Please try the following:
>>
>>
>>      Change the declaration of TessCallback in
>>      line 25 of the file PolygonScanConvert.cxx
>>      to be:
>>
>>             typedef GLvoid (*TessCallback)();
>>
>>      instead of the current:
>>
>>             typedef void (*TessCallback)();
>>
>>
>>
>> Please let us know if that works,
>>
>>
>>     Thanks
>>
>>
>>        Luis
>>
>>
>>
>> =======================
>> Martin M Connell wrote:
>>
>>> I have found SNAP to be an interesting application and have modified 
>>> a previous
>>> version (2.0.0) to store the 3d surface as an STL file using 
>>> STLWriter in VTK.
>>> The following error is generated when trying to compile the SNAP 
>>> application
>>> in InsightApplications-2.8.1.
>>> The compiler is gcc version 3.3.2 with fltk-1.1.6 and VTK4.4 on 
>>> Solaris 8.
>>> I have tried casting (gluTessCallback(tess,(GLenum) GLU_TESS_VERTEX, 
>>> (GLvoid(*)(void)) glVertex3dv) ) without success.
>>> Can anyone suggest a solution to this problem?
>>>
>>> Martin Connell
>>> ******************************************************************************* 
>>> Building CXX object
>>> SNAP/CMakeFiles/itksnapui.dir/UserInterface/SliceWindow/PolygonScanConvert.o 
>>> /image6/itk/InsightApplications-2.8.1/SNAP/UserInterface/SliceWindow/PolygonScanConvert.cxx: 
>>> In
>>>      static member function `static void
>>>      PolygonScanConvertBase::RasterizeFilled(double*, unsigned int,
>>> unsigned int,
>>>      unsigned int, unsigned int, void*)':
>>> /image6/itk/InsightApplications-2.8.1/SNAP/UserInterface/SliceWindow/PolygonScanConvert.cxx:49: 
>>> error:
>>> invalid
>>>      conversion from `void (*)()' to `GLvoid (*)(...)'
>>> /image6/itk/InsightApplications-2.8.1/SNAP/UserInterface/SliceWindow/PolygonScanConvert.cxx:50: 
>>> error:
>>> invalid
>>>      conversion from `void (*)()' to `GLvoid (*)(...)'
>>> /image6/itk/InsightApplications-2.8.1/SNAP/UserInterface/SliceWindow/PolygonScanConvert.cxx:51: 
>>> error:
>>> invalid
>>>      conversion from `void (*)()' to `GLvoid (*)(...)'
>>> /image6/itk/InsightApplications-2.8.1/SNAP/UserInterface/SliceWindow/PolygonScanConvert.cxx:53: 
>>> error:
>>> invalid
>>>      conversion from `void (*)()' to `GLvoid (*)(...)'
>>> /image6/itk/InsightApplications-2.8.1/SNAP/UserInterface/SliceWindow/PolygonScanConvert.cxx:55: 
>>> error:
>>> invalid
>>>      conversion from `void (*)()' to `GLvoid (*)(...)'
>>> gmake[2]: ***
>>> [SNAP/CMakeFiles/itksnapui.dir/UserInterface/SliceWindow/PolygonScanConvert.o] 
>>> Error 1
>>> gmake[1]: *** [SNAP/CMakeFiles/itksnapui.dir/all] Error 2
>>> g
>>>
>>>
>>>
>>> _______________________________________________
>>> Insight-users mailing list
>>> Insight-users at itk.org
>>> http://www.itk.org/mailman/listinfo/insight-users
>>>
>>>
>>
>>
>>
> 
> 
> 
> 
> 




More information about the Insight-users mailing list