File: TestExtractVOI.tcl

package info (click to toggle)
paraview 3.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 124,600 kB
  • ctags: 133,728
  • sloc: cpp: 958,817; ansic: 509,658; tcl: 45,787; xml: 23,401; python: 19,574; perl: 3,112; yacc: 1,787; java: 1,517; sh: 665; asm: 471; lex: 400; makefile: 168; objc: 28
file content (56 lines) | stat: -rwxr-xr-x 1,343 bytes parent folder | download | duplicates (8)
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
package require vtk
package require vtkinteraction

# to mark the origin
vtkSphereSource sphere
  sphere SetRadius 2.0
vtkPolyDataMapper sphereMapper
  sphereMapper SetInputConnection [sphere GetOutputPort]
  sphereMapper ImmediateModeRenderingOn
vtkActor sphereActor
  sphereActor SetMapper sphereMapper


vtkRTAnalyticSource rt
rt SetWholeExtent -50 50 -50 50 0 0

vtkExtractVOI voi
  voi SetInputConnection [rt GetOutputPort]
  voi SetVOI -11 39 5 45 0 0
  voi SetSampleRate 5 5 1

# Get rid ambiguous triagulation issues.
vtkDataSetSurfaceFilter surf
  surf SetInputConnection [voi GetOutputPort]
vtkTriangleFilter tris
  tris SetInputConnection [surf GetOutputPort]

vtkPolyDataMapper mapper
  mapper SetInputConnection [tris GetOutputPort]
  mapper ImmediateModeRenderingOn
  mapper SetScalarRange 130 280
vtkActor actor
  actor SetMapper mapper


vtkRenderer ren
ren AddActor actor
ren AddActor sphereActor

ren ResetCamera
set camera [ren GetActiveCamera]
#$camera SetPosition 68.1939 -23.4323 12.6465
#$camera SetViewUp 0.46563 0.882375 0.0678508  
#$camera SetFocalPoint 3.65707 11.4552 1.83509 
#$camera SetClippingRange 59.2626 101.825 

vtkRenderWindow renWin
renWin AddRenderer ren

vtkRenderWindowInteractor iren
iren SetRenderWindow renWin
iren Initialize
iren AddObserver UserEvent {wm deiconify .vtkInteract}

wm withdraw .