File: SliceOrder.tcl

package info (click to toggle)
vtk 5.8.0-13
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 130,524 kB
  • sloc: cpp: 1,129,256; ansic: 708,203; tcl: 48,526; python: 20,875; xml: 6,779; yacc: 4,208; perl: 3,121; java: 2,788; lex: 931; sh: 660; asm: 471; makefile: 299
file content (67 lines) | stat: -rw-r--r-- 1,854 bytes parent folder | download | duplicates (10)
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
#
# these transformations permute medical image data to maintain proper orientation
# regardless of the acqusition order. After applying these transforms with
# vtkTransformFilter, a view up of 0,-1,0 will result in the body part
# facing the viewer. 
# NOTE: some transformations have a -1 scale factor for one of the components.
#       To ensure proper polygon orientation and normal direction, you must
#       apply the vtkPolyDataNormals filter.
#
# Naming:
# si - superior to inferior (top to bottom)
# is - inferior to superior (bottom to top)
# ap - anterior to posterior (front to back)
# pa - posterior to anterior (back to front)
# lr - left to right
# rl - right to left
#
vtkTransform si
  si SetMatrix 1 0 0 0  0 0 1 0  0 -1 0 0  0 0 0 1

vtkTransform is
  is SetMatrix 1 0 0 0  0 0 -1 0  0 -1 0 0  0 0 0 1

vtkTransform ap
  ap Scale 1 -1 1

vtkTransform pa
  pa Scale 1 -1 -1

vtkTransform lr
  lr SetMatrix 0 0 -1 0  0 -1 0 0  1 0 0 0  0 0 0 1

vtkTransform rl
  rl SetMatrix 0 0 1 0  0 -1 0 0  1 0 0 0  0 0 0 1

#
# the previous transforms assume radiological views of the slices (viewed from the feet). other
# modalities such as physical sectioning may view from the head. these transforms modify the original
# with a 180 rotation about y
#
vtkTransform hf
  hf SetMatrix -1 0 0 0  0 1 0 0  0 0 -1 0  0 0 0 1

vtkTransform hfsi
  hfsi Concatenate [hf GetMatrix]
  hfsi Concatenate [si GetMatrix]

vtkTransform hfis
  hfis Concatenate [hf GetMatrix]
  hfis Concatenate [is GetMatrix]

vtkTransform hfap
  hfap Concatenate [hf GetMatrix]
  hfap Concatenate [ap GetMatrix]

vtkTransform hfpa
  hfpa Concatenate [hf GetMatrix]
  hfpa Concatenate [pa GetMatrix]

vtkTransform hflr
  hflr Concatenate [hf GetMatrix]
  hflr Concatenate [lr GetMatrix]

vtkTransform hfrl
  hfrl Concatenate [hf GetMatrix]
  hfrl Concatenate [rl GetMatrix]