Note

Click here to download the full example code or to run this example in your browser via Binder

# Estimate anisotropy in a 3D microscopy image¶

In this tutorial, we compute the structure tensor of a 3D image.
For a general introduction to 3D image processing, please refer to
Explore 3D images (of cells).
The data we use here are sampled from an image of kidney tissue by Genevieve
Buckley in confocal fluorescence microscopy (more details at 1 under
`kidney-tissue-fluorescence.tif`

).

```
import matplotlib.pyplot as plt
import numpy as np
import plotly.express as px
from skimage import (
data, feature
)
```

## Load image¶

This biomedical image is available through *scikit-image*’s data registry.

```
data = data.kidney()
```

What exactly are the shape and size of our 3D multichannel image?

```
print(f'number of dimensions: {data.ndim}')
print(f'shape: {data.shape}')
print(f'dtype: {data.dtype}')
```

Out:

```
number of dimensions: 4
shape: (16, 512, 512, 3)
dtype: uint16
```

For the purposes of this tutorial, we shall consider only the second color channel, which leaves us with a 3D single-channel image. What is the range of values?

Out:

```
range: (68, 4095)
```

Let us visualize the middle slice of our 3D image.