1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411
|
.. _chap-example_guide:
********************************
Module Descriptions and Examples
********************************
.. index:: VisTrails VTK modules
VisTrails VTK modules
=====================
Most VTK modules in VisTrails represents VTK classes. Inputs and outputs are based on class methods. A warning, in VTK it is sometimes important to call input methods in the correct order. This order is not preserved in the parameter list in VisTrails, but will still be used during execution. Method names may differ in VisTrails:
* Most Set/Get prefixes have been removed.
* SetXToY-style methods are reduced to single SetX names with a list selection.
* Methods without parameters are replaced by booleans (that need to be set to True).
* VTK6's SetInputData-style names are used even for VTK5.
Although most VTK modules in VisTrails would be familiar to vtk users, or at least in the vtk documentation, there are a few modules that VisTrails introduces. They are used as follows:
* **PythonSource** - Although a PythonSource is in the Basic Modules list rather than VTK, it is mentioned here for convenience. This module allows you write python statements to be executed as part of the workflow. See Section :ref:`sec-pythonsource` for more information.
* **VTKCell** - VTKCell is a VisTrails module that can display a vtkRenderWindow inside a cell. Simply pass it a vtkRenderer and any additional optional inputs, and it will display the results in the spreadsheet.
* **VTKRenderOffscreen** - Takes the output of a vtkRenderer and produces a PNG image of size width X height. Default values of width and height are 512. The output can then be written to a file using a FileSink.
* **vtkInspectors: vtkDataArrayInspector, vtkDataSetAttributesInspector, vtkDataSetInspector, vtkPolyDataInspector** - These inspectors were created to allow easy access to information that is not otherwise exposed by module ports, but would be accessible through vtk objects. This information includes: normals, scalars, tensors, and vectors as well as statistical information such as bounds, center, length, max, min. Looking at the output ports of these inspectors gives an idea of the information available.
.. index:: vtkInteractionHandler
* **vtkInteractionHandler** - The vtkInteractionHandler is used when a callback function is needed. To setup this handler:
* Connect the Observer input port to the output port of the object that needs the callback function.
* Connect the SharedData input port to the modules that would be passed as parameters to the callback function. Multiple modules can be connected (see terminator.vt - Images Slices SW).
* Connect the output port to the VTKCell.
* Select configure to write the callback function.
* Name the function after the event that initiates it, but replace 'Event' with 'Handler'. If the function should be called when a ``StartInteractionEvent`` occurs, the function should be named ``startInteractionHandler``.
* The function should take the parameters observer, and shareddata.
* Add the contents of the function.
There are a number of examples that use the vtkInteractionHandler. If there is any confusion, comparing the callback/interaction handler portions of the .py and .vt files in the vtk_examples/GUI directory is helpful.
**Accessing vtkObjects in vtkInteractionHandler** VtkObjects passed to the vtkInteractionHandler are VisTrails modules. The vtkObject within that module is called a vtkInstance and is accessed by calling myModule.vtkInstance. See Section :ref:`sec-pythonsource` for more information.
* **vtkScaledTransferFunction** - Allows you to add a transfer function through the use of an interactive widget. See head.vt - volume rendering or terminator.vt for example usage.
.. _sec-module-example:
Modules and Corresponding Examples
==================================
Here we provide a list of the .vt files in the examples directory that use the following modules:
Warning, this list is out-of-date and some examples may have been removed.
.. index::
pair: modules; list of examples
* **AreaFilter**:
triangle_area.vt
* **CellLocation**:
offscreen.vt, terminator.vt, vtk.vt
* **ConcatenateString**:
KEGG_SearchEntities_webservice.vt
* **Cross**:
triangle_area.vt
* **fetchData**:
structure_or_id_webservice.vt, protein_visualization.vt
* **FileSink**:
offscreen.vt - offscreen
* **Filter**:
triangle_area.vt
* **If**:
structure_or_id_webservice.vt, protein_visualization.vt
* **ImageViewerCell**:
r_stats.vt
* **List**:
triangle_area.vt
* **Map**:
triangle_area.vt
* **MplFigure**:
plot.vt, terminator.vt - Histrogram, triangle_area.vt, vtk.vt - Three Cells
* **MplFigureCell**:
plot.vt, terminator.vt - Histrogram, triangle_area.vt, vtk.vt - Three Cells
* **MplPlot**:
plot.vt, terminator.vt - Histrogram, triangle_area.vt, vtk.vt - Three Cells
* **PythonCalc**:
ProbeWithPointWidget.vt, officeTube.vt
* **PythonSource**:
infovis.vt, noaa_webservices.vt, offscreen.vt, KEGG_SearchEntities_webservice.vt, chebi_webservice.vt, EMBOSS_webservices.vt, structure_or_id_webservice.vt, vtk_http.vt, protein_visualization.vt, terminator.vt, triangle_area.vt
* **RichTextCell**:
noaa_webservices.vt, offscreen.vt, KEGG_SearchEntities_webservice.vt, chebi_webservice.vt, EMBOSS_webservices.vt, protein_visualization.vt
* **RPNGFigure**:
r_stats.vt
* **RReadCSV**:
r_stats.vt
* **Rsource**:
r_stats.vt
* **SheetReference**:
offscreen.vt, vtk.vt
* **StandardOutput**:
r_stats.vt, triangle_area.vt
* **Tuple**:
marching.vt, ProbingWithPlaneWidget.vt, TransformWithBoxWidget.vt, BandContourTerrain.vt, probeComb.vt, ImplicitPlaneWidget.vt, BuildUGrid.vt, ProbeWithPointWidget.vt, VolumeRenderWithBoxWidget.vt, PerlinTerrain.vt
* **Untuple**:
probeComb.vt, BandContourTerrain.vt
* **vtk3DSImporter**:
flamingo.vt
* **vtkAppendPolyData**:
vtk.vt - Implicit Plane Clipper, xyPlot.vt, TransformWithBoxWidget.vt, probeComb.vt, ImplicitPlaneWidget.vt, warpComb.vt
* **vtkAssembly**:
assembly.vt
* **vtkAxes**:
textOrigin.vt
* **vtkBandedPolyDataContourFilter**:
BandContourTerrain.vt
* **vtkBMPReader**:
Tplane.vt, imageWarp.vt, GenerateTextureCoords.vt
* **vtkBoxWidget**:
TransformWithBoxWidget.vt, VolumeRenderWithBoxWidget.vt, cone.vt - 6
* **vtkBYUReader**:
cubeAxes.vt, ClipCow.vt
* **vtkCastToConcrete**:
ExtractUGrid.vt
* **vtkCellArray**:
constrainedDelaunay.vt, Arrays.vt, CreateStrip.vt
* **vtkClipPolyData**:
terminator.vt, vtk.vt - Implicit Plane Clipper, ImplicitPlaneWidget.vt, ClipCow.vt
* **vtkColorTransferFunction**:
lung.vt, SimpleRayCast.vt, mummy.xml - volume rendering, SimpleTextureMap2D.vt, VolumeRenderWithBoxWidget.vt
* **vtkCone**:
iceCream.vt
* **vtkConeSource**:
vtk_book_3rd_p193.vt, vtk.vt - Implicit Plane Clipper, TransformWithBoxWidget.vt, Cone.vt, ImplicitPlaneWidget.vt, ProbeWithPointWidget.vt, assembly.vt
* **vtkConnectivityFilter**:
ExtractUGrid.vt, pointToCellData.vt
* **vtkContourFilter**:
brain_vistrail.vt, spx.vt, vtk_http.vt, marching.vt, head.vt - alias, mummy.xml - Isosurface, terminator.vt, pointToCellData.vt, triangle_area.vt - CalculateArea, Medical1.vt, hello.vt, VisQuad.vt, probeComb.vt, vtk_book_3rd_p189.vt, Medical2.vt, iceCream.vt, Contours2D.vt, Medical3.vt, PerlinTerrain.vt, ColorIsosurface.vt, PseudoVolumeRendering.vt
* **vtkCubeAxesActor2D**:
cubeAxes.vt
* **vtkCubeSource**:
assembly.vt, marching.vt
* **vtkCutter**:
ClipCow.vt, CutCombustor.vt, PseudoVolumeRendering.vt
* **vtkCylinderSource**:
assembly.vt, cylinder.vt
* **vtkDataArrayInspector**:
CutCombuster.vt, officeTube.vt
* **vtkDataSetAttributesInspector**:
officeTube.vt, CutCombustor.vt
* **vtkDataSetInspector**:
ProbingWithPlaneWidget.vt, StreamlinesWithLineWidget.vt, CutCombustor.vt, officeTube.vt, TextureThreshold.vt, BandContourTerrain.vt, probeComb.vt, ProbeWithPointWidget.vt, rainbow.vt, streamSurface.vt, warpComb.vt
* **vtkDataSetMapper**:
offscreen.vt, spx.vt, structure_or_id_webservice.vt, vtk_http.vt, SubsampleGrid.vt, TextureThreshold.vt, imageWarp.vt, protein_visualization.vt, head.vt - alias, mummy.xml - Isosurface, terminator.vt - Histogram, pointToCellData.vt, ExtractUGrid.vt, ExtractGeometry.vt, vtk.vt, BuildUGrid.vt, GenerateTextureCoords.vt
* **vtkDataSetReader**:
brain_vistrail.vt, vtk_http.vt, triangle_area.vt, ExtractUGrid.vt, vtk.vt
* **vtkDecimatePro**:
smoothFran.vt
* **vtkDelaunay2D**:
constrainedDelaunay.vt, faultLines.vt
* **vtkDelaunay3D**:
GenerateTextureCoords.vt
* **vtkDEMReader**:
BandContourTerrain.vt
* **vtkDoubleArray**:
Arrays.vt
* **vtkExtractEdges**:
constrainedDelaunay.vt, marching.vt
* **vtkExtractGeometry**:
ExtractGeometry.vt
* **vtkExtractGrid**:
SubsampleGrid.vt, PseudoVolumeRendering.vt - vtkPlane
* **vtkExtractUnstructuredGrid**:
ExtractUGrid.vt
* **vtkExtractVOI**:
Contours2D.vt
* **vtkFloatArray**:
Arrays.vt, BuildUGrid.vt, marching.vt
* **vtkFollower**:
textOrigin.vt
* **vtkGeometryFilter**:
ExtractUGrid.vt, pointToCellData.vt
* **vtkGlyph3D**:
vtk_book_3rd_p193.vt, marching.vt, vtk.vt - Implicit Plane Clipper, TransformWithBoxWidget.vt, ImplicitPlaneWidget.vt, ProbeWithPointWidget.vt, spikeF.vt
* **vtkGraphLayoutView**:
infovis.vt
* **vtkHexahedron**:
BuildUGrid.vt
* **vtkIcicleView**:
infovis.vt
* **vtkIdList**:
BuildUGrid.vt, marching.vt
* **vtkImageActor**:
Medical3.vt
* **vtkImageDataGeometryFilter**:
BandContourTerrain.vt, imageWarp.vt
* **vtkImageLuminance**:
imageWarp.vt
* **vtkImageMapToColors**:
brain_vistrail.vt, Medical3.vt
* **vtkImageReslice**:
terminator.vt
* **vtkImageShiftScale**:
lung.vt - raycasted
* **vtkImageShrink3D**:
BandContourTerrain.vt
* **vtkImplicitBoolean**:
iceCream.vt, ExtractGeometry.vt
* **vtkImplicitModeller**:
hello.vt
* **vtkImplicitPlaneWidget**:
terminator.vt, vtk.vt, ImplicitPlaneWidget.vt
* **vtkImplicitSum**:
PerlinTerrain.vt
* **vtkIntArray**:
Arrays.vt
* **vtkInteractionHandler**:
ProbingWithPlaneWidget.vt, StreamlinesWithLineWidget.vt, terminator.vt, vtk.vt - Implicit Plane Clipper, TransformWithBoxWidget.vt, Cone.vt - 6 , ImplicitPlaneWidget.vt, ProbeWithPointWidget.vt, VolumeRenderWithBoxWidget.vt
* **vtkInteractorStyleImage**:
terminator.vt
* **vtkInteractorStyleTrackballCamera**:
Cone.vt - 5
* **vtkLight**:
cubeAxes.vt, faultLines.vt
* **vtkLine**:
BuildUGrid.vt
* **vtkLineSource**:
streamSurface.vt, xyPlot.vt
* **vtkLineWidget**:
StreamlinesWithLineWidget.vt
* **vtkLODActor**:
TestText.vt, stl.vt, CADPart.vt, vtk.vt - Implicit Plane Clipper, TransformWithBoxWidget.vt, BandContourTerrain.vt, cubeAxes.vt, ImplicitPlaneWidget.vt, FilterCADPart.vt, ColorIsosurface.vt
* **vtkLookupTable**:
brain_vistrail.vt, vtk_book_3rd_p193.vt, pointToCellData.vt, BandContourTerrain.vt, ExtractUGrid.vt, Medical3.vt, rainbow.vt, PseudoVolumeRendering.vt
* **vtkMaskPoints**:
vtk_book_3rd_p193.vt, spikeF.vt
* **vtkMassProperties**:
triangle_area.vt - CalculateArea
* **vtkMergeFilter**:
imageWarp.vt
* **vtkOpenGLVolumeTextureMapper3D**:
lung.vt - TextureWithShading
* **vtkOutlineFilter**:
VisQuad.vt, probeComb.vt, ExtractGeometry.vt, vtk_book_3rd_p189.vt, cubeAxes.vt, VolumeRenderWithBoxWidget.vt, Contours2D.vt, Medical1.vt, Medical2.vt, Medical3.vt
* **vtkPDBReader**:
protein_visualization.vt, structure_or_id_webservice.vt
* **vtkPerlinNoise**:
PerlinTerrain.vt
* **vtkPiecewiseFunction**:
lung.vt, SimpleRayCast.vt, mummy.xml - volume rendering, SimpleTextureMap2D.vt, VolumeRenderWithBoxWidget.vt
* **vtkPixel**:
BuildUGrid.vt
* **vtkPlane**:
lung.vt - TS and plane, CutCombustor.vt, terminator.vt, vtk.vt - Implicit Plane Clipper, ImplicitPlaneWidget.vt, iceCream.vt, PerlinTerrain.vt, ClipCow.vt
* **vtkPlanes**:
VolumeRenderWithBoxWidget.vt
* **vtkPlaneSource**:
Tplane.vt, terminator.vt, probeComb.vt
* **vtkPlaneWidget**:
ProbingWithPlaneWidget.vt
* **vtkPLOT3DReader**:
ProbingWithPlaneWidget.vt, StreamlinesWithLineWidget.vt, CutCombustor.vt, SubsampleGrid.vt, TextureThreshold.vt, xyPlot.vt, probeComb.vt, ProbeWithPointWidget.vt, rainbow.vt, ColorIsosurface.vt, streamSurface.vt, warpComb.vt, PseudoVolumeRendering.vt
* **vtkPointData**:
marching.vt, Arrays.vt, BuildUGrid.vt
* **vtkPointDataToCellData**:
pointToCellData.vt
* **vtkPoints**:
CreateStrip.vt, marching.vt, constrainedDelaunay.vt, Arrays.vt, BuildUGrid.vt
* **vtkPointSource**:
GenerateTextureCoords.vt, officeTube.vt
* **vtkPointWidget**:
ProbeWithPointWidget.vt
* **vtkPolyData**:
CreateStrip.vt, ProbingWithPlaneWidget.vt, constrainedDelaunay.vt, StreamlinesWithLineWidget.vt, Arrays.vt, ProbeWithPointWidget.vt, ClipCow.vt
* **vtkPolyDataInspector**:
ClipCow.vt
* **vtkPolyDataNormals**:
brain_vistrail.vt, pointToCellData.vt, Medical1.vt , faultLines.vt, ExtractUGrid.vt, smoothFran.vt, cubeAxes.vt, Medical2.vt, Medical3.vt, ClipCow.vt, ColorIsosurface.vt, warpComb.vt, PerlinTerrain.vt, spikeF.vt, PseudoVolumeRendering.vt, BandContourTerrain.vt
* **vtkPolyDataReader**:
hello.vt, faultLines.vt, smoothFran.vt, spikeF.vt
* **vtkPolygon**:
BuildUGrid.vt
* **vtkPolyLine**:
BuildUGrid.vt
* **vtkPolyVertex**:
BuildUGrid.vt
* **vtkProbeFilter**:
brain_vistrail.vt, ProbingWithPlaneWidget.vt, xyPlot.vt, probeComb.vt, ProbeWithPointWidget.vt
* **vtkProperty2D**:
xyPlot.vt
* **vtkPyramid**:
BuildUGrid.vt
* **vtkQuad**:
BuildUGrid.vt
* **vtkQuadraticDecimation**:
spx.vt - Decimate
* **vtkQuadric**:
VisQuad.vt, ExtractGeometry.vt, vtk_book_3rd_p189.vt, Contours2D.vt
* **vtkRandomGraphSource**:
infovis.vt - hello_world
* **VTKRenderOffscreen**:
offscreen.vt
* **vtkRibbonFilter**:
StreamlinesWithLineWidget.vt
* **vtkRuledSurfaceFilter**:
streamSurface.vt
* **vtkRungeKutta4**:
StreamlinesWithLineWidget.vt, officeTube.vt, streamSurface.vt
* **vtkSampleFunction**:
VisQuad.vt, ExtractGeometry.vt, vtk_book_3rd_p189.vt, iceCream.vt, Contours2D.vt, PerlinTerrain.vt
* **vtkScaledTransferFunction**:
head.vt - volume rendering, terminator.vt
* **vtkShrinkFilter**:
ExtractGeometry.vt
* **vtkShrinkPolyData**:
marching.vt, filterCADPart.vt
* **vtkSmoothPolyDataFilter**:
xyPlot.vt
* **vtkSphere**:
iceCream.vt, ExtractGeometry.vt
* **vtkSphereSource**:
TestText.vt, marching.vt, assembly.vt, vtk.vt - Implicit Plane Clipper, TransformWithBoxWidget.vt, ImplicitPlaneWidget.vt
* **vtkSTLReader**:
stl.vt, CADPart.vt, FilterCADPart.vt
* **vtkStreamLine**:
StreamlinesWithLineWidget.vt, officeTube.vt, streamSurface.vt
* **vtkStripper**:
brain_vistrail.vt, Medical2.vt, Medical3.vt, ClipCow.vt
* **vtkStructuredGridGeometryFilter**:
CutCombuster.vt, officeTube.vt, TextureThreshold.vt, rainbow.vt, warpComb.vt
* **vtkStructuredGridOutlineFilter**:
StreamlinesWithLineWidget.vt, officeTube.vt, SubsampleGrid.vt, TextureThreshold.vt, xyPlot.vt, probeComb.vt, ProbeWithPointWidget.vt, rainbow.vt, ColorIsosurface.vt, streamSurface.vt, warpComb.vt, PseudoVolumeRendering.vt, ProbingWithPlaneWidget.vt, CutCombustor.vt
* **vtkStructuredGridReader**:
officeTube.vt
* **vtkStructuredPointsReader**:
lung.vt, vtk_book_3rd_p193.vt, SimpleRayCast.vt, TextureThreshold.vt, head.vt - volume rendering, mummy.xml - volume rendering, head.vt - alias, mummy.xml - Isosurface, terminator.vt, SimpleTextureMap2D.vt
* **vtkTetra**:
BuildUGrid.vt
* **vtkTextActor**:
TestText.vt
* **vtkTextProperty**:
TestText.vt, xyPlot.vt, cubeAxes.vt
* **vtkTexture**:
Tplane.vt, TextureThreshold.vt, terminator.vt, GenerateTextureCoords.vt
* **vtkTextureMapToCylinder**:
GenerateTextureCoords.vt
* **vtkThreshold**:
pointToCellData.vt
* **vtkThresholdPoints**:
vtk_book_3rd_p193.vt, marching.vt
* **vtkThresholdTextureCoords**:
TextureThreshold.vt
* **vtkTransform**:
marching.vt, terminator.vt, xyPlot.vt, TransformWithBoxWidget.vt, Cone.vt - 6, probeComb.vt, ExtractGeometry.vt, spikeF.vt
* **vtkTransformPolyDataFilter**:
marching.vt, xyPlot.vt, probeComb.vt, spikeF.vt
* **vtkTransformTextureCoords**:
GenerateTextureCoords.vt
* **vtkTreeMapView**:
infovis.vt
* **vtkTreeRingView**:
infovis.vt
* **vtkTriangle**:
BuildUGrid.vt
* **vtkTriangleFilter**:
triangle_area.vt - CalculateArea, ClipCow.vt
* **vtkTriangleStrip**:
BuildUGrid.vt
* **vtkTubeFilter**:
marching.vt, constrainedDelaunay.vt, officeTube.vt, officeTubes.vt, xyPlot.vt, faultLines.vt, PseudoVolumeRendering.vt
* **vtkUnstructuredGrid**:
BuildUGrid.vt, marching.vt
* **vtkUnstructuredGridReader**:
offscreen.vt, spx.vt, pointToCellData.vt
* **vtkVectorText**:
textOrigin.vt, marching.vt
* **vtkVertex**:
BuildUGrid.vt
* **VTKViewCell**:
infovis.vt
* **vtkViewTheme**:
infovis.vt - cone_layout
* **vtkVolume**:
lung.vt, SimpleRayCast.vt, head.vt - volume rendering, mummy.xml - volume rendering, terminator.vt, SimpleTextureMap2D.vt, VolumeRenderWithBoxWidget.vt
* **vtkVolume16Reader**:
VolumeRenderWithBoxWidget.vt, Medical1.vt, Medical2.vt, Medical3.vt
* **vtkVolumeProperty**:
lung.vt, SimpleRayCast.vt, head.vt - volume rendering, mummy.xml - volume rendering, terminator.vt, SimpleTextureMap2D.vt, VolumeRenderWithBoxWidget.vt
* **vtkVolumeRayCastCompositeFunction**:
lung.vt - raycasted, SimpleRayCast.vt, mummy.xml - volume rendering, terminator.vt - SW, VolumeRenderWithBoxWidget.vt
* **vtkVolumeRayCastMapper**:
lung.vt - raycasted, SimpleRayCast.vt, mummy.xml - volume rendering, terminator.vt - SW, VolumeRenderWithBoxWidget.vt
* **vtkVolumeTextureMapper2D**:
SimpleTextureMap2D.vt
* **vtkVolumeTextureMapper3D**:
head.vt - volume rendering, terminator.vt - HW
* **vtkVoxel**:
BuildUGrid.vt
* **vtkWarpScalar**:
imageWarp.vt, BandContourTerrain.vt, warpComb.vt
* **vtkWarpVector**:
pointToCellData.vt, ExtractUGrid.vt
* **vtkWedge**:
BuildUGrid.vt
* **vtkWindowLevelLookupTable**:
terminator.vt
* **vtkXMLTreeReader**:
infovis.vt
* **vtkXYPlotActor**:
xyPlot.vt
|