Ready-to-use pipelines#
These complete HTTomo pipelines are starting points for common workflows. Select one using Choose a pipeline, then adapt its loader and method parameters to the input data. See Pipelines for the underlying concepts and Configure a pipeline for configuration guidance.
Warning
These examples track the current HTTomo development version. For a tagged release, use the matching pipeline from Versioned downloads.
GPU pipelines#
These pipelines combine GPU methods from HTTomolibGPU with CPU output methods from HTTomolib. Reconstruction methods also require TomoBAR. See Processing libraries for the role of each library.
FBP3d with find_center_vo centring and image output
# This pipeline should be supported by the latest developments of HTTomo. Use module load httomo/latest module at Diamond.
# --- Standard tomography loader for NeXus files. ---
- method: standard_tomo
module_path: httomo.data.hdf.loaders
parameters:
data_path: auto
image_key_path: auto
rotation_angles: auto
preview:
detector_x: # horizontal data previewing/cropping.
# when null, the full data dimension is used, i.e., no previewing
start: null
stop: null
detector_y: # vertical data previewing/cropping.
# when null, the full data dimension is used, i.e., no previewing
start: null
stop: null
darks: null
flats: null
continuous_scan_subset: null
# --- Removing unresponsive/dead pixels in the data, aka zingers. Use if sharp streaks are present in the reconstruction. To be applied before normalisation. ---
- method: remove_outlier
module_path: httomolibgpu.misc.corr
parameters:
kernel_size: 3 # The size of the 3D neighbourhood surrounding the voxel. Odd integer.
dif: 1000 # A difference between the outlier value and the median value of neighbouring pixels.
# --- Flat-field and dark-field projection correction. ---
- method: dark_flat_field_correction
module_path: httomolibgpu.prep.normalize
parameters:
flats_multiplier: 1.0
darks_multiplier: 1.0
upper_bound: null
lower_bound: null
# --- Center of Rotation auto-finding. Required for reconstruction bellow. ---
- method: find_center_vo
module_path: httomolibgpu.recon.rotation
parameters:
ind: null # A vertical slice (sinogram) index to calculate CoR, 'mid' can be used for middle
average_radius: 0 # Average several sinograms to improve SNR, one can try 3-5 range
cor_initialisation_value: null # Use if an approximate CoR is known
smin: -50
smax: 50
srad: 6.0
step: 0.5
ratio: 0.5
drop: 20
id: centering
side_outputs:
cor: centre_of_rotation # An estimated CoR value provided as a side output
# --- Method to remove stripe artefacts in the data that lead to ring artefacts in the reconstruction. ---
- method: remove_all_stripe
module_path: httomolibgpu.prep.stripe
parameters:
snr: 3.0
la_size: 61
sm_size: 21
dim: 1
# --- Negative log is required for reconstruction to convert raw intensity measurements into the line integrals of attenuation. ---
- method: minus_log
module_path: httomolibgpu.prep.normalize
parameters: {}
# --- Reconstruction method. ---
- method: FBP3d_tomobar
module_path: httomolibgpu.recon.algorithm
parameters:
center: ${{centering.side_outputs.centre_of_rotation}} # Reference to center of rotation side output, a float number or 'null' for a middle of the horizontal dimension.
detector_pad: false # Horizontal detector padding to minimise circle/arc-type artifacts in the reconstruction. Set to 'true' to enable automatic padding or an integer
filter_freq_cutoff: 0.35
recon_size: null
recon_mask_radius: 0.95 # Zero pixels outside the mask-circle radius. Make radius equal to 2.0 to remove the mask effect.
# --- Calculate global statistics on the reconstructed volume, required for data rescaling. ---
- method: calculate_stats
module_path: httomo.methods
parameters: {}
id: statistics
side_outputs:
glob_stats: glob_stats
# --- Rescaling the data using min/max obtained from `calculate_stats`. ---
- method: rescale_to_int
module_path: httomolib.misc.rescale
parameters:
perc_range_min: 0.0
perc_range_max: 100.0
bits: 8
glob_stats: ${{statistics.side_outputs.glob_stats}}
# --- Saving data into images. ---
- method: save_to_images
module_path: httomolib.misc.images
parameters:
subfolder_name: images
axis: auto
file_format: tif # `tif` or `jpeg` can be used.
asynchronous: true
FBP3d with phase-correlation centring and downsampling
# This pipeline should be supported by the latest developments of HTTomo. Use module load httomo/latest module at Diamond.
# --- Standard tomography loader for NeXus files. ---
- method: standard_tomo
module_path: httomo.data.hdf.loaders
parameters:
data_path: auto
image_key_path: auto
rotation_angles: auto
preview:
detector_x: # horizontal data previewing/cropping.
# when null, the full data dimension is used, i.e., no previewing
start: null
stop: null
detector_y: # vertical data previewing/cropping.
# when null, the full data dimension is used, i.e., no previewing
start: null
stop: null
darks: null
flats: null
continuous_scan_subset: null
# --- Flat-field and dark-field projection correction. ---
- method: dark_flat_field_correction
module_path: httomolibgpu.prep.normalize
parameters:
flats_multiplier: 1.0
darks_multiplier: 1.0
upper_bound: null
lower_bound: null
# --- Center of Rotation auto-finding. Required for reconstruction bellow. ---
- method: find_center_pc
module_path: httomolibgpu.recon.rotation
parameters:
proj1: auto
proj2: auto
tol: 0.5
rotc_guess: null
id: centering
side_outputs:
cor: centre_of_rotation # An estimated CoR value provided as a side output
# --- Method to remove stripe artefacts in the data that lead to ring artefacts in the reconstruction. ---
- method: remove_stripe_ti
module_path: httomolibgpu.prep.stripe
parameters:
beta: 0.1
# --- Negative log is required for reconstruction to convert raw intensity measurements into the line integrals of attenuation. ---
- method: minus_log
module_path: httomolibgpu.prep.normalize
parameters: {}
# --- Reconstruction method. ---
- method: FBP3d_tomobar
module_path: httomolibgpu.recon.algorithm
parameters:
center: ${{centering.side_outputs.centre_of_rotation}} # Reference to center of rotation side output, a float number or 'null' for a middle of the horizontal dimension.
detector_pad: false # Horizontal detector padding to minimise circle/arc-type artifacts in the reconstruction. Set to 'true' to enable automatic padding or an integer
filter_freq_cutoff: 0.35
recon_size: null
recon_mask_radius: 0.95 # Zero pixels outside the mask-circle radius. Make radius equal to 2.0 to remove the mask effect.
# --- Down/up sampling the data. ---
- method: data_resampler
module_path: httomolibgpu.misc.morph
parameters:
newshape: REQUIRED # Provide a new shape for a 2D slice, e.g. [256, 256].
axis: auto
interpolation: linear
# --- Calculate global statistics on the reconstructed volume, required for data rescaling. ---
- method: calculate_stats
module_path: httomo.methods
parameters: {}
id: statistics
side_outputs:
glob_stats: glob_stats
# --- Rescaling the data using min/max obtained from `calculate_stats`. ---
- method: rescale_to_int
module_path: httomolib.misc.rescale
parameters:
perc_range_min: 0.0
perc_range_max: 100.0
bits: 8
glob_stats: ${{statistics.side_outputs.glob_stats}}
# --- Saving data into images. ---
- method: save_to_images
module_path: httomolib.misc.images
parameters:
subfolder_name: images
axis: auto
file_format: tif # `tif` or `jpeg` can be used.
asynchronous: true
LPRec3d reconstruction
# This pipeline should be supported by the latest developments of HTTomo. Use module load httomo/latest module at Diamond.
# --- Standard tomography loader for NeXus files. ---
- method: standard_tomo
module_path: httomo.data.hdf.loaders
parameters:
data_path: auto
image_key_path: auto
rotation_angles: auto
preview:
detector_x: # horizontal data previewing/cropping.
# when null, the full data dimension is used, i.e., no previewing
start: null
stop: null
detector_y: # vertical data previewing/cropping.
# when null, the full data dimension is used, i.e., no previewing
start: null
stop: null
darks: null
flats: null
continuous_scan_subset: null
# --- Removing unresponsive/dead pixels in the data, aka zingers. Use if sharp streaks are present in the reconstruction. To be applied before normalisation. ---
- method: remove_outlier
module_path: httomolibgpu.misc.corr
parameters:
kernel_size: 3 # The size of the 3D neighbourhood surrounding the voxel. Odd integer.
dif: 1000 # A difference between the outlier value and the median value of neighbouring pixels.
# --- Flat-field and dark-field projection correction. ---
- method: dark_flat_field_correction
module_path: httomolibgpu.prep.normalize
parameters:
flats_multiplier: 1.0
darks_multiplier: 1.0
upper_bound: null
lower_bound: null
# --- Center of Rotation auto-finding. Required for reconstruction bellow. ---
- method: find_center_vo
module_path: httomolibgpu.recon.rotation
parameters:
ind: null # A vertical slice (sinogram) index to calculate CoR, 'mid' can be used for middle
average_radius: 0 # Average several sinograms to improve SNR, one can try 3-5 range
cor_initialisation_value: null # Use if an approximate CoR is known
smin: -50
smax: 50
srad: 6.0
step: 0.5
ratio: 0.5
drop: 20
id: centering
side_outputs:
cor: centre_of_rotation # An estimated CoR value provided as a side output
# --- Method to remove stripe artefacts in the data that lead to ring artefacts in the reconstruction. ---
- method: remove_all_stripe
module_path: httomolibgpu.prep.stripe
parameters:
snr: 3.0
la_size: 61
sm_size: 21
dim: 1
# --- Negative log is required for reconstruction to convert raw intensity measurements into the line integrals of attenuation. ---
- method: minus_log
module_path: httomolibgpu.prep.normalize
parameters: {}
# --- Reconstruction method. ---
- method: LPRec3d_tomobar
module_path: httomolibgpu.recon.algorithm
parameters:
center: ${{centering.side_outputs.centre_of_rotation}} # Reference to center of rotation side output, a float number or 'null' for a middle of the horizontal dimension.
detector_pad: false # Horizontal detector padding to minimise circle/arc-type artifacts in the reconstruction. Set to 'true' to enable automatic padding or an integer
filter_type: shepp
filter_freq_cutoff: 1.0
recon_size: null
recon_mask_radius: 0.95 # Zero pixels outside the mask-circle radius. Make radius equal to 2.0 to remove the mask effect.
# --- Calculate global statistics on the reconstructed volume, required for data rescaling. ---
- method: calculate_stats
module_path: httomo.methods
parameters: {}
id: statistics
side_outputs:
glob_stats: glob_stats
# --- Rescaling the data using min/max obtained from `calculate_stats`. ---
- method: rescale_to_int
module_path: httomolib.misc.rescale
parameters:
perc_range_min: 0.0
perc_range_max: 100.0
bits: 8
glob_stats: ${{statistics.side_outputs.glob_stats}}
# --- Saving data into images. ---
- method: save_to_images
module_path: httomolib.misc.images
parameters:
subfolder_name: images
axis: auto
file_format: tif # `tif` or `jpeg` can be used.
asynchronous: true
FBP3d followed by total-variation denoising
# This pipeline should be supported by the latest developments of HTTomo. Use module load httomo/latest module at Diamond.
# --- Standard tomography loader for NeXus files. ---
- method: standard_tomo
module_path: httomo.data.hdf.loaders
parameters:
data_path: auto
image_key_path: auto
rotation_angles: auto
preview:
detector_x: # horizontal data previewing/cropping.
# when null, the full data dimension is used, i.e., no previewing
start: null
stop: null
detector_y: # vertical data previewing/cropping.
# when null, the full data dimension is used, i.e., no previewing
start: null
stop: null
darks: null
flats: null
continuous_scan_subset: null
# --- Removing unresponsive/dead pixels in the data, aka zingers. Use if sharp streaks are present in the reconstruction. To be applied before normalisation. ---
- method: remove_outlier
module_path: httomolibgpu.misc.corr
parameters:
kernel_size: 3 # The size of the 3D neighbourhood surrounding the voxel. Odd integer.
dif: 1000 # A difference between the outlier value and the median value of neighbouring pixels.
# --- Flat-field and dark-field projection correction. ---
- method: dark_flat_field_correction
module_path: httomolibgpu.prep.normalize
parameters:
flats_multiplier: 1.0
darks_multiplier: 1.0
upper_bound: null
lower_bound: null
# --- Center of Rotation auto-finding. Required for reconstruction bellow. ---
- method: find_center_vo
module_path: httomolibgpu.recon.rotation
parameters:
ind: null # A vertical slice (sinogram) index to calculate CoR, 'mid' can be used for middle
average_radius: 0 # Average several sinograms to improve SNR, one can try 3-5 range
cor_initialisation_value: null # Use if an approximate CoR is known
smin: -50
smax: 50
srad: 6.0
step: 0.5
ratio: 0.5
drop: 20
id: centering
side_outputs:
cor: centre_of_rotation # An estimated CoR value provided as a side output
# --- Method to remove stripe artefacts in the data that lead to ring artefacts in the reconstruction. ---
- method: remove_all_stripe
module_path: httomolibgpu.prep.stripe
parameters:
snr: 3.0
la_size: 61
sm_size: 21
dim: 1
# --- Negative log is required for reconstruction to convert raw intensity measurements into the line integrals of attenuation. ---
- method: minus_log
module_path: httomolibgpu.prep.normalize
parameters: {}
# --- Reconstruction method. ---
- method: FBP3d_tomobar
module_path: httomolibgpu.recon.algorithm
parameters:
center: ${{centering.side_outputs.centre_of_rotation}} # Reference to center of rotation side output, a float number or 'null' for a middle of the horizontal dimension.
detector_pad: false # Horizontal detector padding to minimise circle/arc-type artifacts in the reconstruction. Set to 'true' to enable automatic padding or an integer
filter_freq_cutoff: 0.35
recon_size: null
recon_mask_radius: 0.95 # Zero pixels outside the mask-circle radius. Make radius equal to 2.0 to remove the mask effect.
# --- Using denoising method to reduce noise. ---
- method: total_variation_PD
module_path: httomolibgpu.misc.denoise
parameters:
regularisation_parameter: 1.0e-05
iterations: 1000
isotropic: true
nonnegativity: false
lipschitz_const: 8.0
half_precision: false
# --- Calculate global statistics on the reconstructed volume, required for data rescaling. ---
- method: calculate_stats
module_path: httomo.methods
parameters: {}
id: statistics
side_outputs:
glob_stats: glob_stats
# --- Rescaling the data using min/max obtained from `calculate_stats`. ---
- method: rescale_to_int
module_path: httomolib.misc.rescale
parameters:
perc_range_min: 0.0
perc_range_max: 100.0
bits: 8
glob_stats: ${{statistics.side_outputs.glob_stats}}
# --- Saving data into images. ---
- method: save_to_images
module_path: httomolib.misc.images
parameters:
subfolder_name: images
axis: auto
file_format: tif # `tif` or `jpeg` can be used.
asynchronous: true
FISTA3d with total-variation regularisation
This iterative example is intended for noisy or undersampled data.
# This pipeline should be supported by the latest developments of HTTomo. Use module load httomo/latest module at Diamond.
# --- Standard tomography loader for NeXus files. ---
- method: standard_tomo
module_path: httomo.data.hdf.loaders
parameters:
data_path: auto
image_key_path: auto
rotation_angles: auto
preview:
detector_x: # horizontal data previewing/cropping.
# when null, the full data dimension is used, i.e., no previewing
start: null
stop: null
detector_y: # vertical data previewing/cropping.
# when null, the full data dimension is used, i.e., no previewing
start: null
stop: null
darks: null
flats: null
continuous_scan_subset: null
# --- Flat-field and dark-field projection correction. ---
- method: dark_flat_field_correction
module_path: httomolibgpu.prep.normalize
parameters:
flats_multiplier: 1.0
darks_multiplier: 1.0
upper_bound: null
lower_bound: null
# --- Center of Rotation auto-finding. Required for reconstruction bellow. ---
- method: find_center_vo
module_path: httomolibgpu.recon.rotation
parameters:
ind: null # A vertical slice (sinogram) index to calculate CoR, 'mid' can be used for middle
average_radius: 0 # Average several sinograms to improve SNR, one can try 3-5 range
cor_initialisation_value: null # Use if an approximate CoR is known
smin: -50
smax: 50
srad: 6.0
step: 0.5
ratio: 0.5
drop: 20
id: centering
side_outputs:
cor: centre_of_rotation # An estimated CoR value provided as a side output
# --- Negative log is required for reconstruction to convert raw intensity measurements into the line integrals of attenuation. ---
- method: minus_log
module_path: httomolibgpu.prep.normalize
parameters: {}
# --- Reconstruction method. ---
- method: FISTA3d_tomobar
module_path: httomolibgpu.recon.algorithm
parameters:
center: ${{centering.side_outputs.centre_of_rotation}} # Reference to center of rotation side output, a float number or 'null' for a middle of the horizontal dimension.
detector_pad: false # Horizontal detector padding to minimise circle/arc-type artifacts in the reconstruction. Set to 'true' to enable automatic padding or an integer
recon_size: null
recon_mask_radius: 0.95 # Zero pixels outside the mask-circle radius. Make radius equal to 2.0 to remove the mask effect.
iterations: 20
subsets_number: 6
data_fidelity: LS
regularisation_type: PD_TV
regularisation_parameter: 1.0e-06
regularisation_iterations: 50
regularisation_half_precision: true
nonnegativity: true
# --- Calculate global statistics on the reconstructed volume, required for data rescaling. ---
- method: calculate_stats
module_path: httomo.methods
parameters: {}
id: statistics
side_outputs:
glob_stats: glob_stats
# --- Rescaling the data using min/max obtained from `calculate_stats`. ---
- method: rescale_to_int
module_path: httomolib.misc.rescale
parameters:
perc_range_min: 0.0
perc_range_max: 100.0
bits: 8
glob_stats: ${{statistics.side_outputs.glob_stats}}
# --- Saving data into images. ---
- method: save_to_images
module_path: httomolib.misc.images
parameters:
subfolder_name: images
axis: auto
file_format: tif # `tif` or `jpeg` can be used.
asynchronous: true
Tutorial pipelines#
These pipelines accompany Tutorials, where the input data is provided or generated.
TomoPy CPU pipeline for the Lorentz dataset
- method: standard_tomo
module_path: httomo.data.hdf.loaders
parameters:
data_path: /exchange/data
image_key_path: null
rotation_angles:
user_defined:
start_angle: 0
stop_angle: 179.876
angles_total: 1500
preview:
detector_y:
start: 500
stop: 510
darks:
file: input_data
image_key_path: null
data_path: /exchange/data_dark
flats:
file: input_data
image_key_path: null
data_path: /exchange/data_white
continuous_scan_subset: null
- method: normalize
module_path: tomopy.prep.normalize
parameters:
cutoff: null
averaging: mean
- method: find_center_vo
module_path: tomopy.recon.rotation
parameters:
ind: mid
smin: -50
smax: 50
srad: 6
step: 0.25
ratio: 0.5
drop: 20
id: centering
side_outputs:
cor: centre_of_rotation
- method: remove_all_stripe
module_path: tomopy.prep.stripe
parameters:
snr: 3
la_size: 61
sm_size: 21
dim: 1
- method: minus_log
module_path: tomopy.prep.normalize
parameters: {}
- method: recon
module_path: tomopy.recon.algorithm
parameters:
center: ${{centering.side_outputs.centre_of_rotation}}
sinogram_order: false
algorithm: gridrec
init_recon: null
- method: calculate_stats
module_path: httomo.methods
parameters: {}
id: statistics
side_outputs:
glob_stats: glob_stats
- method: rescale_to_int
module_path: httomolib.misc.rescale
parameters:
perc_range_min: 0.0
perc_range_max: 100.0
bits: 8
glob_stats: ${{statistics.side_outputs.glob_stats}}
- method: save_to_images
module_path: httomolib.misc.images
parameters:
subfolder_name: images
axis: auto
file_format: tif
asynchronous: true
GPU pipeline for the Lorentz dataset
- method: standard_tomo
module_path: httomo.data.hdf.loaders
parameters:
data_path: /exchange/data
image_key_path: null
rotation_angles:
user_defined:
start_angle: 0
stop_angle: 179.876
angles_total: 1500
preview:
detector_y:
start: 500
stop: 510
darks:
file: input_data
image_key_path: null
data_path: /exchange/data_dark
flats:
file: input_data
image_key_path: null
data_path: /exchange/data_white
continuous_scan_subset: null
- method: dark_flat_field_correction
module_path: httomolibgpu.prep.normalize
parameters:
flats_multiplier: 1.0
darks_multiplier: 1.0
upper_bound: null
lower_bound: null
- method: find_center_vo
module_path: httomolibgpu.recon.rotation
parameters:
ind: mid
average_radius: 0
cor_initialisation_value: null
smin: -50
smax: 50
srad: 6.0
step: 0.5
ratio: 0.5
drop: 20
id: centering
side_outputs:
cor: centre_of_rotation
- method: remove_all_stripe
module_path: httomolibgpu.prep.stripe
parameters:
snr: 3.0
la_size: 61
sm_size: 21
dim: 1
normalize: false
- method: minus_log
module_path: httomolibgpu.prep.normalize
parameters: {}
- method: FBP3d_tomobar
module_path: httomolibgpu.recon.algorithm
parameters:
center: ${{centering.side_outputs.centre_of_rotation}}
detector_pad: false
filter_freq_cutoff: 0.35
recon_size: null
recon_mask_radius: 0.95
- method: calculate_stats
module_path: httomo.methods
parameters: {}
id: statistics
side_outputs:
glob_stats: glob_stats
- method: rescale_to_int
module_path: httomolib.misc.rescale
parameters:
perc_range_min: 0.0
perc_range_max: 100.0
bits: 8
glob_stats: ${{statistics.side_outputs.glob_stats}}
- method: save_to_images
module_path: httomolib.misc.images
parameters:
subfolder_name: images
axis: auto
file_format: tif
asynchronous: true
Diamond-specific pipelines#
These examples implement processing strategies used at Diamond Light Source. Required parameters and calibration files can differ between beamlines.
Convert a 360° scan to 180°, apply Paganin filtering and reconstruct
# This pipeline should be supported by the latest developments of HTTomo. Use module load httomo/latest module at Diamond.
# --- Standard tomography loader for NeXus files. ---
- method: standard_tomo
module_path: httomo.data.hdf.loaders
parameters:
data_path: auto
image_key_path: auto
rotation_angles: auto
preview:
detector_x: # horizontal data previewing/cropping.
# when null, the full data dimension is used, i.e., no previewing
start: null
stop: null
detector_y: # vertical data previewing/cropping.
# when null, the full data dimension is used, i.e., no previewing
start: null
stop: null
darks: null
flats: null
continuous_scan_subset: null
# --- Flat-field and dark-field projection correction. ---
- method: dark_flat_field_correction
module_path: httomolibgpu.prep.normalize
parameters:
flats_multiplier: 1.0
darks_multiplier: 1.0
upper_bound: null
lower_bound: null
# --- Center of Rotation auto-finding. Required for reconstruction bellow. ---
- method: find_center_360
module_path: httomolibgpu.recon.rotation
parameters:
ind: null # A vertical slice (sinogram) index to calculate CoR, 'mid' can be used for middle
win_width: 10
side: null # Choose 'left' to stitch to the left side, 'right' to the right side, or null for automated determination
denoise: true
norm: false
use_overlap: false
id: centering
side_outputs:
cor: centre_of_rotation # An estimated CoR value provided as a side output
overlap: overlap # An overlap to use for converting 360 degrees scan to 180 degrees scan.
side: side
overlap_position: overlap_position
# --- Using the overlap and side provided, converting 360 degrees scan to 180 degrees scan. ---
- method: sino_360_to_180
module_path: httomolibgpu.misc.morph
parameters:
overlap: ${{centering.side_outputs.overlap}}
side: ${{centering.side_outputs.side}}
# --- Method to remove stripe artefacts in the data that lead to ring artefacts in the reconstruction. ---
- method: remove_stripe_based_sorting
module_path: httomolibgpu.prep.stripe
parameters:
size: 11
dim: 1
# --- Apply a phase contrast filter to improve image contrast. ---
- method: paganin_filter
module_path: httomolibgpu.prep.phase
parameters:
pixel_size: 1.28 # Detector pixel size (resolution) in MICRON units.
distance: 1.0 # Propagation distance of the wavefront from sample to detector in METRE units.
energy: 53.0 # Beam energy in keV.
ratio_delta_beta: 250 # The ratio of delta/beta for filter strength control. Larger values lead to more smoothing.
calculate_padding_value_method: next_power_of_2 # Select type of padding from 'next_power_of_2', 'next_fast_length' and 'use_pad_x_y'.
pad_x_y: null # Manual padding is enabled when 'calculate_padding_value_method' is set to 'use_pad_x_y'.
# --- Reconstruction method. ---
- method: FBP3d_tomobar
module_path: httomolibgpu.recon.algorithm
parameters:
center: ${{centering.side_outputs.centre_of_rotation}} # Reference to center of rotation side output, a float number or 'null' for a middle of the horizontal dimension.
detector_pad: false # Horizontal detector padding to minimise circle/arc-type artifacts in the reconstruction. Set to 'true' to enable automatic padding or an integer
filter_freq_cutoff: 0.35
recon_size: null
recon_mask_radius: 0.95 # Zero pixels outside the mask-circle radius. Make radius equal to 2.0 to remove the mask effect.
# --- Calculate global statistics on the reconstructed volume, required for data rescaling. ---
- method: calculate_stats
module_path: httomo.methods
parameters: {}
id: statistics
side_outputs:
glob_stats: glob_stats
# --- Rescaling the data using min/max obtained from `calculate_stats`. ---
- method: rescale_to_int
module_path: httomolib.misc.rescale
parameters:
perc_range_min: 0.0
perc_range_max: 100.0
bits: 8
glob_stats: ${{statistics.side_outputs.glob_stats}}
# --- Saving data into images. ---
- method: save_to_images
module_path: httomolib.misc.images
parameters:
subfolder_name: images
axis: auto
file_format: tif # `tif` or `jpeg` can be used.
asynchronous: true
Correct distortion, convert a 360° scan and reconstruct
# This pipeline should be supported by the latest developments of HTTomo. Use module load httomo/latest module at Diamond.
# --- Standard tomography loader for NeXus files. ---
- method: standard_tomo
module_path: httomo.data.hdf.loaders
parameters:
data_path: auto
image_key_path: auto
rotation_angles: auto
preview:
detector_x: # horizontal data previewing/cropping.
# when null, the full data dimension is used, i.e., no previewing
start: null
stop: null
detector_y: # vertical data previewing/cropping.
# when null, the full data dimension is used, i.e., no previewing
start: null
stop: null
darks: null
flats: null
continuous_scan_subset: null
# --- Applying optical distortion correction to projections. ---
- method: distortion_correction_proj_discorpy
module_path: httomolibgpu.prep.alignment
parameters:
metadata_path: REQUIRED # Provide an absolute path to the text file with distortion coefficients.
order: 3
mode: constant
# --- Flat-field and dark-field projection correction. ---
- method: dark_flat_field_correction
module_path: httomolibgpu.prep.normalize
parameters:
flats_multiplier: 1.0
darks_multiplier: 1.0
upper_bound: null
lower_bound: null
# --- Center of Rotation auto-finding. Required for reconstruction bellow. ---
- method: find_center_360
module_path: httomolibgpu.recon.rotation
parameters:
ind: null # A vertical slice (sinogram) index to calculate CoR, 'mid' can be used for middle
win_width: 10
side: null # Choose 'left' to stitch to the left side, 'right' to the right side, or null for automated determination
denoise: true
norm: false
use_overlap: false
id: centering
side_outputs:
cor: centre_of_rotation # An estimated CoR value provided as a side output
overlap: overlap # An overlap to use for converting 360 degrees scan to 180 degrees scan.
side: side
overlap_position: overlap_position
# --- Using the overlap and side provided, converting 360 degrees scan to 180 degrees scan. ---
- method: sino_360_to_180
module_path: httomolibgpu.misc.morph
parameters:
overlap: ${{centering.side_outputs.overlap}}
side: ${{centering.side_outputs.side}}
# --- Method to remove stripe artefacts in the data that lead to ring artefacts in the reconstruction. ---
- method: remove_stripe_based_sorting
module_path: httomolibgpu.prep.stripe
parameters:
size: 11
dim: 1
# --- Negative log is required for reconstruction to convert raw intensity measurements into the line integrals of attenuation. ---
- method: minus_log
module_path: httomolibgpu.prep.normalize
parameters: {}
# --- Reconstruction method. ---
- method: FBP3d_tomobar
module_path: httomolibgpu.recon.algorithm
parameters:
center: ${{centering.side_outputs.centre_of_rotation}} # Reference to center of rotation side output, a float number or 'null' for a middle of the horizontal dimension.
detector_pad: false # Horizontal detector padding to minimise circle/arc-type artifacts in the reconstruction. Set to 'true' to enable automatic padding or an integer
filter_freq_cutoff: 0.35
recon_size: null
recon_mask_radius: 0.95 # Zero pixels outside the mask-circle radius. Make radius equal to 2.0 to remove the mask effect.
# --- Calculate global statistics on the reconstructed volume, required for data rescaling. ---
- method: calculate_stats
module_path: httomo.methods
parameters: {}
id: statistics
side_outputs:
glob_stats: glob_stats
# --- Rescaling the data using min/max obtained from `calculate_stats`. ---
- method: rescale_to_int
module_path: httomolib.misc.rescale
parameters:
perc_range_min: 0.0
perc_range_max: 100.0
bits: 8
glob_stats: ${{statistics.side_outputs.glob_stats}}
# --- Saving data into images. ---
- method: save_to_images
module_path: httomolib.misc.images
parameters:
subfolder_name: images
axis: auto
file_format: tif # `tif` or `jpeg` can be used.
asynchronous: true
Parameter-sweep pipelines#
Sweep runs automatically add image output after each swept method. Do not add a separate image-saving method there. See Parameter Sweeping for syntax and execution details.
Sweep centre-of-rotation values with !SweepRange
# This pipeline should be supported by the latest developments of HTTomo. Use module load httomo/latest module at Diamond.
# --- Standard tomography loader for NeXus files. ---
- method: standard_tomo
module_path: httomo.data.hdf.loaders
parameters:
data_path: auto
image_key_path: auto
rotation_angles: auto
preview:
detector_x: # horizontal data previewing/cropping.
# when null, the full data dimension is used, i.e., no previewing
start: null
stop: null
detector_y: # vertical data previewing/cropping.
# when null, the full data dimension is used, i.e., no previewing
start: null
stop: null
darks: null
flats: null
continuous_scan_subset: null
# --- Flat-field and dark-field projection correction. ---
- method: dark_flat_field_correction
module_path: httomolibgpu.prep.normalize
parameters:
flats_multiplier: 1.0
darks_multiplier: 1.0
upper_bound: null
lower_bound: null
# --- Negative log is required for reconstruction to convert raw intensity measurements into the line integrals of attenuation. ---
- method: minus_log
module_path: httomolibgpu.prep.normalize
parameters: {}
# --- Reconstruction method. ---
- method: FBP3d_tomobar
module_path: httomolibgpu.recon.algorithm
parameters:
center: !SweepRange # Reference to center of rotation side output, a float number or 'null' for a middle of the horizontal dimension.
start: 1100
stop: 1300
step: 25
detector_pad: false # Horizontal detector padding to minimise circle/arc-type artifacts in the reconstruction. Set to 'true' to enable automatic padding or an integer
filter_freq_cutoff: 0.35
recon_size: null
recon_mask_radius: 0.95 # Zero pixels outside the mask-circle radius. Make radius equal to 2.0 to remove the mask effect.
Sweep selected Paganin ratio values with !Sweep
# This pipeline should be supported by the latest developments of HTTomo. Use module load httomo/latest module at Diamond.
# --- Standard tomography loader for NeXus files. ---
- method: standard_tomo
module_path: httomo.data.hdf.loaders
parameters:
data_path: auto
image_key_path: auto
rotation_angles: auto
preview:
detector_x: # horizontal data previewing/cropping.
# when null, the full data dimension is used, i.e., no previewing
start: null
stop: null
detector_y: # vertical data previewing/cropping.
# when null, the full data dimension is used, i.e., no previewing
start: null
stop: null
darks: null
flats: null
continuous_scan_subset: null
# --- Flat-field and dark-field projection correction. ---
- method: dark_flat_field_correction
module_path: httomolibgpu.prep.normalize
parameters:
flats_multiplier: 1.0
darks_multiplier: 1.0
upper_bound: null
lower_bound: null
# --- Center of Rotation auto-finding. Required for reconstruction bellow. ---
- method: find_center_vo
module_path: httomolibgpu.recon.rotation
parameters:
ind: null # A vertical slice (sinogram) index to calculate CoR, 'mid' can be used for middle
average_radius: 0 # Average several sinograms to improve SNR, one can try 3-5 range
cor_initialisation_value: null # Use if an approximate CoR is known
smin: -50
smax: 50
srad: 6.0
step: 0.5
ratio: 0.5
drop: 20
id: centering
side_outputs:
cor: centre_of_rotation # An estimated CoR value provided as a side output
# --- Apply a phase contrast filter to improve image contrast. ---
- method: paganin_filter
module_path: httomolibgpu.prep.phase
parameters:
pixel_size: 1.28 # Detector pixel size (resolution) in MICRON units.
distance: 1.0 # Propagation distance of the wavefront from sample to detector in METRE units.
energy: 53.0 # Beam energy in keV.
ratio_delta_beta: !Sweep # The ratio of delta/beta for filter strength control. Larger values lead to more smoothing.
- 10
- 150
- 350
calculate_padding_value_method: next_power_of_2 # Select type of padding from 'next_power_of_2', 'next_fast_length' and 'use_pad_x_y'.
pad_x_y: null # Manual padding is enabled when 'calculate_padding_value_method' is set to 'use_pad_x_y'.
# --- Reconstruction method. ---
- method: FBP3d_tomobar
module_path: httomolibgpu.recon.algorithm
parameters:
center: ${{centering.side_outputs.centre_of_rotation}} # Reference to center of rotation side output, a float number or 'null' for a middle of the horizontal dimension.
detector_pad: false # Horizontal detector padding to minimise circle/arc-type artifacts in the reconstruction. Set to 'true' to enable automatic padding or an integer
filter_freq_cutoff: 0.35
recon_size: null
recon_mask_radius: 0.95 # Zero pixels outside the mask-circle radius. Make radius equal to 2.0 to remove the mask effect.
CPU pipeline#
Use the TomoPy example when a CUDA-capable GPU is unavailable. Performance depends on the input, method parameters, CPU resources and process count.
TomoPy gridrec with automatic centring
# This pipeline should be supported by the latest developments of HTTomo. Use module load httomo/latest module at Diamond.
# --- Standard tomography loader for NeXus files. ---
- method: standard_tomo
module_path: httomo.data.hdf.loaders
parameters:
data_path: auto
image_key_path: auto
rotation_angles: auto
preview:
detector_x: # horizontal data previewing/cropping.
# when null, the full data dimension is used, i.e., no previewing
start: null
stop: null
detector_y: # vertical data previewing/cropping.
# when null, the full data dimension is used, i.e., no previewing
start: null
stop: null
darks: null
flats: null
continuous_scan_subset: null
# --- Removing unresponsive/dead pixels in the data, aka zingers. Use if sharp streaks are present in the reconstruction. To be applied before normalisation. ---
- method: remove_outlier
module_path: tomopy.misc.corr
parameters:
dif: 0.1 # A difference between the outlier value and the median value of neighbouring pixels.
size: 3
axis: auto
# --------------------------------------------------------#
- method: normalize
module_path: tomopy.prep.normalize
parameters:
cutoff: null
averaging: mean
# --- Negative log is required for reconstruction to convert raw intensity measurements into the line integrals of attenuation. ---
- method: minus_log
module_path: tomopy.prep.normalize
parameters: {}
# --- Center of Rotation auto-finding. Required for reconstruction bellow. ---
- method: find_center_vo
module_path: tomopy.recon.rotation
parameters:
ind: null # A vertical slice (sinogram) index to calculate CoR, 'mid' can be used for middle
smin: -50
smax: 50
srad: 6
step: 0.25
ratio: 0.5
drop: 20
id: centering
side_outputs:
cor: centre_of_rotation # An estimated CoR value provided as a side output
# --- Reconstruction method. ---
- method: recon
module_path: tomopy.recon.algorithm
parameters:
center: ${{centering.side_outputs.centre_of_rotation}} # Reference to center of rotation side output, a float number or 'null' for a middle of the horizontal dimension.
sinogram_order: false
algorithm: gridrec # Select the required algorithm, e.g. 'gridrec'
init_recon: null
# --- Calculate global statistics on the reconstructed volume, required for data rescaling. ---
- method: calculate_stats
module_path: httomo.methods
parameters: {}
id: statistics
side_outputs:
glob_stats: glob_stats
# --- Rescaling the data using min/max obtained from `calculate_stats`. ---
- method: rescale_to_int
module_path: httomolib.misc.rescale
parameters:
perc_range_min: 0.0
perc_range_max: 100.0
bits: 8
glob_stats: ${{statistics.side_outputs.glob_stats}}
# --- Saving data into images. ---
- method: save_to_images
module_path: httomolib.misc.images
parameters:
subfolder_name: images
axis: auto
file_format: tif # `tif` or `jpeg` can be used.
asynchronous: true