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
Several options are available. Note that there's a difference between opening and visualising an image. Images opened in bigdataviewer-playground are not visualized directly, but are sorted into a hierarchical tree displayed into an extra window. From this tree, images can be displayed using the right click contextual menu (see next section).
9
+
10
+
## Open a XML BDV Dataset
11
+
12
+
A BigDataViewer dataset is an xml file which links to raw data and which contains additional metadata (positions, voxel size, channel descriptions etc.). These datasets can be generated by other BigDataViewer plugins such as BigStitcher, and bigdataviewer playground also provides a way to generate an xml bdv dataset.
13
+
14
+
Such datasets can be opened in bigdataviewer playground either via the command:
15
+
16
+
`Plugins › BigDataViewer-Playground › BDVDataset › Open XML BDV Datasets`
17
+
18
+
(type *open xml bdv* into the search bar) or can be directly dragged and dropped into the bigdataviewer playground window (this window can be made visible with `Plugins › BigDataViewer-Playground › Show Bdv Playground Window`).
19
+
20
+
An xml bdv dataset contains the information used to load the images ([the backend](https://youtu.be/LHI7vXiUUms?t=521)). The most used backend for bigdataviewer is the [XML/HDF5](/plugins/bdv/#exporting-datasets-for-the-bigdataviewer) backend, but others exist ([N5](https://github.com/bigdataviewer/bigdataviewer-core/blob/master/src/main/java/bdv/img/n5/XmlIoN5ImageLoader.java), Tiff, [Remote](https://github.com/bigdataviewer/bigdataviewer-core/blob/master/src/main/java/bdv/img/remote/XmlIoRemoteImageLoader.java), [Imaris](https://github.com/bigdataviewer/bigdataviewer-core/blob/master/src/main/java/bdv/img/imaris/XmlIoImarisImageLoader.java)...). BigDataViewer Playground actually adds several backends which can facilitates the definitation of bio-formats, omero images, and QuPath projects into a bdv xml dataset.
21
+
22
+
## Open a set of Bio-Formats supported files as a BDV Dataset
23
+
24
+
Files (multi-series, multi-resolution) can be opened via the plugin:
(to avoid going through all the hierarchy of Fiji's menu, you can directly type *bridge* into Fiji's search bar)
29
+
30
+
Many files can be included in a single dataset.
31
+
32
+
{% include img name="open with bioformats bdv bridge" src="/media/plugins/bdv/playground/bdvpg-bioformats-bridge-basic-open.png" %}
33
+
34
+
Note that this WSI dataset demo-ed in this documentation is [accessible from Zenodo](https://zenodo.org/record/6553641#.YuD7ioRBxD8).
35
+
36
+
## Open a QuPath project as a BDV Dataset
37
+
38
+
As long as the QuPath project uses Bio-Formats image server, the project can be translated into a BigDataViewer dataset and be opened directly with the plugin:
39
+
40
+
`Plugins › BigDataViewer-Playground › BDVDataset › Open [QuPath Project (legacy)]`
41
+
42
+
## Open images from a BigDataServer as a BDV Dataset
`Plugins › BigDataViewer-Playground › BDVDataset › Open [Imaris]`
53
+
54
+
## Open OMERO images as a BDV Dataset
55
+
56
+
Coming soon ...
57
+
58
+
## Import the current ImageJ image as a BDV Dataset
59
+
60
+
Similar to the command ` Plugins>BigDataViewer>Open Current Image`, it is possible to import the current ImageJ image as an image in the bigdataviewer playground hierarchical tree via the command:
61
+
62
+
`Plugins › BigDataViewer-Playground › Sources › Import › Make BDVDataset from current IJ1 image`
63
+
64
+
It is possible to save it as an XML BDV dataset as well.
65
+
66
+
## Save a BDV Dataset as an XML BDV Dataset
67
+
68
+
Any dataset created using the functions above can be saved as an XML BDV Dataset. No image data will be written, but a XML File containing the dataset information can be written and re-used as explained in the next paragraph.
69
+
70
+
To save a BDV Dataset, first you need to open it, using one of the options above. Then you can save it (or resave it) via:
71
+
72
+
`Plugins › BigDataViewer-Playground › BDVDataset › Save BDVDataset`
73
+
74
+
Specify the sources to save and a xml file path. If the sources you selected belong to a BDV dataset, this command will be able to save it.
By using the SciJava framework to store BigDataViewer windows through its `BdvHandle` interface, it is possible to communicate bdv instances between scripts and commands (see [script parameter page](/scripting/parameters)). This also facilitates the use of Fiji GUI because the commands of this repository can be chained easily. Any script or Command which declares a `BdvHandle` parameter can retrieve or provide reference to existing BigDataViewer instances.
10
+
11
+
In practice, Bdv windows created via the commands from this update site are put by default in the `ObjectService`. To get a reference to these windows:
12
+
13
+
- In groovy, add this at the beginning of your script
14
+
15
+
```java
16
+
#@BdvHandle bdvh
17
+
```
18
+
19
+
```java
20
+
@Parameter
21
+
BdvHandle bdvh;
22
+
```
23
+
24
+
## How to make your BigDataViewer workflow compatible with SciJava ?
25
+
26
+
Two options:
27
+
28
+
- Use any command from bigdataviewer-playground which generates a BDV window. It corresponding `BdvHandle` will be registered and can be retrieved through a SciJava parameter annotation. This will make your Bdv Window accessible to other plugins / commands.
29
+
30
+
- Create your own Bdv window, but declare the associated `BdvHandle` as an output of your Command:
31
+
- in Java: `@Parameter(type = ItemIO.OUTPUT); BdvHandle bdvh_out;`
32
+
33
+
The type of the parameter annotation can also be `ItemIO.BOTH` if your command is modifying an existing `BdvHandle`
34
+
35
+
### Example scripts
36
+
37
+
#### Groovy
38
+
39
+
- Display a recursive Fiji image:
40
+
41
+
```java
42
+
// Input : provided by Single Input Preprocessor in case no widow is present
43
+
#@BdvHandle bdv_h
44
+
// Output : allow to updates list of sources
45
+
#@outputBdvHandle bdv_h
46
+
#@outputSourceAndConverter source
47
+
48
+
// Simple Fiji Image stored as an array
49
+
fijiData =
50
+
[[0,0,0,0,0,0,0,0,0],
51
+
[0,1,1,1,1,1,1,1,0],
52
+
[0,1,0,0,0,0,0,0,0],
53
+
[0,1,0,1,0,1,0,1,0],
54
+
[0,1,0,1,0,1,0,1,0],
55
+
[0,1,0,1,0,1,0,1,0],
56
+
[0,1,0,0,0,1,0,0,0],
57
+
[0,1,0,1,1,1,0,0,0],
58
+
[0,0,0,0,0,0,0,0,0]] as short[][];
59
+
60
+
// Declare a procedural image
61
+
def s =newProcedural3DImageShort({p -> getRecursiveFiji(p[1], p[0], p[2])}).getRRA();
62
+
63
+
// Interval (mainly useless here, but required by BdvFunctions
64
+
Interval interval =newFinalInterval([ 0, 0, 0] as long[], [ 9, 9, 0 ] as long[]);
65
+
66
+
// Display the source in the bdv_h window
67
+
bss =BdvFunctions.show( s , interval, "Fiji", BdvOptions.options().addTo(bdv_h) );
Copy file name to clipboardExpand all lines: _pages/plugins/bdv/playground/bdv-playground-visualize.md
+4-58Lines changed: 4 additions & 58 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,46 +1,10 @@
1
1
---
2
-
title: BigDataViewer Playground
2
+
title: 2 - Display
3
3
artifact: sc.fiji:bigdataviewer-playground
4
4
nav-links: true
5
5
toc: true
6
6
---
7
7
8
-
As announced in the forum [here](https://forum.image.sc/t/getting-bigdataviewer-instance-in-an-imagej-command/21110/8) and [here](https://forum.image.sc/t/fiji-commands-for-bigdataviewer/25601), bigdataviewer playground aims at a better integration of BigDataViewer into Fiji by using the [SciJava Framework](/libs/scijava).
9
-
10
-
# Installation
11
-
12
-
Enable the [PTBIOP update site](/update-sites/following). The [BIOP](https://www.epfl.ch/research/facilities/ptbiop/) is maintaining this library.
13
-
14
-
# What bigdataviewer-playground brings ?
15
-
-**Modularity for bigdataviewer!** Bigdataviewer playground creates a way to access existing BDV instances when scripting or writing java code. Being able to combine scripts or code for display and processing is doable easily via scripting (Groovy, ImageJ macro, etc.)
16
-
-**Provide a set of macro recordable commands for bigdataviewer**. Makes it possible to script basic actions on BigDataViewer with the ImageJ macro recorder.
17
-
-**Direct and lazy opening of multiresolution files, supported by bioformats**. It is possible to open and visualize large files in bigdataviewer without resaving files. This is particularly convenient for large 2D images (à la QuPath).
18
-
19
-
# Opening images in bigdataviewer-playground
20
-
21
-
Several options are available. Note that there's a difference between opening and visualising an image. Images opened in bigdataviewer-playground are not visualized directly, but are sorted into a hierarchical tree displayed into an extra window. From this tree, images can be displayed using the right click contextual menu (see next section).
22
-
23
-
### Open any bioformats supported files (tiff, vsi, czi, lif...)
24
-
25
-
Files (which can even be multi series) can be opened via the command **[Plugins>BigDataViewer>Playground>BDVDataset>Open [BioFormats Bdv Bridge (Basic)]**.
26
-
Many files can be opened at the same time. To avoid going through all the hierarchy of Fiji's menu, you can directly type *bridge* into Fiji's search bar and click run.
27
-
28
-
{% include img name="open with bioformats bdv bridge" src="/media/plugins/bdv/playground/bdvpg-bioformats-bridge-basic-open.png" %}
29
-
30
-
Note that this WSI dataset demo-ed in this documentation is [accessible from Zenodo](https://zenodo.org/record/6553641#.YuD7ioRBxD8).
31
-
32
-
### Open a Bigdataviewer xml Dataset
33
-
34
-
A BigDataViewer dataset is an xml file which links to raw data and which contains additional metadata (positions, voxel size, channel descriptions etc.). These datasets can be generated by other BigDataViewer plugins such as BigStitcher, and bigdataviewer playground also provides a way to generate an xml bdv dataset.
35
-
36
-
Such datasets can be opened in bigdataviewer playground either via the command **[Plugins>BigDataViewer>Playground>BDVDataset>Open XML BDV Datasets]** (type *open xml bdv* into the search bar) or can be directly dragged and dropped into the bigdataviewer playground window (this window can be made visible with **[Plugins>BigDataViewer>Playground>Show Bdv Playground Window]**).
37
-
38
-
An xml bdv dataset contains the information used to load the images ([the backend](https://youtu.be/LHI7vXiUUms?t=521)). The most used backend for bigdataviewer is the [XML/HDF5](/plugins/bdv/#exporting-datasets-for-the-bigdataviewer) backend, but others exist ([N5](https://github.com/bigdataviewer/bigdataviewer-core/blob/master/src/main/java/bdv/img/n5/XmlIoN5ImageLoader.java), Tiff, [Remote](https://github.com/bigdataviewer/bigdataviewer-core/blob/master/src/main/java/bdv/img/remote/XmlIoRemoteImageLoader.java), [Imaris](https://github.com/bigdataviewer/bigdataviewer-core/blob/master/src/main/java/bdv/img/imaris/XmlIoImarisImageLoader.java)...). BigDataViewer Playground actually adds several backends which can facilitates the definitation of bio-formats, omero images, and QuPath projects into a bdv xml dataset.
39
-
40
-
### Import the current ImageJ image
41
-
42
-
Similar to the command **[Plugins>BigDataViewer>Open Current Image]**, it is possible to import the current ImageJ image as an image in the bigdataviewer playground hierarchical tree via the command **[Plugins>BigDataViewer>Sources>Import>Get Sources From ImagePlus]**
43
-
44
8
# Visualizing images in bigdataviewer-playground
45
9
46
10
## Standard view : with the spatial context from the dataset metadata
@@ -73,7 +37,7 @@ To navigate within BigDataViewer, please [look here for the commands](/plugins/b
73
37
{% include notice content="If you are lost and the image do not seem to appear back, just right-click again the sources in the tree view, and select `BDV - Show Sources`, check `adjust view on source`, and BDV will go back to a decent viewer location. You can also close the window and reopen one from the tree view." %}
74
38
75
39
{% include notice icon="tip"
76
-
content="You can open many viewers different viewers (for different channels, images, etc.), and even [synchronize them](/plugins/bdv/playground#working-with-multiple-viewers)." %}
40
+
content="You can open many viewers different viewers (for different channels, images, etc.), and even [synchronize them](bdv-playground-visualize#working-with-multiple-viewers)." %}
77
41
78
42
## How to select a subset of images using the tree view and display them with the Grid view
79
43
@@ -158,7 +122,7 @@ You need to explicitely set the number of timepoints. You can modify this a post
158
122
159
123
## I want a Z-slider!
160
124
161
-
Because BDV can display many sources in any direction and potentially warped them arbitrarily, it is not obvious to define "Z". "For instance "X" can become "Z" if you rotate the stack by 90 degrees. It is nonetheless possible to add a Z-slider to BDV windows with the command {% include bc path="Plugins|BigDataViewer-Playground|BDV|BDV - Add Z Slider"%}. This slider only looks at the center of the bdv window and 'casts a ray' in this direction. Each time this ray crosses a plane, a corresponding step exists in the slider, however, the distance between each step do not reflect the z distance, but is simply in index of the plane crossed. the number of steps is dynamically computed.
125
+
Because BDV can display many sources in any direction and potentially warped them arbitrarily, it is not obvious to define "Z". "For instance "X" can become "Z" if you rotate the stack by 90 degrees. It is nonetheless possible to add a Z-slider to BDV windows with the command {% include bc path="Plugins|BigDataViewer-Playground|BDV|BDV - Add Z Slider"%}. This slider only looks at the center of the bdv window and 'casts a ray' in this direction. Each time this ray crosses a plane, a corresponding step exists in the slider, however, the distance between each step do not reflect the z distance, but is simply the index of the plane crossed. the number of steps is dynamically computed.
162
126
163
127
# Working with multiple viewers
164
128
@@ -183,22 +147,4 @@ You can synchronize the sources that are added or removed between windows with t
183
147
{% include img name="sync states" src="/media/plugins/bdv/playground/bdvpg-sync-states.png" %}
184
148
185
149
{% include notice icon="tip"
186
-
content="States in ortho viewers can be synchronized with a checkbox when they are created" %}
187
-
188
-
# Tutorials
189
-
190
-
*[how to manually register a bdv dataset with bigdataviewer-playground.](/plugins/bdv/playground-manual-registration).
191
-
192
-
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
-
203
-
204
-
150
+
content="States in ortho viewers can be synchronized with a checkbox when they are created" %}
BigDataViewer playground aims at a better integration of BigDataViewer into Fiji by using the [SciJava Framework](/libs/scijava).
9
+
10
+
It also provides support for opening big files directly from the bio-formats and the OMERO Java APIs.
11
+
12
+
# Installation
13
+
14
+
Enable the [PTBIOP update site](/update-sites/following).
15
+
16
+
# What bigdataviewer-playground brings ?
17
+
18
+
## Modularity for BigDataViewer!
19
+
20
+
BigDataViewer playground creates a way to access existing BDV instances when scripting or writing java code. Being able to combine scripts or code for display and processing is doable via scripting (Groovy, ImageJ macro, etc.)
21
+
22
+
## Use the macro recorder for BigDataViewer
23
+
24
+
To some extent, scripting basic actions on BigDataViewer with the ImageJ macro recorder is possible.
25
+
26
+
## Direct and lazy opening of multiresolution files, supported by bioformats or OMERO
27
+
28
+
It is possible to open and visualize large files in BigDataViewer without resaving files. This is particularly convenient for large 2D images (à la QuPath).
29
+
You can use bigdataviewer-playground to create a dataset that can be re-used by any of the BigDataViewer ecosystem plugins (BigStitcher, BigWarp, Labkit...)
30
+
31
+
# Documentation summary
32
+
33
+
The documentation is split into several parts:
34
+
35
+
**[1 - Create/open](/plugins/bdv/playground/bdv-playground-open-dataset)** a dataset
36
+
37
+
38
+
**[2 - Display](/plugins/bdv/playground/bdv-playground-visualize)** a dataset
[ABBA](https://biop.github.io/ijp-imagetoatlas/), a tool to align 2D brain sections to 3D atlases, is built on top of BigDataViewer-Playground.
48
+
49
+
## Warpy
50
+
51
+
[Warpy](/plugins/bdv/warpy/warpy) is a Fiji + QuPath workflow designed to align, in a non-rigid manner, big 2D images.
52
+
53
+
54
+
## Tutorials
55
+
56
+
**[how to manually register a bdv dataset with bigdataviewer-playground](/plugins/bdv/playground/bdv-playground-manual-registration)**
57
+
58
+
## Other
59
+
60
+
A video on BigDataViewer general concepts, followed by a presentation of BigDataViewer Playground and [BigDataProcessor](https://github.com/bigdataprocessor/bigdataprocessor2)
61
+
62
+
{% include video platform="youtube" id="LHI7vXiUUms" aspect="1:1" %}
0 commit comments