Skip to content

Commit 0c8bfd8

Browse files
committed
Update README with content from vistools
1 parent 1d60c61 commit 0c8bfd8

File tree

2 files changed

+59
-3
lines changed

2 files changed

+59
-3
lines changed

README.md

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,62 @@
1-
# bigdataviewer-core
2-
31
[![](https://github.com/bigdataviewer/bigdataviewer-core/actions/workflows/build-main.yml/badge.svg)](https://github.com/bigdataviewer/bigdataviewer-core/actions/workflows/build-main.yml)
42
[![developer chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://imagesc.zulipchat.com/#narrow/stream/327326-BigDataViewer)
53

6-
ImgLib2-based viewer for registered SPIM stacks and more
4+
[![logo](./doc/bdv-logo-dark-200.png)](https://github.com/bigdataviewer/bigdataviewer-core#gh-dark-mode-only)
5+
[![logo](./doc/bdv-logo-bright-200.png)](https://github.com/bigdataviewer/bigdataviewer-core#gh-light-mode-only)
6+
7+
ImgLib2-based re-slicing viewer for terabyte-sized multi-view image sequences.
8+
See https://imagej.net/plugins/bdv for (somewhat out-dated) user documentation.
9+
10+
BigDataViewer is designed to be re-used as a visualization component in other software (besides being a stand-alone Fiji plugin).
11+
Examples include [ABBA](https://abba-documentation.readthedocs.io), [BigStitcher](https://imagej.net/plugins/bigstitcher), [BigWarp](https://imagej.net/plugins/bigwarp), [Labkit](https://imagej.net/plugins/labkit), [MaMuT](https://imagej.net/plugins/mamut), [Mastodon](https://imagej.net/plugins/mastodon), [MoBIE](https://mobie.github.io), [Paintera](https://github.com/saalfeldlab/paintera).
12+
13+
# vistools
14+
15+
The best entry point for using BDV in your own project is the [BdvFunctions](https://github.com/bigdataviewer/bigdataviewer-core/blob/master/src/main/java/bdv/util/BdvFunctions.java) class.
16+
A short introduction is below, and you can find a lot of short examples [here](https://github.com/bigdataviewer/bigdataviewer-core/tree/master/src/test/java/bdv/util).
17+
18+
## Usage
19+
20+
```
21+
Random random = new Random();
22+
Img<ARGBType> img = ArrayImgs.argbs(100, 100, 100);
23+
img.forEach(t -> t.set(random.nextInt()));
24+
Bdv bdv = BdvFunctions.show(img, "img");
25+
```
26+
creates a random 3D ARGB img and shows it in a BDV window.
27+
28+
All `BdvFunctions` methods will return some instance of `Bdv` which can be used to close the BDV window:
29+
```
30+
bdv.close()
31+
```
32+
or add more stuff to the same window:
33+
```
34+
BdvFunctions.show(img2, "img2", Bdv.options().addTo(bdv));
35+
```
36+
Via `bdv.getBdvHandle()` you can get access to the BDV `ViewerPanel` and `SetupAssignments` allowing more fine-grained
37+
manipulations of BDV state.
38+
39+
The concrete `Bdv` instance returned from `BdvFunctions.show(img, "img")` in the above example is `BdvStackSource<ARGBType>` and
40+
has additional methods, e.g., `removeFromBdv()` which removes `img` from the BDV window.
41+
42+
To display a 2D image, display a 3D image as a stack of 2D slices over time etc:
43+
```
44+
BdvFunctions.show(img2, "img2", Bdv.options().is2D());
45+
```
46+
The `is2D()` option is per Viewer window, not per stack. If it is set, the BDV navigation mouse and keybindings are set up for 2D, etc...
47+
48+
More fine-grained control can be achieved with `axisOrder()` option:
49+
```
50+
BdvFunctions.show(img2, "img2", Bdv.options().is2D().axisOrder(XYT))
51+
```
52+
`AxisOrder` specifies how the stack dimensions are interpreted.
53+
For BDV with 3D navigation, the follwoing are useful: `XYZ, XYZC, XYZT, XYZCT, XYZTC`.
54+
For BDV with 2D navigation, the following are useful: `XY, XYC, XYT, XYCT, XYTC`.
55+
You should interpret `C` and `T` losely. The effect is that `T` will be mapped to the time slider of the BDV,
56+
while `C` is mapped to BDV sources.
57+
(This also means that you should not have images with a large `C` dimension.)
58+
59+
There is/will be stuff to add annotation overlays. Currently `BdvFunctions.showPoints()` is available.
60+
61+
Here is an example screenshot where several 3D stacks, a set of boundary points, and 3D ellipsoids fitted to the boundary points were added to a BDV window. It also shows how the usual BDV dialogs can be used to adjust visibility / brightness / colors of tbe individual sources.
62+
![screenshot](./doc/vistools-screenshot.png)

doc/vistools-screenshot.png

215 KB
Loading

0 commit comments

Comments
 (0)