Skip to content

Commit

Permalink
slan example (#19)
Browse files Browse the repository at this point in the history
* slan example

* Update docs/index.md

* Update docs/index.md

---------

Co-authored-by: alisterburt <[email protected]>
  • Loading branch information
braxtonowens and alisterburt authored Jun 8, 2024
1 parent b13f970 commit 6e7d464
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,26 @@ Out[3]:
```

Annotations made in the [slicer window](https://bio3d.colorado.edu/imod/doc/3dmodHelp/slicer.html) are stored in the IMOD binary file with both centerpoints and angles.

These annotations can be read in by setting `annotation='slan'` when calling `imodmodel.read()`

```python
import imodmodel

df = imodmodel.read('file_with_slicer_angles.mod', annotation='slan')
```

```ipython
In [3]: df.head()
Out[3]:
object_id slan_id time x_rot y_rot z_rot center_x center_y center_z label
0 0 0 1 13.100000 0.0 -30.200001 235.519577 682.744141 302.0
0 0 1 1 -41.400002 0.0 -47.700001 221.942444 661.193237 327.0
0 0 2 1 -41.400002 0.0 -41.799999 232.790726 671.332031 327.0
0 0 3 1 -35.500000 0.0 -36.000000 240.129181 679.927795 324.0
```

That's it!

## Installation
Expand All @@ -39,4 +59,4 @@ That's it!
pip install imodmodel
```

We recommend installing into a clean virtual environment.
We recommend installing into a clean virtual environment.

0 comments on commit 6e7d464

Please sign in to comment.