Properties and execution requirements

Properties and execution requirements#

In order for HTTomo to execute a method it requires certain information about the method, such as its pattern, and (if it’s a GPU method) the amount of GPU memory required per-slice.

Some of this information is simple (such as the pattern of a method), and other information may be more complex and thus could require a function to describe it (such as the GPU memory usage of a GPU method).

The simple information describes properties of a method (its pattern, whether it’s a CPU or GPU method, etc), and the complex information describes requirements for executing the method (how much GPU memory is needed per-slice, how much padding is needed per-slice, etc).

In httomo-backends, the properties of methods are stored in YAML files (which are often referred to as “library files”), and the execution requirements are stored in python functions (which are often referred to as “supporting functions”).

Library files#

Each supported backend has modules which contain methods, and the library files are organised similarly:

  • each backend has a library file

  • a library file has a section for each of the modules within the associated backend

  • for a given method, the simple information for that method is stored in the library file for the backend the method is in

For example, httomolibgpu has a method normalize. The simple information for this normalize method is stored in the libary file for httomolibgpu.

Backend library files#

Below is a list of library files for the currently supported backends.

TomoPy
sim:
  project:
    add_drift:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    add_focal_spot_blur:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    add_gaussian:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    add_poisson:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    add_rings:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    add_salt_pepper:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    add_zingers:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    project:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    project2:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    project3:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
misc:
  corr:
    adjust_range:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    circ_mask:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    gaussian_filter:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    median_filter:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    median_filter3d:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: True
    median_filter_nonfinite:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    remove_nan:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    remove_neg:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    remove_outlier:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    remove_outlier1d:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    remove_outlier3d:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: True
    remove_ring:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    sobel_filter:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
  morph:
    downsample:
      pattern: all
      output_dims_change: True
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    pad:
      pattern: all
      output_dims_change: True
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    sino_360_to_180:
      pattern: sinogram
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    trim_sinogram:
      pattern: sinogram
      output_dims_change: True
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    upsample:
      pattern: all
      output_dims_change: True
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
prep:
  alignment:
    add_jitter:
      pattern: projection
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    add_noise:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    align_joint:
      pattern: sinogram
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    align_seq:
      pattern: sinogram
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    blur_edges:
      pattern: projection
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    distortion_correction_proj:
      pattern: projection
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    distortion_correction_sino:
      pattern: sinogram
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    scale:
      pattern: projection
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    shift_images:
      pattern: projection
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
  normalize:
    minus_log:
      pattern: projection
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    normalize:
      pattern: projection
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    normalize_roi:
      pattern: projection
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    normalize_bg:
      pattern: projection
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    normalize_nf:
      pattern: projection
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
  phase:
    retrieve_phase:
      pattern: projection
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
  stripe:
    remove_all_stripe:
      pattern: sinogram
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    remove_stripe_fw:
      pattern: sinogram
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    remove_stripe_ti:
      pattern: sinogram
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    remove_stripe_sf:
      pattern: sinogram
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    remove_stripe_based_sorting:
      pattern: sinogram
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    remove_stripe_based_filtering:
      pattern: sinogram
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    remove_stripe_based_fitting:
      pattern: sinogram
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    remove_large_stripe:
      pattern: sinogram
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    remove_dead_stripe:
      pattern: sinogram
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    remove_stripe_based_interpolation:
      pattern: sinogram
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    stripes_detect3d:
      pattern: sinogram
      implementation: cpu
      output_dims_change: False
      memory_gpu: None
      save_result_default: False
      padding: True
    stripes_mask3d:
      pattern: sinogram
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: True
recon:
  algorithm:
    recon:
      pattern: sinogram
      output_dims_change: True
      implementation: cpu
      memory_gpu: None
      save_result_default: True
      padding: False
  rotation:
    find_center:
      pattern: projection
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    find_center_pc:
      pattern: projection
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: True
      padding: False
    find_center_vo:
      pattern: projection
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
  wrappers:
    astra:
      pattern: sinogram
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    ufo_fbp:
      pattern: sinogram
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    ufo_dfi:
      pattern: sinogram
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
    lprec:
      pattern: sinogram
      output_dims_change: True
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
Httomolibgpu
misc:
  corr:
    median_filter:
      pattern: all
      output_dims_change: False
      implementation: gpu_cupy
      save_result_default: False
      padding: True
      memory_gpu:
        multiplier: 2.1
        method: direct
    remove_outlier:
      pattern: all
      output_dims_change: False
      implementation: gpu_cupy
      save_result_default: False
      padding: True
      memory_gpu:
        multiplier: 2.1
        method: direct
  denoise:
    total_variation_ROF:
      pattern: all
      output_dims_change: False
      implementation: gpu_cupy
      save_result_default: False
      padding: True
      memory_gpu:
        multiplier: 5
        method: direct
    total_variation_PD:
      pattern: all
      output_dims_change: False
      implementation: gpu_cupy
      save_result_default: False
      padding: True
      memory_gpu:
        multiplier: 7
        method: direct        
  morph:
    sino_360_to_180:
      pattern: sinogram
      output_dims_change: True
      implementation: gpu_cupy
      save_result_default: False
      padding: False
      memory_gpu:
        multiplier: None
        method: module
    data_resampler:
      pattern: all
      output_dims_change: True
      implementation: gpu_cupy
      save_result_default: False
      padding: False
      memory_gpu:
        multiplier: None
        method: module
  rescale:
    rescale_to_int:
      pattern: all
      output_dims_change: False
      implementation: gpu_cupy
      save_result_default: False
      padding: False
      memory_gpu:
        multiplier: None
        method: module
