shamantou blog site

shamantou@gmail.com

导航

VTK学习笔记(3)VTK FAQ

http://www.kitware.com/products/vtktextbook.html The Visualization Toolkit, An Object-Oriented Approach to 3D Graphics]), a C++ class library, and Tcl, Python and Java implementations based on the class library.

For more information, see http://www.vtk.org and http://www.kitware.com.

[edit]
http://www.vtk.org/files/release/5.0/

Nightly development releases are available at:

http://www.vtk.org/files/nightly/

See http://www.vtk.org/get-software.php for more information.

[edit]
http://www.vtk.org/contribute.php for information on contributing to VTK.

For some ideas take a look at some of the entries in the "Changes to the VTK API" FAQ section, for example: What changes are being considered for VTK

We now have a bug tracker that allow keeping track of any bug you could find. See BugTracker. You'll need an email to report a bug. To improve the chance of a bug being fixed, do not hesisitate to add as many details as possible, a demo sample code + sample data is always a good idea. Providing a patch almost guarantees that your patch will be incorporated into VTK.

[edit]
http://www.kitware.com .)

[edit]
http://www.vtk.org/mailman/listinfo/vtkusers

To search the list archives go to: http://www.kitware.com/search.html

There is also a newsgroup that mirrors the mailinglist. At this point it seems that mirror is down. Mail to the mailinglist used to be posted the newsgroup, but posts on the newsgroup were not sent to the mailinglist. The newsgroup was located at: news://scully.esat.kuleuven.ac.be/vtk.mailinglist

http://www.gmane.org is a bidirectional mail-to-news gateway that carries the vtkusers mailing list. Its located here: news://news.gmane.org/gmane.comp.lib.vtk.user or here: http://news.gmane.org/gmane.comp.lib.vtk.user. vtkusers mails have been archived since April 2002 and they never expire. You can read and send mails to the vtkusers list but sent mail will bounce back without having subscribed to the list first.

[edit]
http://www.vtk.org/pipermail/vtkusers/

You can search the archive at: http://www.kitware.com/search.html

[edit]edit]
http://public.kitware.com/dashboard.php?name=vtk

VTK uses Dart to perform builds, run tests, and generate dashboards. You can find more information about Dart at: http://public.kitware.com/Dart/

You can help improve the quality of VTK by supplying the authors with Tcl scripts that can be used as or turned into regression tests. A good regression test will:

Cover code that is not already covered.
Illustrate a bug that is occuring now or that has occurred in the past.
Use data that is on the 2nd Edition book CDROM or use "small" data files or use no data at all.
Optionally, produce an interesting result.
Currently almost all regression tests are written in Tcl.

Please send your Tcl regression tests to: mailto:wlorens1@mail.nycap.rr.com

Bill will evaluate them for applicability and integrate them into the nightly test process.

[edit]
The Visualization Toolkit from Kitware Inc.
Purchase the book VTK Users Guide from Kitware Inc.
Download the source code and/or binaries (available on Windows) and work through the examples (there are 400-500 examples).
To learn the innards of VTK, you can attend a VTK course or sponsor a VTK course at your site through Kitware. http://www.kitware.com/products/index.html
Buy Bill a beer and get him talking about VTK
[edit]
http://www.catb.org/~esr/faqs/smart-questions.html
Please do read it and follow his advice. Thanks!

Please also remember the following when you post your messages to the VTK mailing lists.

Mention the version of VTK you are using and the version of the compiler or scripting language you are using.
Mention your platform, OS and their versions.
Include hardware details if relevant.
Include all relevant error messages (appropriately trimmed of course).
The lists have a very large number of subscribers (in the thousands), so please keep messages to the point.
Avoid HTML emails.
Use a sensible and descriptive subject line.
Do NOT post large data files or images to the list. Instead put them in your web page and mention the URLs.
Quote the messages you reply to appropriately. Remove unnecessary details.
When asking a question or reporting a problem try to include a small example program that demonstrates the problem. Make sure that this example program is as small as you can make it, simple (and uses VTK alone), complete and demonstrates the problem adequately. Doing this will go a *long way* towards getting a quick and meaningful response.

Sometimes you might not get any acceptable response. This happens bacause the others think the question has either been already answered elsewhere (the archives, FAQ and google are your friends), or believe that you have not done enough homework to warrant their attention, or they don't know the answer or simply don't have the time to answer. Please do be patient and understanding. Most questions are answered by people volunteering their time to help you.

