File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
doc/devel/code_discussions/comparisons Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change 5
5
Here we describe the VTK dataset model, because of some parallels with
6
6
our own idea of an image object. The document is from the VTK book - [VTK4 ]_
7
7
8
- See also:
8
+ See also:
9
9
10
10
* http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/data.html#vtk-data-structures
11
11
* http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/auto/example_datasets.html
@@ -45,14 +45,13 @@ refers to, you can identify the element.
45
45
46
46
>>> pts = vtk.vtkPoints()
47
47
>>> id = pts.InsertNextPoint(0 , 0 , 0 )
48
- >>> id
49
- 0
48
+ >>> id == 0
49
+ True
50
50
>>> id = pts.InsertNextPoint(0 , 1 , 0 )
51
- >>> id
52
- 1
53
- >>> pts.GetPoint(1 )
54
- (0.0, 1.0, 0.0)
55
-
51
+ >>> id == 1
52
+ True
53
+ >>> pts.GetPoint(1 ) == (0.0 , 1.0 , 0.0 )
54
+ True
56
55
57
56
A dataset has one or more points
58
57
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
91
90
>>> triangle.GetCellType() == VTK_TRIANGLE
92
91
True
93
92
>>> pt_ids = triangle.GetPointIds() # these are default (zeros) at the moment
94
- >>> [pt_ids.GetId(i) for i in range (pt_ids.GetNumberOfIds())]
95
- [0, 0, 0]
93
+ >>> [pt_ids.GetId(i) for i in range (pt_ids.GetNumberOfIds())] == [ 0 , 0 , 0 ]
94
+ True
96
95
97
96
Here we set the ids. The ids refer to the points above. The system
98
97
does not know this yet, but it will because, later, we are going to
You can’t perform that action at this time.
0 commit comments