Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
schlegelp committed Jun 6, 2024
1 parent 626be7c commit e9a3244
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
Binary file added docs/_static/brain_volume_example2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions docs/controls.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ Use [`octarine.Viewer.set_view`][]`()` to set the camera view:
>>> v.set_view('XY') # set view to frontal
```

Found a nice view? You can save the camera state and re-apply later to get the exact same
view again:

```python
>>> state = v.get_view() # get the current view
>>> v.set_view(state) # re-apply the view
```

## Colors
Use [`octarine.Viewer.colorize`][]`()` to randomize colors:

Expand Down
16 changes: 15 additions & 1 deletion docs/objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ array([[0.38, 0. , 0. ],

>>> import octarine as oc
>>> v = oc.Viewer()
>>> v.add_volume(vol, dims=(.38, .38, .38))
>>> v.add_volume(vol, spacing=(.38, .38, .38))
>>> v.show_bounds = True
```

Expand All @@ -115,6 +115,20 @@ Note that the default blend mode for the renderer may cause objects
behind or inside the volume to look funny. You can change the blend
mode by setting e.g. `v.blend_mode='additive'`.

Alternatively, you can also add slices through the volume:

```python
>>> import cmap
>>> v.add_volume(
... vol,
... color=cmap.Colormap('Greys'), # use a different colormap
... spacing=.38, # single value for isometric data
... slice=True # can also be a tuple, e.g. (True, False, True)
... )
```

![brain volume](_static/brain_volume_example2.png)

See [octarine.Viewer.add_volume][]`()` for details!

## Custom Objects
Expand Down

0 comments on commit e9a3244

Please sign in to comment.