VTK: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
Line 83: Line 83:
To get started, create a new directory called /home/username/Dashboards/VTK. It does not actually have to be in this exactly directory, but this path will be used throughout this example to make the ideas concrete. cd to your new directory and run these commands to check out an initial version of VTK and data sets used for testing.
To get started, create a new directory called /home/username/Dashboards/VTK. It does not actually have to be in this exactly directory, but this path will be used throughout this example to make the ideas concrete. cd to your new directory and run these commands to check out an initial version of VTK and data sets used for testing.


<source lang="text">
[[Example CMake Dashboard file|Here]] is an example cmake dashboard file.
cvs -d :pserver:anonymous:vtk@public.kitware.com:/cvsroot/VTK co VTK
cvs -d :pserver:anonymous:vtk@public.kitware.com:/cvsroot/VTKData co VTKData
</source>
 
The source code is now in /home/username/Dashboards/VTK/VTK and the testing data sets are in /home/username/Dashboards/VTK/VTKData
 
Create a file called dashboard.cmake, the contents of which should be similar to this example:
<source lang="text">
cmake_minimum_required(VERSION 2.6.3)
 
set(CTEST_DASHBOARD_ROOT "/home/username/Dashboards/VTK")
set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/VTK") #expands to /home/username/Dashboards/VTK/VTK
 
set(CTEST_SITE "your_name.your_organization") # this can be whatever you like
set(CTEST_BUILD_NAME "Linux-gcc-4.4.0") # this should be a description of your system - e.g. operating system, compiler version
 
 
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/bin") #expands to /home/username/Dashboards/VTK/bin
set(CTEST_DATA_DIRECTORY "${CTEST_DASHBOARD_ROOT}/VTKData") #expands to /home/username/Dashboards/VTK/VTKData
 
# do not change these
set(CTEST_BUILD_CONFIGURATION Debug)
set(CTEST_TEST_TIMEOUT 360)
set(CTEST_COVERAGE_COMMAND "/usr/bin/gcov") # REQUIRED with new ctest script style.
 
#this should be changed to match your system
set(CTEST_CMAKE_GENERATOR "Unix Makefiles") #this example is for linux, maybe someone can provide a similar file for windows?
set(CTEST_BUILD_COMMAND "make")
 
find_program(CTEST_CVS_COMMAND NAMES cvs) #tell cmake to use cvs to update
set(CTEST_UPDATE_COMMAND "cvs")
set(CTEST_UPDATE_OPTIONS "-dAP")
 
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) #start fresh each time the dashboard build tests are performed
 
ctest_start(Experimental) # I think you can change this to "Nightly"?
 
#updates
ctest_update(SOURCE "${CTEST_DATA_DIRECTORY}") #update (using cvs) the data sets before testing
ctest_update(SOURCE "$${CTEST_SOURCE_DIRECTORY}") #update (using cvs) the source code before building
 
#setup and build
ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}")
ctest_read_custom_files("${CTEST_BINARY_DIRECTORY}")
ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}")
 
#run tests
ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}")
 
#not sure what this is?
ctest_coverage(BUILD "${CTEST_BINARY_DIRECTORY}")
 
#submit the results to the dashboard
ctest_submit()
</source>


You will probably want to submit a dashboard every night, so you can add a cronjob. Run 'crontab -e' and enter the following command
You will probably want to submit a dashboard every night, so you can add a cronjob. Run 'crontab -e' and enter the following command

Revision as of 15:11, 10 August 2009

vtk-logo2.jpg
The Visualization ToolKit (VTK) is an open source, freely available software system for 3D computer graphics, image processing, and visualization used by thousands of researchers and developers around the world. VTK consists of a C++ class library, and several interpreted interface layers including Tcl/Tk, Java, and Python. Professional support and products for VTK are provided by Kitware, Inc. (www.kitware.com) VTK supports a wide variety of visualization algorithms including scalar, vector, tensor, texture, and volumetric methods; and advanced modeling techniques such as implicit modelling, polygon reduction, mesh smoothing, cutting, contouring, and Delaunay triangulation. In addition, dozens of imaging algorithms have been directly integrated to allow the user to mix 2D imaging / 3D graphics algorithms and data.


Example Usage (C++)

These are fully independent, compilable examples. There is significant overlap in the examples, but they are each intended to illustrate a different concept and be fully stand alone compilable.

Please add examples in your areas of expertise!

Getting Started

Working with PolyData

Other File Types

Data Structures

Filters

Visualization


Example Usage (Python)

Getting Started

Working with PolyData

Creating a dashboard submission

It is impossible for developers to test code on every operating system, compiler, and configuration. By creating a dashboard submission, you can help them find bugs that could be affecting many users but are transparent to some developers. The idea is to get the latest source code, compile it, and run a battery of tests - reporting any compile, build, and test errors to a system which very neatly arranges the results (http://www.cdash.org/CDash/index.php?project=VTK).

It is recommended to not use the same build you work with daily for you dashboard submission. If there is a problem with the nightly cvs, your code may not compile the next day!

To get started, create a new directory called /home/username/Dashboards/VTK. It does not actually have to be in this exactly directory, but this path will be used throughout this example to make the ideas concrete. cd to your new directory and run these commands to check out an initial version of VTK and data sets used for testing.

Here is an example cmake dashboard file.

You will probably want to submit a dashboard every night, so you can add a cronjob. Run 'crontab -e' and enter the following command <source lang="text"> 0 1 * * * ctest -S /home/username/Dashboards/VTK/dashboard.cmake -V > /home/username/Dashboards/VTK/dashboard.log 2>&1 </source>

This says "at 1:00 AM, every day, every month, run the dashboard tests and log verbose output to dashboard.log".

Administrative Topics

Current Projects

External Links

  • IMTEK Mathematica Supplement (IMS), the Open Source IMTEK Mathematica Supplement (IMS) interfaces VTK and generates ParaView batch scripts
  • [1], VTK examples in C# (Visual Studio 5.0 and .NET 2.0)



VTK: [Welcome | Site Map]