vtk.js

vtk.js


PolyData 数据结构介绍

<pre><code class="language-javascript">{ vtkClass: 'vtkPolyData', metadata: { name: 'example.vtk', size: 2345, }, points: { vtkClass: 'vtkPoints', name: '_points', numberOfComponents: 3, size: 300, dataType: 'Float32Array', buffer: new ArrayBuffer(), values: new Float32Array(this.buffer), ranges: [ { min: -1, max: 1, component: 0, name: 'X' }, { min: -1, max: 1, component: 1, name: 'Y' }, { min: -1, max: 1, component: 2, name: 'Z' }, ], }, verts: { vtkClass: 'vtkCellArray', name: '_verts', numberOfComponents: 1, size: 123, dataType: 'Uint32Array', // or Uint16Array buffer: new ArrayBuffer(), values: new Uint32Array(this.buffer), // Follow the CellArray Mapping [{nbPoints}, {pointIdx...}] }, lines: { vtkClass: 'vtkCellArray', name: '_lines', numberOfComponents: 1, size: 0, dataType: 'Uint32Array', // or Uint16Array values: null, }, polys: { vtkClass: 'vtkCellArray', name: '_lines', numberOfComponents: 1, size: 8, dataType: 'Uint32Array', // or Uint16Array values: new Uint32Array([3, 0, 1, 2, 3, 3, 4, 5]), // 2 triangles (0,1,2)+(3,4,5) }, strips: { vtkClass: 'vtkCellArray', name: '_lines', numberOfComponents: 1, size: 0, dataType: 'Uint32Array', // or Uint16Array values: null, }, pointData: { &amp;quot;vtkClass&amp;quot;: &amp;quot;vtkDataSetAttributes&amp;quot;, &amp;quot;activeGlobalIds&amp;quot;: -1, &amp;quot;activeNormals&amp;quot;: -1, &amp;quot;activePedigreeIds&amp;quot;: -1, &amp;quot;activeScalars&amp;quot;: 0, &amp;quot;activeTCoords&amp;quot;: -1, &amp;quot;activeTensors&amp;quot;: -1, &amp;quot;activeVectors&amp;quot;: -1, &amp;quot;copyFieldFlags&amp;quot;: [], &amp;quot;doCopyAllOff&amp;quot;: false, &amp;quot;doCopyAllOn&amp;quot;: true, &amp;quot;arrays&amp;quot;: [ { &amp;quot;data&amp;quot;: { vtkClass: 'vtkDataArray', name: 'Temperature', numberOfComponents: 1, size: 300, dataType: 'Float32Array', buffer: new ArrayBuffer(), // Optional: Available if fetch from Network values: new Float32Array(this.buffer) } } ], }, cellData: { &amp;quot;vtkClass&amp;quot;: &amp;quot;vtkDataSetAttributes&amp;quot;, &amp;quot;activeGlobalIds&amp;quot;: -1, &amp;quot;activeNormals&amp;quot;: -1, &amp;quot;activePedigreeIds&amp;quot;: -1, &amp;quot;activeScalars&amp;quot;: 0, &amp;quot;activeTCoords&amp;quot;: -1, &amp;quot;activeTensors&amp;quot;: -1, &amp;quot;activeVectors&amp;quot;: -1, &amp;quot;copyFieldFlags&amp;quot;: [], &amp;quot;doCopyAllOff&amp;quot;: false, &amp;quot;doCopyAllOn&amp;quot;: true, &amp;quot;arrays&amp;quot;: [ { &amp;quot;data&amp;quot;: { type: 'vtkDataArray', name: 'CellId', numberOfComponents: 1, size: 132, dataType: 'Uint32Array', values: new Uint32Array(this.buffer) } } ] }, fieldData: { &amp;quot;vtkClass&amp;quot;: &amp;quot;vtkDataSetAttributes&amp;quot;, &amp;quot;activeGlobalIds&amp;quot;: -1, &amp;quot;activeNormals&amp;quot;: -1, &amp;quot;activePedigreeIds&amp;quot;: -1, &amp;quot;activeScalars&amp;quot;: -1, &amp;quot;activeTCoords&amp;quot;: -1, &amp;quot;activeTensors&amp;quot;: -1, &amp;quot;activeVectors&amp;quot;: -1, &amp;quot;copyFieldFlags&amp;quot;: [], &amp;quot;doCopyAllOff&amp;quot;: false, &amp;quot;doCopyAllOn&amp;quot;: true, &amp;quot;arrays&amp;quot;: [ { &amp;quot;data&amp;quot;: { vtkClass: 'vtkVariantArray', name: 'Meta', size: 3, dataType: 'JSON', values: ['Some string', [1, 2, 3], { ex: 'obj' }], } } ] } }</code></pre>

页面列表

ITEM_HTML