Happy posting!

[edit]
http://www.di.uniovi.es/~cernuda/noprog_ENG.html
[edit]
FDA Guidelines for Software Developement

[edit]
http://cvsgrab.sourceforge.net/

Just download the script and type something like:

cvsgrab -rootUrl http://public.kitware.com/cgi-bin/cvsweb.cgi/ -packagePath VTK -destDir . -proxyUser xxx -proxyPassword xxx -proxyHost xxx -proxyPort xx
(Thanks to Ingo H. de Boer)

Also cvsgrab support the following option to access a particular branch:

-tag [optional] The version tag of the files to download
For example to get the latest 4.4 branch:

cvsgrab -rootUrl http://public.kitware.com/cgi-bin/cvsweb.cgi/ -packagePath VTK -destDir . -proxyUser xxx -proxyPassword xxx -proxyHost xxx -proxyPort xxx -tag release-4-4
[edit]edit]edit]
Does VTK support Tcl/Tk 8.4?.

[edit]
http://basic.netmeg.net/godzilla/
YMMV...

[edit]edit]edit]edit]edit]
http://www.google.com/url?sa=D&q=http%3A%2F%2Fpublic.kitware.com%2Fpipermail%2Fvtkusers%2F2003-October%2F070054.html

[edit]
http://www.kitware.com/products/vtkguide.html).

Alternative sources for information are the appendix of the book which has nice one line descriptions of what the different objects do and the VTK man pages (http://www.vtk.org/doc/nightly/html/classes.html).

Additionally, the VTK man pages feature a "Related" section that provide links from each class to all the examples or tests using that class (http://www.vtk.org/doc/nightly/html/pages.html). This information is also provided in each class man page under the "Tests" or "Examples" sub-section.

Some useful books are listed at http://www.vtk.org/buy-books.php

[edit]
http://www.kitware.com/products/vtktextbook.html The Visualization Toolkit, An Object-Oriented Approach to 3D Graphics] or the User's Guide for details about structured grid and poly data file formats.

‡ The class vtkGenericEnSightReader allows the user to read an EnSight data set without a priori knowledge of what type of EnSight data set it is (among vtkEnSight6BinaryReader, vtkEnSight6Reader, vtkEnSightGoldBinaryReader, vtkEnSightGoldReader, vtkEnSightMasterServerReader, vtkEnSightReader).

For any other file format you may want to search for a converter to a known VTK file format, more info on: http://www.tech-edv.co.at/lunix/UTILlinks.html

[edit]edit]edit]edit]
http://www.dclunie.com/medical-image-faq/html/part8.html

Sebastien BARRE wrote a free DICOM converter, named dicom2, that can be used to convert medical images to raw format. This tool is a command line program and does not provide any GUI at the moment. http://dicom2.barre.nom.fr/

There is a special section dedicated to the VTK: http://dicom2.barre.nom.fr/how-to.html, then "Convert to raw (vtk)"

The following page also provide links to several other DICOM converters: http://www.barre.nom.fr/medical/samples/index.html#links

Finally in VTK 4.4 you have access to a simple vtkDICOMImageReader [1]

For a more elaborate DICOM library that support compressed jpeg, go to [2]

[edit]edit]
How to handle large data sets in VTK. Many of its suggestions will improve VTK's performance significantly for many datasets.

If you still find VTK slow, please let us know and send us an example (to mailto:kitware@kitware.com). In the past there have been some filters that simply were not written to be fast. When we come across one of these we frequently can make minor changes to the filter that will make it run much more quickly. In fact many changes in the past couple years have been this type of performance improvement.

[edit]edit]edit]edit]edit]edit]
VTK_Autoconf page for more info.

[edit]
VTK Coding Standards. This is particularly important if you plan to contribute back to VTK. Most C++ code editors will help you with indenting, but the indenting may differ significantly from that prescribed by the VTK Coding Standards. Fortunately, most editors have enough options to allow you to change the indention enough to get at least close to the VTK-style indentation.

Below is a list of C++ editors and some suggestions on getting the indentation VTK compliant. If you use a popular editor that is not listed here, please feel free to contribute.

[edit]edit]
Elisp Code for VTK-Style C Indentation in your .emacs file.

