You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+93-1Lines changed: 93 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ dash_vtk.View(
26
26
interactorSettings=[...], # Binding of mouse events to camera action (Rotate, Pan, Zoom...)
27
27
cameraPosition=[x,y,z], # Where the camera should be initially placed in 3D world
28
28
cameraViewUp=[dx, dy, dz], # Vector to use as your view up for your initial camera
29
-
cameraParallelProjection=False, #Should we see our 3D work with perspective or flat with no depth perception
29
+
cameraParallelProjection=False, #Perspective or flat
30
30
triggerRender=0, # Timestamp meant to trigger a render when different
31
31
triggerResetCamera=0, # Timestamp meant to trigger a reset camera when different
32
32
)
@@ -349,6 +349,97 @@ The list below show you the default values used for each argument:
349
349
350
350
On top of those previous settings we provide additional properties to configure a lookup table using one of our available [__colorMapPreset__](https://github.com/Kitware/vtk-js/blob/master/Sources/Rendering/Core/ColorTransferFunction/ColorMaps.json) and a convinient __colorDataRange__ to rescale to color map to your area of focus.
351
351
352
+
### GlyphRepresentation
353
+
354
+
GlyphRepresentation let you use a source as a Glyph which will then be cloned and position at every points of another source. The properties available on the __GlyphRepresentation__ let you tune the way you want to render your geometry.
355
+
356
+
In VTK a representation is composed of an [__Actor__](https://kitware.github.io/vtk-js/api/Rendering_Core_Actor.html), a [__Mapper__](https://kitware.github.io/vtk-js/api/Rendering_Core_Glyph3DMapper.html) and a [__Property__](https://kitware.github.io/vtk-js/api/Rendering_Core_Property.html). Each of those object can be configured using the __actor__, __mapper__ and __property__ arguments of the __GlyphRepresentation__.
357
+
358
+
The list below show you the default values used for each argument:
On top of those previous settings we provide additional properties to configure a lookup table using one of our available [__colorMapPreset__](https://github.com/Kitware/vtk-js/blob/master/Sources/Rendering/Core/ColorTransferFunction/ColorMaps.json) and a convinient __colorDataRange__ to rescale to color map to your area of focus.
410
+
411
+
An example of the __GlyphRepresentation__ could be for creating a spicky sphere by positioning cones normal to the sphere.
412
+
413
+
```python
414
+
defExample():
415
+
return dash_vtk.View(
416
+
children=[
417
+
dash_vtk.GlyphRepresentation(
418
+
mapper={'orientationArray': 'Normals'}
419
+
children=[
420
+
dash_vtk.Algorithm(
421
+
port=0,
422
+
vtkClass='vtkSphereSource',
423
+
state={
424
+
'phiResolution': 10,
425
+
'thetaResolution': 20,
426
+
},
427
+
),
428
+
dash_vtk.Algorithm(
429
+
port=1,
430
+
vtkClass='vtkConeSource'
431
+
state={
432
+
'resolution': 30,
433
+
'height': 0.25,
434
+
'radius': 0.08,
435
+
},
436
+
),
437
+
]
438
+
)
439
+
]
440
+
)
441
+
```
442
+
352
443
### VolumeRepresentation
353
444
354
445
The properties available on the __VolumeRepresentation__ let you tune the way you want to render your volume.
@@ -586,6 +677,7 @@ The __Volume__ element expect a single __state__ property that is internaly spli
586
677
- dimensions
587
678
- spacing
588
679
- origin
680
+
- direction
589
681
- field: (Contains the properties of __DataArray__)
590
682
- values: Array of values for the field
591
683
- numberOfComponents: Number of components per point/cell
0 commit comments