Skip to content

Commit 3aa2fca

Browse files
committed
deploy: fc2fe47
1 parent 7399ce3 commit 3aa2fca

File tree

86 files changed

+1223
-271
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1223
-271
lines changed
Binary file not shown.
Binary file not shown.

.doctrees/documentation/index.doctree

50 Bytes
Binary file not shown.

.doctrees/environment.pickle

12.9 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# image_io
2+
3+
`image_io` provides various options to load and save image data.
4+
It supports common formats like `tiff`, `nrrd` and `nifti`.
5+
6+
## Installation
7+
8+
`image_io` is provided as part of `brainglobe_utils` which comes with the one-line BrainGlobe install (`pip install brainglobe`).
9+
It will also be fetched by most of our tools if you decide to install them as standalone.
10+
11+
## Loading images
12+
13+
All options to load images are provided under `brainglobe_utils.image_io.load`.
14+
For example, the general purpose `load_any` function which can load many common file formats:
15+
16+
```python
17+
from brainglobe_utils.image_io import load
18+
load.load_any('mydata.tif')
19+
```
20+
21+
There are also functions specific to particular file formats:
22+
23+
```python
24+
from brainglobe_utils.image_io import load
25+
26+
# tiff
27+
load.load_img_stack('mydata.tif', x_scaling_factor=1, y_scaling_factor=1, z_scaling_factor=1)
28+
29+
# directory containing a sequence of 2D tiffs
30+
load.load_from_folder('/path/to/dir')
31+
32+
# nrrd
33+
load.load_nrrd('mydata.nrrd')
34+
35+
# nifti
36+
load.load_nii('mydata.nii')
37+
```
38+
39+
## Saving images
40+
41+
All options to save images are provided under `brainglobe_utils.image_io.save`.
42+
For example, the general purpose `save_any` function which can save a numpy array to many common file formats:
43+
44+
```python
45+
from brainglobe_utils.image_io import save
46+
save.save_any(my_array, 'mydata.tif')
47+
```
48+
49+
There are also functions specific to particular file formats:
50+
51+
```python
52+
from brainglobe_utils.image_io import save
53+
54+
# tiff
55+
save.to_tiff(my_array, 'mydata.tif')
56+
57+
# directory containing a sequence of 2D tiffs
58+
save.to_tiffs(my_array, '/path/to/dir/prefix')
59+
60+
# nrrd
61+
save.to_nrrd(my_array, 'mydata.nrrd')
62+
63+
# nifti
64+
save.to_nii(my_array, 'mydata.nii')
65+
```

_sources/documentation/brainrender/usage/using-your-data/index.md.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ and process neuron morphology data.
4040