[edit]edit]edit]
ATI Mobility Radeon 9600)
MacOSX graphics cards -- fails some VTK tests
Intel Extreme Graphics -- fails some VTK tests




[edit]
http://www.microsoft.com/softlib/mslfiles/Opengl95.exe or ftp://ftp.microsoft.com/softlib/mslfiles/Opengl95.exe
This is a self extracting archive which contains these files. Simply place them in your windows system directory.
Link the code by selecting Build, Build MaceProject.exe. I still get one warning when I do this, but it appears to be harmless

When you go to run the program, it will bomb out unless it can find 2 DLLs: Opengl32.dll and Glu32.dll. These need to be located either in the project directory or the C:\WINDOWS directory. These files are supplied on the vtk CD-ROM (in the vtk\bin directory).

[edit]edit]edit]edit]
http://www.barre.nom.fr/vtk/bench.html

It is not a "real world" benchmark, but provide synthetic results comparing different hardware running VTK:

http://purl.oclc.org/NET/rriv/vtk/sphere-bench

[edit]edit]
http://www.python.org/, you'll note that when you try to run a VTK Python example you get something similar to the following error message:

from vtkCommonPython import * ImportError: dynamic module does not define init function (initvtkCommonPython)
This is because BCC32 prepends an underscore ("_") to all exported functions, so (in this case) the vtkCommonPython.dll contains a symbol _initvtkCommonPython which Python does not find. All kits (e.g. Rendering, Filtering, Patented) will suffer from this problem.

The solution is to create Borland module definition in the VTK binary (output) directory, in my case VTK/bin. You have to do this for all kits that you are planning to use in Python. Each .def file must have the same basename as the DLL, e.g. "vtkCommonPython.def" for vtkCommonPython.dll and it must be present at VTK link time. The def file contains an export alias, e.g.:

EXPORTS initvtkCommonPython=_initvtkCommonPython
The Borland compiler will create an underscore-less alias in the DLL file and Python will be able to load it as a module.

[edit]
http://www.vtk.org/files/misc/python_aix.diff

[edit]
VTK Classes. It has links to RenderWindow objects that are probably easier to use than rebuilding VTK with Mesa.

[edit]
http://vtk.org/pipermail/vtkusers/2004-February/072155.html

You need to do one of two things to get your executable to properly register with the Mac OS X window manager:

1) Add a resource fork to the file using the command "Rez Carbon.r -o foo". This will add some resources to your file, but note that this means that you now have a unique Mac OS X file. You cannot back it up with tar or zip without losing information. Resource forks are depreciated in the current Mac OS in favor of...

2) Package your executable within a Mac OS X application package: mkdir -p foo.app/Contents/MacOS cp foo foo.app/Contents/MacOS


Everything can now be done through the use of ADD_EXECUTABLE + BUNDLE if using cmake 2.0.5.

On a side note here is a link to apple website on how to install X11 on Mac OS X

[edit]edit]edit]edit]edit]edit]edit]edit]
http://www.vtk.org/files/misc/Upgrading.zip
Added special methods to data arrays to replace methods like
tc SetTCoord i x y 0
or

vc SetVector i vx vy vz
in interpreted languages (Tcl, Python, Java). Use:

tc SetTuple2 i x y
or