prep:
  normalize:
    normalize:
      pattern: projection
      output_dims_change: False
      implementation: gpu_cupy
      save_result_default: False
      padding: False
      memory_gpu:
        multiplier: None
        method: module
  phase:
    paganin_filter_tomopy:
      pattern: projection
      output_dims_change: False
      implementation: gpu_cupy
      save_result_default: False
      padding: False
      memory_gpu:
        multiplier: None
        method: module
    paganin_filter_savu:
      pattern: projection
      output_dims_change: False
      implementation: gpu_cupy
      save_result_default: False
      padding: False
      memory_gpu:
        multiplier: None
        method: module
  alignment:
    distortion_correction_proj_discorpy:
      pattern: projection
      output_dims_change: False
      implementation: gpu_cupy
      save_result_default: False
      padding: False
      memory_gpu:
        multiplier: 1.2
        method: direct
  stripe:
    remove_stripe_based_sorting:
      pattern: sinogram
      output_dims_change: False
      implementation: gpu_cupy
      save_result_default: False
      padding: False
      memory_gpu:
        multiplier: 1.17
        method: direct
    remove_stripe_ti:
      pattern: sinogram
      output_dims_change: False
      implementation: gpu_cupy
      save_result_default: False
      padding: False
      memory_gpu:
        multiplier: None
        method: module
    remove_all_stripe:
      pattern: sinogram
      output_dims_change: False
      implementation: gpu_cupy
      save_result_default: False
      padding: False
      memory_gpu:
        multiplier: None
        method: module
    raven_filter:
      pattern: sinogram
      output_dims_change: False
      implementation: gpu_cupy
      save_result_default: False
      padding: False
      memory_gpu:
        multiplier: None
        method: module
recon:
  algorithm:
    FBP:
      pattern: sinogram
      output_dims_change: True
      implementation: gpu_cupy
      save_result_default: True
      padding: False
      memory_gpu:
        multiplier: None
        method: module
    SIRT:
      pattern: sinogram
      output_dims_change: True
      implementation: gpu_cupy
      save_result_default: True
      padding: False
      memory_gpu:
        multiplier: None
        method: module
    CGLS:
      pattern: sinogram
      output_dims_change: True
      implementation: gpu_cupy
      save_result_default: True
      padding: False
      memory_gpu:
        multiplier: None
        method: module
  rotation:
    find_center_vo:
      pattern: projection
      output_dims_change: False
      implementation: gpu_cupy
      save_result_default: False
      padding: False
      memory_gpu:
        multiplier: 0
        method: direct
    find_center_360:
      pattern: projection
      output_dims_change: False
      implementation: gpu_cupy
      save_result_default: False
      padding: False
      memory_gpu:
        multiplier: 0
        method: direct
    find_center_pc:
      pattern: projection
      output_dims_change: False
      implementation: gpu_cupy
      save_result_default: False
      padding: False
      memory_gpu:
        multiplier: 0
        method: direct
Httomolib
misc:
  morph:
    data_reducer:
      pattern: all
      output_dims_change: True
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
  images:
    save_to_images:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
  segm:
    binary_thresholding:
      pattern: all
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False
prep:
  phase:
    paganin_filter:
      pattern: projection
      output_dims_change: False
      implementation: cpu
      memory_gpu: None
      save_result_default: False
      padding: False