11 print(f
"Reading {filename}...")
12 sdf_3d, origin_zyx, spacing_zyx = pnm.SDFReader.read_vti(filename)
13 print(f
"Loaded SDF. Shape: {sdf_3d.shape}")
15 print(
"Extracting pores on GPU...")
16 pores = pnm.extract_pores(sdf_3d, origin_zyx, spacing_zyx)
18 print(f
"Found {len(pores)} pores.")
20 print(
"First 5 pores:")
21 for i
in range(min(5, len(pores))):
26 coords = np.array([[p.x, p.y, p.z]
for p
in pores])
28 print(f
"Bounds: Min {coords.min(axis=0)}, Max {coords.max(axis=0)}")