vc SetTuple3 i vx vy vz
Improved support for parallel visualization: vtkMultiProcessController and it's sub-classes have been re-structured and mostly re-written. The functionality of vtkMultiProcessController have been re-distributed between vtkMultiProcessController and vtkCommunicator. vtkCommunicator is responsible of sending/receiving messages whereas vtkMultiProcessController (and it's subclasses) is responsible of program flow/control (for example processing rmi's). New classes have been added to the Parallel directory. These include vtkCommunicator, vtkMPIGroup, vtkMPICommunicator, vtkSharedMemoryCommunicator, vtkMPIEventLog... There is now a tcl interpreter which supports parallel scripts. It is called pvtk and can be build on Windows and Unix. Examples for both Tcl and C++ can be found in the examples directories.
vtkSocketCommunicator and vtkSocketController have been added. These support message passing via BSD sockets. Best used together with input-output ports.
Since it was causing very long compile times (it essentially includes every vtk header file) and it was hard to maintain (you had to add a line whenever you added a class to VTK) vtk.h was removed. You will have to identify the header files needed by your application and include them one by one.
vtkIterativeClosestPointTransform has been added. This class is an implementation of the ICP algorithm. It matches two surfaces using the iterative closest point (ICP) algorithm. The core of the algorithm is to match each vertex in one surface with the closest surface point on the other, then apply the transformation that modify one surface to best match the other (in a least square sense).
The SetFileName, SaveImageAsPPM and related methods in vtkRenderWindow have been removed. vtkWindowToImageFilter combined with any of the image writers provides greater functionality.
Support for reading and writing PGM and JPEG images has been included.
Methods with parameters of the form "type param[n]" are wrapped. Previously, these methods were only wrapped if the array was declared 'const'. The python wrappers will allow values to be returned in the array.
The directory structure was completely reorganized. There are now subdirectories for Common (core common classes) Filtering (superclasses for filtering operations) Imaging (filters and sources that produce images or structured points) Graphics (filters or sources that produce data types other than ImageData and StructuredPoints) IO (file IO classes that do not require Rendering support) Rendering (all actors mappers annotation and rendering classes) Hybrid (typically filters and sources that require support from Rendering or both Imaging and Graphics) Parallel (parallel visualization support classes) Patented (patented classes) Examples (documented examples) Wrapping (support for the language wrappers). In many directories you will see a Testing subdirectory. The Testing subdirectories contain tests used to validate VTKs operation. Some tests may be useful as examples but they are not well documented.
The Build process for VTK now uses CMake (found at www.cmake.org) This replaces pcmaker on windows and configure on UNIX. This resolves some longstanding problems and limitation we were having with pcmaker and configure, and unifies the build process into one place.
[edit]
Text properties in VTK 4.2 FAQ entry for a full description of the change.

[edit]edit]edit]
http://www-courses.cs.uiuc.edu/~cs419/lic.pdf), maybe a couple terrain-decimation algorithms
Further integration of STL and other important C++ constructs (like templates)
VTK 4.4 (intermediate release, end of 2003)

convert APIs to double (done)
remove old callbacks (done)
blanking
ref count observers (done)
switch collections to use iterators (done)
improve copyright (done)
VTK 5.0 (major release, early 2005)

new pipeline mechanism (see Pipeline.pdf)
time support
true AMR support
[edit]edit]edit]
vtkTextProperty class has been added to VTK 4.2.

This class factorizes text attributes that used to be spread out and duplicated in many different classes (mostly 2D actors and text mappers). Among those attributes, font family, font size, bold/italic/shadow properties, horizontal and vertical justification, line spacing and offset have been retained, whereas new attributes like color and opacity have been introduced.

We tried to make sure that you can use a vtkTextProperty to modify text properties in the same way a vtkProperty can be used to modify the surface properties of a geometric object. In that regard, you should be able to share a vtkTextProperty between different actors or assign the same vtkTextProperty to an actor that offers multiple vtkTextProperty attributes (vtkXYPlot for example).

Here is a quick example:

vtkTextActor *actor0 = vtkTextActor::New(); actor0->GetTextProperty()->SetItalic(1); // vtkTextProperty *tprop = vtkTextProperty::New(); tprop->SetBold(1); // vtkTextActor *actor1 = vtkTextActor::New(); actor1->SetTextProperty(tprop); // vtkTextActor *actor2 = vtkTextActor::New(); actor2->SetTextProperty(tprop);
Backward compatibility issues*:
1) Color and Opacity:

The text color and text opacity settings are now controlled by the vtkTextProperty Color and Opacity attributes instead of the corresponding actor's color and opacity attributes. In the following example, those settings were controlled by the attributes of the vtkProperty2D attached to the vtkActor2D (vtkTextActor). The vtkTextProperty attributes should be used instead:

vtkTextActor *actor = vtkActor::New(); actor->GetProperty()->SetColor(...); actor->GetProperty()->SetOpacity(...);
becomes:

actor->GetTextProperty()->SetColor(...); actor->GetTextProperty()->SetOpacity(...);
To make migration easier for a while, we have set the vtkTextProperty default color to (-1.0, -1.0, -1.0) and the default opacity to -1.0. These "magic" values are checked by the underlying text mappers at rendering time. If they are found, the color and opacity of the 2D actor's vtkProperty2D are used, just as it was in VTK 4.1.

2) API (i.e. SetBold(), SetItalic(), etc)

