PKR Core
Use Case 2 min read

Bringing a measured microstructure in from a CT or SEM slice stack

If you already have a measured microstructure — a CT reconstruction, a serial-section SEM stack — you do not need to approximate it with a generated packing. A slice stack imports as a voxel structure and from that point on is indistinguishable from a generated one.

  • Import Real Structures
  • Inspect & Visualize
  • Analyze Properties
Workflow diagram: slice images to voxel structure to inspection to analysis.

What you can do

Import a sequence of slice images and get a voxel structure. The slice order you supply is the z order — the importer never re-sorts by filename, so a stack exported with an unusual naming scheme cannot be silently scrambled.

Workflow diagram with four boxes: Slice images, Voxel structure, Inspect, Analyze.
Import is the only step that differs from a generated structure. Everything to the right of it is the same pipeline.

Formats and the two import modes

In the browser, the file picker accepts PNG, JPEG, and TIFF slices. The HTTP API is narrower: POST /api/v1/import-image-stack takes 8-bit grayscale uncompressed TIFF only, because Node has no pure-JS decoder for the other two. Worth knowing before you script it.

SettingOptionsWhat it does
modethreshold (default) / label-mapBinarise at a cutoff, or read the grayscale value as a material id directly.
threshold0–255, default 128In threshold mode, voxels at or above this become the chosen material.
materialId1–255, default 1Which material the foreground becomes in threshold mode.
sliceOrderascending (default) / descendingWhether the supplied array runs +z or −z.

Use threshold mode for a raw greyscale reconstruction where you want one solid phase against pore. Use label-map mode when your segmentation already assigns integer labels per phase and you want to keep them apart — the grayscale value becomes the material id as-is.

What you get on the other side

An imported structure is a voxel grid with a material id per voxel, which is exactly what a generated structure is. The 3D view, the clipping plane, the cross-section inspector with its per-voxel material readout, the property solvers, and every export format all work on it without a conversion step.

A cross section coloured by material id, with filler particles, binder shells, and pore space in distinct colours.
A cross section coloured by material id. This particular plane comes from a generated packing, but an imported stack renders through the same inspector and the same palette.

The round trip works too: the same slice stack can be exported back out through POST /api/v1/export-image-stack, either as raw material-id grayscale for downstream tooling or in the viewer palette for a figure.

When this is the right route

  • You have measured data and want properties from the real structure rather than a stand-in.
  • You want to check a generated recipe against a measurement by running both through the same analysis.
  • You need the measured structure in a mesh format for an external solver.

What this is not: PKR Core does not reconstruct tomography and does not segment. It starts from slices you have already reconstructed and, for label-map mode, already segmented.

Try it in PKR Core.

Open PKR Core