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