4141
Given the popularity of python for scientific research, there are tools to load almost all data formats. These include
4242
numpy to load `.npy` files, `tiffiles` for `.tiff` etc. BrainGlobe provides a general purpose software tool for
43-
loading and saving image data ([imio](https://github.com/brainglobe/imio)). You can use `imio` to load most types of
43+
loading and saving image data ([image_io](/documentation/brainglobe-utils/image_io)). You can use `image_io` to load most types of
4444
data (e.g. `.nrrd`, `.tiff`, `.nifti` etc), e.g.:
4545

4646
```python
47-
from imio import load
47+
from brainglobe_utils.image_io import load
4848
load.load_any('mydata.tif')
4949
```
5050

_sources/documentation/index.md.txt

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ setting-up/index
5959
brainglobe-atlasapi/index
6060
brainglobe-space/index
6161
brainglobe-utils/citation-module
62+
brainglobe-utils/image_io
6263
brainreg/index
6364
brainglobe-segmentation/index
6465
brainglobe-workflows/index

blog.html

+18-18
Original file line numberDiff line numberDiff line change
@@ -592,14 +592,14 @@ <h2 class="ablog-post-title">
592592
</span>
593593

594594

595-
<a href="blog/location/london.html">London</a>
595+
<a href="blog/location/england.html">England</a>
596596

597597
,
598598

599599

600600

601601

602-
<a href="blog/location/england.html">England</a>
602+
<a href="blog/location/london.html">London</a>
603603

604604

605605

@@ -686,14 +686,14 @@ <h2 class="ablog-post-title">
686686
</span>
687687

688688

689-
<a href="blog/location/london.html">London</a>
689+
<a href="blog/location/england.html">England</a>
690690

691691
,
692692

693693

694694

695695

696-
<a href="blog/location/england.html">England</a>
696+
<a href="blog/location/london.html">London</a>
697697

698698

699699

@@ -780,14 +780,14 @@ <h2 class="ablog-post-title">
780780
</span>
781781

782782

783-
<a href="blog/location/london.html">London</a>
783+
<a href="blog/location/england.html">England</a>
784784

785785
,
786786

787787

788788

789789

790-
<a href="blog/location/england.html">England</a>
790+
<a href="blog/location/london.html">London</a>
791791

792792

793793

@@ -874,14 +874,14 @@ <h2 class="ablog-post-title">
874874
</span>
875875

876876

877-
<a href="blog/location/london.html">London</a>
877+
<a href="blog/location/england.html">England</a>
878878

879879
,
880880

881881

882882

883883

884-
<a href="blog/location/england.html">England</a>
884+
<a href="blog/location/london.html">London</a>
885885

886886

887887

@@ -968,14 +968,14 @@ <h2 class="ablog-post-title">
968968
</span>
969969

970970

971-
<a href="blog/location/london.html">London</a>
971+
<a href="blog/location/england.html">England</a>
972972

973973
,
974974

975975

976976

977977

978-
<a href="blog/location/england.html">England</a>
978+
<a href="blog/location/london.html">London</a>
979979

980980

981981

@@ -1064,14 +1064,14 @@ <h2 class="ablog-post-title">
10641064
</span>
10651065

10661066

1067-
<a href="blog/location/switzerland.html">Switzerland</a>
1067+
<a href="blog/location/zurich.html">Zurich</a>
10681068

10691069
,
10701070

10711071

10721072

10731073

1074-
<a href="blog/location/zurich.html">Zurich</a>
1074+
<a href="blog/location/switzerland.html">Switzerland</a>
10751075

10761076

10771077

@@ -1157,14 +1157,14 @@ <h2 class="ablog-post-title">
11571157
</span>
11581158

11591159

1160-
<a href="blog/location/london.html">London</a>
1160+
<a href="blog/location/england.html">England</a>
11611161

11621162
,
11631163

11641164

11651165

11661166

1167-
<a href="blog/location/england.html">England</a>
1167+
<a href="blog/location/london.html">London</a>
11681168

11691169

11701170

@@ -1251,14 +1251,14 @@ <h2 class="ablog-post-title">
12511251
</span>
12521252

12531253

1254-
<a href="blog/location/london.html">London</a>
1254+
<a href="blog/location/england.html">England</a>
12551255

12561256
,
12571257

12581258

12591259

12601260

1261-
<a href="blog/location/england.html">England</a>
1261+
<a href="blog/location/london.html">London</a>
12621262

12631263

12641264

@@ -1345,14 +1345,14 @@ <h2 class="ablog-post-title">
13451345
</span>
13461346

13471347

1348-
<a href="blog/location/london.html">London</a>
1348+
<a href="blog/location/england.html">England</a>
13491349

13501350
,
13511351

13521352

13531353

13541354

1355-
<a href="blog/location/england.html">England</a>
1355+
<a href="blog/location/london.html">London</a>
13561356

13571357

13581358

blog/2023.html

+8-8
Original file line numberDiff line numberDiff line change
@@ -592,14 +592,14 @@ <h2 class="ablog-post-title">
592592
</span>
593593

594594

595-
<a href="location/switzerland.html">Switzerland</a>
595+
<a href="location/zurich.html">Zurich</a>
596596

597597
,
598598

599599

600600

601601

602-
<a href="location/zurich.html">Zurich</a>
602+
<a href="location/switzerland.html">Switzerland</a>
603603

604604

605605

@@ -685,14 +685,14 @@ <h2 class="ablog-post-title">
685685
</span>
686686

687687

688-
<a href="location/london.html">London</a>
688+
<a href="location/england.html">England</a>
689689

690690
,
691691

692692

693693

694694

695-
<a href="location/england.html">England</a>
695+
<a href="location/london.html">London</a>
696696

697697

698698

@@ -779,14 +779,14 @@ <h2 class="ablog-post-title">
779779
</span>
780780

781781

782-
<a href="location/london.html">London</a>
782+
<a href="location/england.html">England</a>
783783

784784
,
785785

786786

787787

788788

789-
<a href="location/england.html">England</a>
789+
<a href="location/london.html">London</a>
790790

791791

792792

@@ -873,14 +873,14 @@ <h2 class="ablog-post-title">
873873
</span>
874874

875875

876-
<a href="location/london.html">London</a>
876+
<a href="location/england.html">England</a>
877877

878878
,
879879

880880

881881

882882

883-
<a href="location/england.html">England</a>
883+
<a href="location/london.html">London</a>
884884

885885

886886

blog/2024.html

+10-10
Original file line numberDiff line numberDiff line change
@@ -592,14 +592,14 @@ <h2 class="ablog-post-title">
592592
</span>
593593

594594

595-
<a href="location/london.html">London</a>
595+
<a href="location/england.html">England</a>
596596

597597
,
598598

599599

600600

601601

602-
<a href="location/england.html">England</a>
602+
<a href="location/london.html">London</a>
603603

604604

605605

@@ -686,14 +686,14 @@ <h2 class="ablog-post-title">
686686
</span>
687687

688688

689-
<a href="location/london.html">London</a>
689+
<a href="location/england.html">England</a>
690690

691691
,
692692

693693

694694

695695

696-
<a href="location/england.html">England</a>
696+
<a href="location/london.html">London</a>
697697

698698

699699

@@ -780,14 +780,14 @@ <h2 class="ablog-post-title">
780780
</span>
781781

782782

783-
<a href="location/london.html">London</a>
783+
<a href="location/england.html">England</a>
784784

785785
,
786786

787787

788788

789789

790-
<a href="location/england.html">England</a>
790+
<a href="location/london.html">London</a>
791791

792792

793793

@@ -874,14 +874,14 @@ <h2 class="ablog-post-title">
874874
</span>
875875

876876

877-
<a href="location/london.html">London</a>
877+
<a href="location/england.html">England</a>
878878

879879
,
880880

881881

882882

883883

884-
<a href="location/england.html">England</a>
884+
<a href="location/london.html">London</a>
885885

886886

887887

@@ -968,14 +968,14 @@ <h2 class="ablog-post-title">
968968
</span>
969969

970970

971-
<a href="location/london.html">London</a>
971+
<a href="location/england.html">England</a>
972972

973973
,
974974

975975

976976

977977

978-
<a href="location/england.html">England</a>
978+
<a href="location/london.html">London</a>
979979

980980

981981

0 commit comments

Comments
 (0)