[vtkusers] medial line extraction
Bayliss, Chris (Chicago)
cbayliss at gnresound.com
Mon May 14 11:03:31 EDT 2012
Joao,
Infovis should be added to the cmakelists file of your project, not the cmakelists file of the Graphics folder. See example below. You should remove the infovis link in the graphics folder cmakelists file.
PROJECT(your project)
IF(NOT VTK_BINARY_DIR)
FIND_PACKAGE(VTK REQUIRED)
IF(NOT VTK_USE_RENDERING)
MESSAGE(FATAL_ERROR "Example ${your project} requires VTK_USE_RENDERING.")
ENDIF(NOT VTK_USE_RENDERING)
INCLUDE(${VTK_USE_FILE})
ENDIF(NOT VTK_BINARY_DIR)
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
FIND_PACKAGE(VTK)
IF(VTK_FOUND)
INCLUDE (${USE_VTK_FILE})
LINK_LIBRARIES( vtkHybrid vtkRendering vtkGraphics vtkImaging vtkIO vtkFiltering vtkCommon vtkInfovis)
IF (${VTK_MAJOR_VERSION} GREATER 4)
LINK_LIBRARIES( vtkWidgets )
ENDIF (${VTK_MAJOR_VERSION} GREATER 4)
ENDIF(VTK_FOUND)
ADD_EXECUTABLE(your project your project.cxx )
TARGET_LINK_LIBRARIES( vtkRendering )
Hopefully this will fix your issue, I did not get the errors you described. I am not familiar with ubuntu, so I am afraid I cannot comment on any issues that may be specific to that operating system.
Chris
From: João Domingos [mailto:joao.sousa.domingos at gmail.com]
Sent: Saturday, May 12, 2012 4:32 AM
To: Bayliss, Chris (Chicago)
Subject: Re: [vtkusers] medial line extraction
Chris,
Tried to do it again the same way, with a new vtk 5.8 folder, and I got this error (now without python wrapper and shared libraries - which can be set in ccmake - default cmake configuration):
Building CXX object IO/CMakeFiles/vtkIO.dir/vtkRowQueryToTable.cxx.o
[ 54%] Building CXX object IO/CMakeFiles/vtkIO.dir/vtkArrayReader.cxx.o
[ 54%] Building CXX object IO/CMakeFiles/vtkIO.dir/vtkArrayWriter.cxx.o
[ 54%] Building CXX object IO/CMakeFiles/vtkIO.dir/vtkIOInstantiator.cxx.o
Linking CXX static library ../bin/libvtkIO.a
[ 54%] Built target vtkIO
make: *** [all] Error 2
What do you think it might be? To build vtk I am considering I do not have to include the folder Infovis in the CMakeLists.txt of the Graphics folder..
Many thanks,
Joao
On 12 May 2012 09:01, João Domingos <joao.sousa.domingos at gmail.com> wrote:
Dear Chris,
Thank you for your help. I knew about the filter but I was never able to rebuild VTK with it... and still haven't. I have vtk 5.8 on ubuntu, added the 'tkPowerCrustSurfaceReconstruction.cxx' right after the line 'SET( Kit_SRCS' in the CMakeLists.txt. When I do sudo make install (after cmake) the following error appears:
/opt/VTK/Graphics/vtkPowerCrustSurfaceReconstruction.cxx:1341:55: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/opt/VTK/Graphics/vtkPowerCrustSurfaceReconstruction.cxx:1341:55: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/opt/VTK/Graphics/vtkPowerCrustSurfaceReconstruction.cxx:1341:55: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/opt/VTK/Graphics/vtkPowerCrustSurfaceReconstruction.cxx:1341:55: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/opt/VTK/Graphics/vtkPowerCrustSurfaceReconstruction.cxx:1341:55: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/opt/VTK/Graphics/vtkPowerCrustSurfaceReconstruction.cxx: In function 'void adapted_main()':
/opt/VTK/Graphics/vtkPowerCrustSurfaceReconstruction.cxx:1554:66: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/opt/VTK/Graphics/vtkPowerCrustSurfaceReconstruction.cxx: In function 'simplex* build_convex_hull(Coord* (*)(), long int (*)(site), short int, short int)':
/opt/VTK/Graphics/vtkPowerCrustSurfaceReconstruction.cxx:4099:25: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/opt/VTK/Graphics/vtkPowerCrustSurfaceReconstruction.cxx: At global scope:
/opt/VTK/Graphics/vtkPowerCrustSurfaceReconstruction.cxx:11404:46: error: declaration of 'double erand48(short unsigned int*)' has a different exception specifier
/opt/VTK/Graphics/vtkPowerCrustSurfaceReconstruction.cxx:11328:8: error: from previous declaration 'double erand48(short unsigned int*) throw ()'
/opt/VTK/Graphics/vtkPowerCrustSurfaceReconstruction.cxx: In function 'double erand48(short unsigned int*)':
/opt/VTK/Graphics/vtkPowerCrustSurfaceReconstruction.cxx:11430:32: error: declaration of 'double erand48(short unsigned int*)' has a different exception specifier
/opt/VTK/Graphics/vtkPowerCrustSurfaceReconstruction.cxx:11404:15: error: from previous declaration 'double erand48(short unsigned int*) throw ()'
make[2]: *** [Graphics/CMakeFiles/vtkGraphics.dir/vtkPowerCrustSurfaceReconstruction.cxx.o] Error 1
make[1]: *** [Graphics/CMakeFiles/vtkGraphics.dir/all] Error 2
make: *** [all] Error 2
Did you have this error?
Your help is much appreciated!
Joao
On 11 May 2012 19:33, Bayliss, Chris (Chicago) <cbayliss at gnresound.com> wrote:
I was able to resolve my issue with the vtkPowerCrustSurfaceReconstruction Filter. Following these steps suggested by Tim Hutton, in combination with linking vtkinfovis in the cmakelists file of my project fixed the problem.
1. add the .cxx and .h files to the Graphics Library
2. add the line vtkPowerCrustSurfaceReconstruction.cxx to the CMakeLists.txt in the Graphics directory.
3. If you have VTK 5.8 or later, you do not need to comment out the VTK_GRAPHICS_EXPORT line of the .h file.
4. Add vtkinfovis to the Link_Libraries line of the cmakelists file of your project.
5. Re-build VTK, and re-build your project with cmake.
I was able to get the medial sheet and axis of a polydata shape using the vtkPowerCrustSurfaceReconstruction filter and the vtkDijkstraGraphGeodesicPath filer.
Chris
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Bayliss, Chris (Chicago)
Sent: Friday, May 11, 2012 10:15 AM
To: João Domingos; vtkusers at vtk.org
Subject: Re: [vtkusers] medial line extraction
Joao,
To my knowledge, the vtkPowerCrustSurfaceReconstruction filter can calculate the medial sheet of a shape. From the medial sheet, the medial axis can be found using vtkDijkstraGraphGeodesicPath.
The Powercrust filter is not part of the standard VTK release, so you need to add this class to your library. I have not been able to successfully implement the Powercurst filter personaly.
Perhaps, someone who has used it could provide some detailed instructions, such as: the folder they added it to, exact modifications to the cmake.lists files, and any additional steps required to implement this filter. I have found some instructions on the mailing list and on some discussion boards, but so far it has not worked for me.
Regards,
Chris
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of João Domingos
Sent: Friday, May 11, 2012 3:21 AM
To: vtkusers at vtk.org
Subject: [vtkusers] medial line extraction
Good morning everyone!
Currently I find 3D deformable models (meshes) of slightly different shapes in my datasets. What I need now, is a way to extract the central line/medial axis of those meshes or surfaces (I have both). From your knowledge what is out there already implemented that can do this (preferably in a quick way)?
Many thanks,
Joao
**** GN GROUP NOTICE - AUTOMATICALLY INSERTED ****
The information in this e-mail (including attachments, if any) is considered confidential and is intended only for the recipient(s) listed above. Any review, use, disclosure, distribution or copying of this e-mail is prohibited except by or on behalf of the intended recipient. If you have received this email in error, please notify me immediately by reply e-mail, delete this e-mail, and do not disclose its contents to anyone. Any opinions expressed in this e-mail are those of the individual and not necessarily the GN group. Thank you.
******************** DISCLAIMER END ************************
**** GN GROUP NOTICE - AUTOMATICALLY INSERTED ****
The information in this e-mail (including attachments, if any) is considered confidential and is intended only for the recipient(s) listed above. Any review, use, disclosure, distribution or copying of this e-mail is prohibited except by or on behalf of the intended recipient. If you have received this email in error, please notify me immediately by reply e-mail, delete this e-mail, and do not disclose its contents to anyone. Any opinions expressed in this e-mail are those of the individual and not necessarily the GN group. Thank you.
******************** DISCLAIMER END ************************
**** GN GROUP NOTICE - AUTOMATICALLY INSERTED ****
The information in this e-mail (including attachments, if any) is considered confidential and is intended only for the recipient(s) listed above. Any review, use, disclosure, distribution or copying of this e-mail is prohibited except by or on behalf of the intended recipient. If you have received this email in error, please notify me immediately by reply e-mail, delete this e-mail, and do not disclose its contents to anyone. Any opinions expressed in this e-mail are those of the individual and not necessarily the GN group. Thank you.
******************** DISCLAIMER END ************************
**** GN GROUP NOTICE - AUTOMATICALLY INSERTED ****
The information in this e-mail (including attachments, if any) is considered confidential and is intended only for the recipient(s) listed above. Any review, use, disclosure, distribution or copying of this e-mail is prohibited except by or on behalf of the intended recipient. If you have received this email in error, please notify me immediately by reply e-mail, delete this e-mail, and do not disclose its contents to anyone. Any opinions expressed in this e-mail are those of the individual and not necessarily the GN group. Thank you.
******************** DISCLAIMER END ************************
**** GN GROUP NOTICE - AUTOMATICALLY INSERTED ****
The information in this e-mail (including attachments, if any) is considered confidential and is intended only for the recipient(s) listed above. Any review, use, disclosure, distribution or copying of this e-mail is prohibited except by or on behalf of the intended recipient. If you have received this email in error, please notify me immediately by reply e-mail, delete this e-mail, and do not disclose its contents to anyone. Any opinions expressed in this e-mail are those of the individual and not necessarily the GN group. Thank you.
******************** DISCLAIMER END ************************
**** GN GROUP NOTICE - AUTOMATICALLY INSERTED ****
The information in this e-mail (including attachments, if any) is considered confidential and is intended only for the recipient(s) listed above. Any review, use, disclosure, distribution or copying of this e-mail is prohibited except by or on behalf of the intended recipient. If you have received this email in error, please notify me immediately by reply e-mail, delete this e-mail, and do not disclose its contents to anyone. Any opinions expressed in this e-mail are those of the individual and not necessarily the GN group. Thank you.
******************** DISCLAIMER END ************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120514/0939fb0c/attachment.htm>
More information about the vtkusers
mailing list