Scanner data loaders#
In tigre.utilities.io. Each returns proj, geo, angles, ready to
reconstruct. See Loading scanner data.
- tigre.utilities.io.NikonDataLoader(filepath, **kwargs)#
Load a Nikon (XTek) micro-CT dataset: projections, geometry and angles.
Reads the scanner’s geometry file, loads the projections and converts them to line integrals, ready to reconstruct. See Loading scanner data.
- Parameters:
filepath (str) – Folder of the dataset, containing its
.xtekctfile.sampling ({"equidistant", "step", "continuous"}, optional) – Which projections to load.
"equidistant"(default):num_anglesprojections spread evenly over the scan."step": everysampling_step-th projection."continuous": the firstnum_anglesprojections.num_angles (int, optional) – Number of projections to load. Default: all.
sampling_step (int, optional) – Step for
sampling="step". Default 1.
- Returns:
proj (numpy.ndarray) – Projections (line integrals), float32, shape
(N, v, u).geo (tigre.utilities.geometry.Geometry) – The scanner geometry.
angles (numpy.ndarray) – Projection angles in radians.
- tigre.utilities.io.BrukerDataLoader(filepath, **kwargs)#
Load a Bruker SkyScan micro-CT dataset: projections, geometry and angles.
Reads the scanner’s geometry file, loads the projections and converts them to line integrals, ready to reconstruct. See Loading scanner data.
- Parameters:
filepath (str) – Folder of the dataset.
dataset_number (int or "all", optional) – Some folders hold several scans: the scan to load (from 0), or
"all"to load them all, assuming the same geometry.sampling ({"equidistant", "step", "continuous"}, optional) – Which projections to load.
"equidistant"(default):num_anglesprojections spread evenly over the scan."step": everysampling_step-th projection."continuous": the firstnum_anglesprojections.num_angles (int, optional) – Number of projections to load. Default: all.
sampling_step (int, optional) – Step for
sampling="step". Default 1.
- Returns:
proj (numpy.ndarray) – Projections (line integrals), float32, shape
(N, v, u).geo (tigre.utilities.geometry.Geometry) – The scanner geometry.
angles (numpy.ndarray) – Projection angles in radians.
- tigre.utilities.io.YXLONDataLoader(filepath, **kwargs)#
Load a YXLON micro-CT dataset: projections, geometry and angles.
Reads the scanner’s geometry file, loads the projections and converts them to line integrals, ready to reconstruct. See Loading scanner data.
- Parameters:
filepath (str) – Folder of the dataset.
sampling ({"equidistant", "step", "continuous"}, optional) – Which projections to load.
"equidistant"(default):num_anglesprojections spread evenly over the scan."step": everysampling_step-th projection."continuous": the firstnum_anglesprojections.num_angles (int, optional) – Number of projections to load. Default: all.
sampling_step (int, optional) – Step for
sampling="step". Default 1.
- Returns:
proj (numpy.ndarray) – Projections (line integrals), float32, shape
(N, v, u).geo (tigre.utilities.geometry.Geometry) – The scanner geometry.
angles (numpy.ndarray) – Projection angles in radians.
- tigre.utilities.io.DiondoDataLoader(filepath, **kwargs)#
Load a Diondo micro-CT dataset: projections, geometry and angles.
Reads the scanner’s geometry file, loads the projections and converts them to line integrals, ready to reconstruct. See Loading scanner data.
- Parameters:
filepath (str) – Folder of the dataset.
sampling ({"equidistant", "step", "continuous"}, optional) – Which projections to load.
"equidistant"(default):num_anglesprojections spread evenly over the scan."step": everysampling_step-th projection."continuous": the firstnum_anglesprojections.num_angles (int, optional) – Number of projections to load. Default: all.
sampling_step (int, optional) – Step for
sampling="step". Default 1.
- Returns:
proj (numpy.ndarray) – Projections (line integrals), float32, shape
(N, v, u).geo (tigre.utilities.geometry.Geometry) – The scanner geometry.
angles (numpy.ndarray) – Projection angles in radians.
- tigre.utilities.io.VarianDataLoader(filepath, **kwargs)#
Loads raw projection data (xim format) for CBCT scans acquired with Varian OBI (Truebeam 2.0 or 2.7). Option to perform detector scatter correction (dps) and FASKS scatter correction (sc) based on algorithm described in Sun & Star-Lack 2010 (doi: 10.1088/0031-9155/55/22/007). Ring artifact correction is also applied. NOTE: This function has only been tested on clinical data from Varian Truebeam (Ver 2.7).
- Parameters:
filepath (PathLike) – folder containing projection data and calibration files.
kwargs – acdc (bool): acceleration-deceleration correction (default: True) dps (bool): detector point scatter correction (default: True) sc (bool): kernel-based scatter correction (default: True)
- Returns:
tuple[NDArray, Geometry, NDArray] – log-normalized projections, geometry, projection angles (in radians)
- tigre.utilities.io.DXChangeDataLoader(filename)#
Load a DXchange (HDF5) dataset, the format used at many synchrotrons.
Flat- and dark-field corrects the projections, converts them to line integrals and builds a parallel-beam geometry with 1 mm voxels and pixels (rescale
geoto your pixel size if you need physical units).- Parameters:
filename (str) – Path of the HDF5 file, with
/exchange/data,data_white,data_darkandtheta(in degrees).- Returns:
proj (numpy.ndarray) – Projections (line integrals), float32, shape
(N, v, u).geo (tigre.utilities.geometry.Geometry) – A parallel-beam geometry matching the data.
angles (numpy.ndarray) – Projection angles in radians.