Skip to content
Snippets Groups Projects
Commit d406f412 authored by fima's avatar fima :beers:
Browse files

simple sinogram check

parent 088c9931
No related branches found
No related tags found
No related merge requests found
%% Cell type:markdown id:f79ab52a tags:
# Simple sinogram check
author: Felipe Delestro (fima@dtu.dk)
%% Cell type:code id:b5096870 tags:
``` python
import qim3d
import matplotlib.pyplot as plt
import ipywidgets
```
%% Cell type:code id:6b9a1f66 tags:
``` python
vol = qim3d.io.load("../resources/img3d/small_foram.h5", dataset_name="exchange/data")
```
%% Cell type:code id:99832d5a tags:
``` python
def plot_sinogram(vol, zpos, ypos):
fig, axs = plt.subplots(nrows=1, ncols=2, figsize=(8,10), sharey=True)
axs[0].imshow(vol[zpos,:,:])
axs[0].axhline(ypos, color="#FF6633")
axs[0].axis("off")
axs[1].imshow(vol[:,ypos,:])
axs[1].axis("off")
plt.show()
```
%% Cell type:code id:0395e573 tags:
``` python
ipywidgets.interactive(plot_sinogram,
vol = ipywidgets.fixed(vol),
zpos = ipywidgets.IntSlider(min=0, max=vol.shape[0]-1, value=int(vol.shape[0]/2)),
ypos = ipywidgets.IntSlider(min=0, max=vol.shape[1]-1, value=int(vol.shape[1]/2)))
```
%% Output
interactive(children=(IntSlider(value=360, description='zpos', max=720), IntSlider(value=130, description='ypo…
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment