Skip to content

Commit 6babba8

Browse files
committed
Update README with content from vistools
1 parent 4a89956 commit 6babba8

File tree

4 files changed

+59
-2
lines changed

4 files changed

+59
-2
lines changed

README.md

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,63 @@
1-
# bigdataviewer-core
1+
![logo](../bigdataviewer-core/bdv-logo-dark-bg.png#gh-dark-mode-only)![logo](../bigdataviewer-core/bdv-logo-light-bg.png#gh-light-mode-only)
22

33
[![](https://github.com/bigdataviewer/bigdataviewer-core/actions/workflows/build-main.yml/badge.svg)](https://github.com/bigdataviewer/bigdataviewer-core/actions/workflows/build-main.yml)
44
[![developer chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://imagesc.zulipchat.com/#narrow/stream/327326-BigDataViewer)
55

6-
ImgLib2-based viewer for registered SPIM stacks and more
6+
# bigdataviewer-core
7+
8+
ImgLib2-based re-slicing viewer for terabyte-sized multi-view image sequences.
9+
See https://imagej.net/plugins/bdv for (somewhat out-dated) user documentation.
10+
11+
BigDataViewer is designed to be re-used as a visualization component in other software (besides being a stand-alone Fiji plugin).
12+
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).
13+
14+
# vistools
15+
16+
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.
17+
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).
18+
19+
## Usage
20+
21+
```
22+
Random random = new Random();
23+
Img<ARGBType> img = ArrayImgs.argbs(100, 100, 100);
24+
img.forEach(t -> t.set(random.nextInt()));
25+
Bdv bdv = BdvFunctions.show(img, "img");
26+
```
27+
creates a random 3D ARGB img and shows it in a BDV window.
28+
29+
All `BdvFunctions` methods will return some instance of `Bdv` which can be used to close the BDV window:
30+
```
31+
bdv.close()
32+
```
33+
or add more stuff to the same window:
34+
```
35+
BdvFunctions.show(img2, "img2", Bdv.options().addTo(bdv));
36+
```
37+
Via `bdv.getBdvHandle()` you can get access to the BDV `ViewerPanel` and `SetupAssignments` allowing more fine-grained
38+
manipulations of BDV state.
39+
40+
The concrete `Bdv` instance returned from `BdvFunctions.show(img, "img")` in the above example is `BdvStackSource<ARGBType>` and
41+
has additional methods, e.g., `removeFromBdv()` which removes `img` from the BDV window.
42+
43+
To display a 2D image, display a 3D image as a stack of 2D slices over time etc:
44+
```
45+
BdvFunctions.show(img2, "img2", Bdv.options().is2D());
46+
```
47+
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...
48+
49+
More fine-grained control can be achieved with `axisOrder()` option:
50+
```
51+
BdvFunctions.show(img2, "img2", Bdv.options().is2D().axisOrder(XYT))
52+
```
53+
`AxisOrder` specifies how the stack dimensions are interpreted.
54+
For BDV with 3D navigation, the follwoing are useful: `XYZ, XYZC, XYZT, XYZCT, XYZTC`.
55+
For BDV with 2D navigation, the following are useful: `XY, XYC, XYT, XYCT, XYTC`.
56+
You should interpret `C` and `T` losely. The effect is that `T` will be mapped to the time slider of the BDV,
57+
while `C` is mapped to BDV sources.
58+
(This also means that you should not have images with a large `C` dimension.)
59+
60+
There is/will be stuff to add annotation overlays. Currently `BdvFunctions.showPoints()` is available.
61+
62+
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.
63+
![screenshot](../bigdataviewer-core/screenshot.png)

bdv-logo-dark-bg.png

23.5 KB
Loading

bdv-logo-light-bg.png

24.3 KB
Loading

screenshot.png

215 KB
Loading

0 commit comments

Comments
 (0)