Most of the VTK classes involving text used to provide their own text attributes like Bold, Italic, Shadow, FontFamily. Thus, each of those classes would duplicate the vtkTextMapper API through methods like SetItalic(), SetBold(), SetFontFamily(), etc.

Moreover, if one class had different text elements (say, for example, the title and the labels of a scalar bar), there was no way to modify the text properties of these elements separately.

The vtkTextProperty class has been created to address both issues, by obsoleting those duplicated attributes and methods and providing a unified way to access text properties, and by allowing each class to associate different vtkTextProperty to different text elements.

Migrating your code basically involves using the old API on your actor's vtkTextProperty instead of the actor itself. For example:

actor->SetBold(1);
becomes:

actor->GetTextProperty()->SetBold(1);
When a class provides different vtkTextProperty for different text elements, the TextProperty attribute is usually prefixed with that element type. Example: AxisTitleTextProperty, or AxisLabelTextProperty. This allows you to set different aspect for each text elements. If you want to use the same properties, you can either set the same values on each vtkTextProperty, or make both vtkTextProperty point to the same vtkTextProperty object. Example:

actor->GetAxisLabelTextProperty()->SetBold(1); actor->GetAxisTitleTextProperty()->SetBold(1);
or:

vtkTextProperty *tprop = vtkTextProperty::New(); tprop->SetBold(1); actor->SetAxisLabelTextProperty(tprop); actor->SetAxisTitleTextProperty(tprop);
or:

actor->SetAxisLabelTextProperty(actor->GetAxisTitleTextProperty()); actor->GetAxisTitleTextProperty()->SetBold(1);
The following list specifies the name of the text properties used in the VTK classes involving text.

vtkTextMapper:

you can still use the vtkTextMapper + vtkActor2D combination, but we would advise you to use a single vtkTextActor instead, this will give you maximum flexibility.
has 1 text prop: TextProperty, but although you have access to it, do not twwak it unless you are using vtkTextMapper with a vtkActor2D. In all other cases, use the text prop provided by the actor (see below).
vtkTextActor:

has 1 text prop: TextProperty.
vtkLabeledDataMapper:

has 1 text prop: LabelTextProperty.
vtkCaptionActor2D:

has 1 text prop: CaptionTextProperty.
vtkLegendBoxActor:

has 1 text prop: EntryTextProperty.
vtkAxisActor2D, vtkParallelCoordinatesActor, and vtkScalarBarActor:

have 2 text props: TitleTextProperty, LabelTextProperty.
vtkXYPlotActor:

has 3 text prop: TitleTextProperty (plot title), AxisTitleTextProperty, AxisLabelTextProperty (title and labels of all axes)
the legend box text prop (i.e. entry text prop) can be retrieved through actor->GetLegendBoxActor()->GetEntryTextProperty()
the X (or Y) axis text props (i.e. title and label text props) can be retrieved through actor->GetX/YAxisActor2D->GetTitle/LabelTextProperty(), and will override the corresponding AxisTitleTextProperty or AxisLabelTextProperty props as long as they remain untouched.
vtkCubeAxesActor2D:

has 2 text props: AxisTitleTextProperty, AxisLabelTextProperty (title and label of all axes)
the X (Y or Z) axis text props (i.e. title and label text props) can be retrieved through actor->GetX/Y/ZAxisActor2D->GetTitle/LabelTextProperty(), and will override the corresponding AxisTitleTextProperty or AxisLabelTextProperty props as long as they remain untouched.
[edit]edit]edit]edit]edit]edit]edit]
mailto:Carl.Horton@med.ge.com
As of VTK4.0 the following classes are known to use algorithms patented by Kitware, Inc.: vtkGridSynchronizedTemplates3D, vtkKitwareContourFilter.h, vtkSynchronizedTemplates2D, and vtkSynchronizedTemplates3D. The Kitware contact is:

Ken Martin Kitware 28 Corporate Drive, Suite 204, Clifton Park, NY 12065 Phone:1-518-371-3971 E-Mail: mailto:kitware@kitware.com

<< VTK学习笔记(2)自写的一个raw文件转换为单个切片形式的小程序 >>

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

最近发表

Powered By Z-Blog 1.8 Arwen Build 81206 Copyright 2006-2009 | ooplab.org | shamantou@gmail.com | 沪ICP备08011244号 | Some Rights Reserved.