rockverse.dualenergyct.DualEnergyCTGroup#

class rockverse.dualenergyct.DualEnergyCTGroup(zgroup)[source]#

Manages Dual Energy Computed Tomography (DECT) processing. This class builds upon Zarr groups and is adapted for MPI (Message Passing Interface) processing, enabling parallel computation across multiple CPUs or GPUs.

For a detailed workflow, refer to the original research paper.

Note

This class should not be directly instantiated. Use the create_group() instead.

Parameters:

zgroup (zarr group) – An existing Zarr group.

Attributes#

Voxel images#

DualEnergyCTGroup.lowECT

The low energy computed tomography voxel image.

DualEnergyCTGroup.highECT

The high energy computed tomography voxel image.

DualEnergyCTGroup.mask

The mask voxel image.

DualEnergyCTGroup.segmentation

The segmentation voxel image.

DualEnergyCTGroup.rho_min

Voxel image with the minimum electron density per voxel.

DualEnergyCTGroup.rho_p25

Voxel image with the the first quartile (25th percentile) for the electron density values per voxel from the Monte Carlo inversion.

DualEnergyCTGroup.rho_p50

Voxel image with the the median (50th percentile) values for the electron density per voxel from the Monte Carlo inversion.

DualEnergyCTGroup.rho_p75

Voxel image with the the third quartile (75th percentile) for the electron density values per voxel from the Monte Carlo inversion.

DualEnergyCTGroup.rho_max

Voxel image with the maximum electron density per voxel.

DualEnergyCTGroup.Z_min

Voxel image with the minimum effective atomic number per voxel.

DualEnergyCTGroup.Z_p25

Voxel image with the the first quartile (25th percentile) for the effective atomic number values per voxel from the Monte Carlo inversion.

DualEnergyCTGroup.Z_p50

Voxel image with the the median values (50th percentile) for the effective atomic number per voxel from the Monte Carlo inversion.

DualEnergyCTGroup.Z_p75

Voxel image with the the third quartile (75th percentile) for the effective atomic number values per voxel from the Monte Carlo inversion.

DualEnergyCTGroup.Z_max

Voxel image with the maximum effective atomic number per voxel.

DualEnergyCTGroup.valid

Voxel image with the number of valid Monte Carlo results for each voxel.

Calibration materials#

DualEnergyCTGroup.calibration_material

A list containing four instances of the CalibrationMaterial class, each representing a different calibration material used in Dual Energy Computed Tomography (DECT) processing.

DualEnergyCTGroup.periodic_table

An instance of the PeriodicTable class that provides access to atomic number and atomic mass values for elements used in the Monte Carlo inversion.

Inversion parameters#

DualEnergyCTGroup.maxA

Maximum value for inversion coefficient $A$ in the broad search algorithm used during Monte Carlo simulations.

DualEnergyCTGroup.maxB

Maximum value for inversion coefficient $B$ in the broad search algorithm used during Monte Carlo simulations.

DualEnergyCTGroup.maxn

Maximum value for inversion coefficient $n$ in the broad search algorithm used during Monte Carlo simulations.

DualEnergyCTGroup.lowE_inversion_coefficients

Pandas DataFrame with the realization sets for low energy inversion coefficients.

DualEnergyCTGroup.highE_inversion_coefficients

Pandas DataFrame with the realization sets for high energy inversion coefficients.

DualEnergyCTGroup.tol

Tolerance value for terminating the Newton-Raphson optimizations.

DualEnergyCTGroup.whis

The boxplot whisker length for determining Monte Carlo outlier results.

DualEnergyCTGroup.required_iterations

The required number of valid Monte Carlo iterations for each voxel.

DualEnergyCTGroup.maximum_iterations

The maximum number of trials to get valid Monte Carlo iterations per voxel.

DualEnergyCTGroup.threads_per_block

Number of threads per block when processing using GPUs.

Methods#

Handling voxel images#

DualEnergyCTGroup.copy_image(image, name, ...)

Copy an existing voxel image into the DECT group.

DualEnergyCTGroup.create_mask([fill_value, ...])

Create a mask voxel image based on the lowECT one.

DualEnergyCTGroup.delete_mask()

Remove the mask array from the structure.

DualEnergyCTGroup.create_segmentation([...])

Create segmentation voxel image based on the lowECT array.

DualEnergyCTGroup.delete_segmentation()

Remove the segmentation array from the structure.

Monte Carlo Inversion#

DualEnergyCTGroup.check(*[, verbose])

Check the group structure for consistency and dependencies among arrays and processing parameters.

DualEnergyCTGroup.preprocess([restart])

Perform the preprocessing steps for Dual Energy Computed Tomography analysis:

DualEnergyCTGroup.run([restart])

Run the DECT analysis on the data in this group.