|
|
| (7 intermediate revisions by the same user not shown) |
| Line 3: |
Line 3: |
| On-line documentation for vtkski is available at http://mike.kin.ucalgary.ca/vtkski/ . | | On-line documentation for vtkski is available at http://mike.kin.ucalgary.ca/vtkski/ . |
|
| |
|
| Also, see [[vtkMeshModel]] which contains some examples of using the class vtkMeshModel .
| | ==Building vtkski== |
|
| |
|
| ==Compiling and Installation==
| | See [[Bone lab libraries#Build Instructions]] . |
| | |
| ===Getting the source code===
| |
| | |
| Choose a place in your home directory that you want to use for the source code. For example
| |
| | |
| mkdir -p ~/code
| |
| cd ~/code
| |
| | |
| (Note that '~' gets automatically expanded to your home directory.)
| |
| | |
| Get the sources from the subversion repository.
| |
| | |
| svn checkout https://mike.kin.ucalgary.ca/svn/bonelab/trunk
| |
| | |
| See the section on svn for more info: [[Subversion (SVN)]] . | |
| | |
| ===Compiling===
| |
| | |
| From the vtkski project directory, create a build directory in trunk/Libraries and use cmake to configure the build:
| |
| | |
| mkdir build
| |
| cd build
| |
| cmake-gui ..
| |
| | |
| Here are some typical configuration options:
| |
| | |
| {| border="1" cellpadding="2" cellspacing="0"
| |
| |-
| |
| ! option
| |
| ! Setting
| |
| ! Comments
| |
| |- valign="top"
| |
| | VTK_DIR || /opt/vtk-5.6.0/lib/vtk-5.6 || Set this to wherever you installed VTK
| |
| |- valign="top"
| |
| | BONELAB_BUILD_LIBRARY_itkski || ON/OFF || Set this to OFF if you don't want to build itkski as well. In this case you won't need to have ITK installed or specify where it can be found.
| |
| |}
| |
| | |
| | |
| | |
| The most important cmake variable is <tt>VTK_DIR</tt>. If you intend to also build the paraview plugins, then you must build vtkski against the internal version of VTK inside the paraview build directory. (See [[Paraview development]] if you need to install ParaView). As an example, on my system I set <tt>VTK_DIR</tt> to <tt>/home/eric/source/paraview-3.8.0/build/VTK</tt>. You will also need to specify the boost include directory.
| |
| | |
| Then within build directory run:
| |
| | |
| make
| |
| | |
| ===Building Doxygen documentation===
| |
| | |
| To build the Doxygen documentation, set the cmake variable BUILD_DOCUMENTATION to ON. This variable is marked as advanced. You will need to have installed Doxygen ( http://www.doxygen.org/ ) in order to build the documentation.
| |
| | |
| The documentation is not automatically built with make (it takes a very long time to build). Instead, you will need to explicitly request it, like this:
| |
| make vtkskiDoxygenDoc
| |
| | |
| ====Installing the Doxygen documentation on mike.kin====
| |
| | |
| I recommend that you build the documentation with the cmake flag DOCUMENTATION_HTML_TARZ set to on (this variable is an advanced setting). Then the build process will automatically make a tar ball of all the HTML documentation, build/Utilities/Doxygen/vtkski-html.tar.gz , which is easy to copy over to mik.kin (using FTP or scp or the mounted Data0 volume).
| |
| | |
| The documentation needs to live in /Library/WebServer/Documents/vtkski . The commands would look something like this
| |
| tar xvzf vtkski-html.tar.gz
| |
| sudo rm -rf /Library/WebServer/Documents/vtkski # remove old docs
| |
| sudo mv html /Library/WebServer/Documents/vtkski
| |
| sudo chown -R root /Library/WebServer/Documents/vtkski
| |
|
| |
|
| ==Checklist for new vtkski classes== | | ==Checklist for new vtkski classes== |
Documentation for vtkski
[edit]
On-line documentation for vtkski is available at http://mike.kin.ucalgary.ca/vtkski/ .
See Bone lab libraries#Build Instructions .
Checklist for new vtkski classes
[edit]
- Select a category for your new class, for example 'IO', and put your source files in that directory.
- Modify the CmakeLists.txt file in that directory to add your new source files to the list of source files.
- Build vtkski and make sure that your class compiles.
- Refer to Creating VTK Classes for important coding style tips.
- Add your class, with a brief description, to Class List for vtkski.
For help writing VTK classes, refer to the book "VTK User's Guide", Part III, "Developer's Guide". There are a couple of copies in the lab.