Editing
Software Development Platforms
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===gdcm=== You can get gdcm from http://sourceforge.net/apps/mediawiki/gdcm/index.php?title=Downloads . tar xvzf gdcm-2.2.0.tar.gz mkdir gdcm-2.2.0-build cd gdcm-2.2.0-build source /opt/vtk-5.10.0/setenv.sh ccmake ../gdcm-2.2.0 CMake variables of note are: {| border="1" cellpadding="2" cellspacing="0" |- ! option ! Setting |- valign="top" | CMAKE_BUILD_TYPE || Release |- valign="top" | CMAKE_INSTALL_PREFIX || /opt/gdcm-1.3.2 |- valign="top" | GDCM_BUILD_SHARED_LIBS || ON |- valign="top" | GDCM_USE_VTK || ON |- valign="top" | GDCM_WRAP_PYTHON || ON |- valign="top" | PYTHON_DIR || /lib/python2.7 |- valign="top" | SWIG_EXECUTABLE || /opt/swig-2.0.7/bin/swig |} Also if you installed a newer version of python than the system default (which you should have), then you'll need to make sure that CMake is finding that, and not the system default python. Check the following CMake variables. {| border="1" cellpadding="2" cellspacing="0" |- ! option ! Setting |- valign="top" | PYTHON_INCLUDE_DIR || /Library/Frameworks/Python.framework/Versions/2.7/Headers |- valign="top" | PYTHON_LIBRARY || /Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib |} make I got an error "i686-apple-darwin11-llvm-g++-4.2: -compatibility_version only allowed with -dynamiclib". To fix this, run "make VERBOSE=1", then repeat the last command (including the preceeding cd command), replacing -bundle with -dynamiclib. Once you do that, you have to also create the links (after dc'ing back to the root build directory): cd bin ln -s libvtkgdcmPython.2.2.0.so libvtkgdcmPython.2.2.so ln -s libvtkgdcmPython.2.2.so libvtkgdcmPython.so cd .. sudo make install After installation there will be a file /opt/gdcm-2.2.0/lib/vtkgdcm.py . This has a lot of pointless (for our installation) stuff in it, and generates an irrelevant error message. So just replace the entire contents of that file with this: from libvtkgdcmPython import * Here is the setenv.sh script: <source lang=bash> #!/bin/bash source /opt/vtk-5.10.0/setenv.sh SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" export GDCM_ROOT="${SCRIPT_DIR}" export GDCM_DIR="${SCRIPT_DIR}" remove_path PATH '/.+/gdcm(-[^/]+)?/bin/?$' add_path PATH "${GDCM_ROOT}/bin" remove_path DYLD_LIBRARY_PATH '/.+/gdcm(-[^/]+)?/lib/?' add_path DYLD_LIBRARY_PATH "${GDCM_ROOT}/lib" remove_path PYTHONPATH '/.+/gdcm(-[^/]+)?/lib/?' add_path PYTHONPATH "${GDCM_ROOT}/lib" </source>
Summary:
Please note that all contributions to bone.wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BoneWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
associated-pages
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Documents
Recent changes
Help
Tools
What links here
Related changes
Page information