Analyze an image stack

[1]:
import astro3d
from astro3d import image_stack

Read the image stack

We again need to set the printer-specific settings and the directory of the slides:

[2]:
stack = image_stack.IStack(
    astro3d.get_output('LocalBoxnoweb'),
    dpi_x=600, dpi_y=300, dz=27e-4,
)

Plots

Show the distribution of materials

[6]:
f, ax = stack.show_counts()
../../_images/3Dprinting_5_localbox_1_link_11_0.png

Show a histogram of the columns that are not fully transparent

[7]:
f, ax = stack.show_histogram()
../../_images/3Dprinting_5_localbox_1_link_13_0.png

Show fully transparent pixels and the density distribution.

[8]:
f, ax = stack.show_transparency_estimate()
../../_images/3Dprinting_5_localbox_1_link_15_0.png

Top view

[9]:
bg = 255
[10]:
stack.show_colors()
[10]:
(<Figure size 400x100 with 1 Axes>, <Axes:>)
../../_images/3Dprinting_5_localbox_1_link_18_1.png
[11]:
stack.replace_color(1, 255 * image_stack.VeroC_sRGB)
[12]:
stack.replace_color(3, 255 * image_stack.VeroM_sRGB)
[13]:
stack.show_colors()
[13]:
(<Figure size 400x100 with 1 Axes>, <Axes:>)
../../_images/3Dprinting_5_localbox_1_link_21_1.png
[14]:
f, ax = stack.show_top_view(bg=bg)
../../_images/3Dprinting_5_localbox_1_link_22_0.png

3 Sides

[15]:
#%%time
# this might take long
# f, ax = stack.three_views(bg=bg)