upxo.meshing.gbconformant.pipeline.stage_input module

Input stages: load the dataset, crop it to a subset, map the grain ids.

upxo.meshing.gbconformant.pipeline.stage_input.active_hierarchy(state: PipelineState)[source]

The hierarchy the pipeline works on: the subset when one was extracted.

upxo.meshing.gbconformant.pipeline.stage_input.handle_load_lgi(state: PipelineState) → dict[source]
upxo.meshing.gbconformant.pipeline.stage_input.load_fm_steel(state: PipelineState) → dict[source]

Load one hierarchy level of an FM-steel raw export folder.

upxo.meshing.gbconformant.pipeline.stage_input.load_twinned_fcc(state: PipelineState) → dict[source]

Load a twinned FCC structure folder: one feature per grain, with its role and orientation.

upxo.meshing.gbconformant.pipeline.stage_input.install_hierarchy(state: PipelineState, hierarchy, folder: Path, dataset: str, extra: dict) → dict[source]

Make hierarchy the input: its label array, the hierarchy itself, and the load report.

upxo.meshing.gbconformant.pipeline.stage_input.subset_spec(cfg: dict)[source]

The box entered in the settings, as a BoxSpec.

upxo.meshing.gbconformant.pipeline.stage_input.dataset_geometry(state: PipelineState)[source]

(parent labels, hierarchy or None, voxel size, source units) of the input dataset.

upxo.meshing.gbconformant.pipeline.stage_input.crop_hierarchy_report(cfg: dict, hierarchy, labels) → dict[source]

{'counts': {'crop', 'parent'}, 'warnings'}: PAGs, packets and blocks in the crop and in the structure.

The warnings are for the levels the person set a minimum for (RVE_MIN_PAGS, RVE_MIN_PACKETS, RVE_MIN_BLOCKS); with none set there are none.

upxo.meshing.gbconformant.pipeline.stage_input.handle_subset_extract(state: PipelineState) → dict[source]

Crop the input dataset to the entered box; later stages see only the crop.

upxo.meshing.gbconformant.pipeline.stage_input.handle_grain_id_map(state: PipelineState) → dict[source]