Skip to content

Parameters for VesselExpress

philippa1812 edited this page Nov 8, 2022 · 11 revisions

Parameters

VesselExpress and its modules can be configured to a very precise degree. These parameters for the whole pipeline can be placed in a config.json file. You can learn more about the json file format here: https://www.json.org

An example for the config file can be found here.

Placement

In order for VesselExpress to recognize the file, place it in a folder together with the data to be processed when using the cli version.

Parameters for Modules

Every module comes with it's own set of parameters. See the sections below for detailed information on every parameter for the main modules used for 3D image processing.

General

These parameters are placed in the root of the json file and affect general workflows.

  • imgFolder: A string containing the name of the folder that contains the images. Default: "data"
  • segmentation: Possible parameters: 'segmentation3D' (default) will use 3D segmentation routine, 'segmentation2D' will use 2D segmentation routine, 'franginet' will use FrangiNet, 'franginet_gpu' will use FrangiNet with graphical units
  • small_RAM_mode: Integer parameter. If 1, Dask will be used to enable processing of larger images with low RAM. This will slow down the processing. Default value: 0
  • 3D: A string containing the image dimension to process. Either '3D' (default) or '2D'
  • render: Integer parameter. If 1, 2D and 3D previews of the vasculature will be generated. Recommended on sophisticated hardware otherwise will require long processing time. Default value: 0
  • marching_cubes: Integer parameter. If 1, an in-house implementation of the marching cubes algorithm is executed, otherwise the marching cubes implementation of scikit-image is executed. Default value: 0

segmentation3D

This section defines the parameters used for the 3D segmentation.

  • smoothing: Either 1 or 0. If 1, edge preserving smoothing is performed. Default value: 1
  • core_threshold: The cutoff-value to split the image in fore- and background is calculated by mean + standard deviation of the image intensities scaled by this factor. Set to 0 for no thresholding. Default value: 3.0
  • core_vessel_1: Either 1 or 0. If 1, a Frangi filter is applied. Default value: 1.
  • gamma_1: The sensitivity of the filter to tubular shapes. Default value: 5.
  • sigma_1: The kernel size of the filter. Should be set according to expected vessel diameter. Default value: 1.0.
  • cutoff_method_1: Method for determining the cutoff-value which splits the image in fore- and background. Possible parameters: threshold_otsu, threshold_triangle, threshold_li Default value: threshold_triangle.
  • core_vessel_2: Either 1 or 0. If 1, a second Frangi filter is applied. Default value: 1.
  • gamma_2: The sensitivity of the filter to tubular shapes. Default value: 5.
  • sigma_2: The kernel size of the filter. Should be set according to expected thickest vessel diameter. Default value: 1.0.
  • cutoff_method_2: Method for determining the cutoff-value which splits the image in fore- and background. Possible parameters: threshold_otsu, threshold_triangle, threshold_li Default value: threshold_triangle.
  • post_closing: Pixel size of cube structuring element of closing operation, set to 0 for no closing. Default value: 5.
  • post_thinning: Either 1 or 0. Set to 1 to perform topology-preserving-thinning. Default value: 1.
  • thin: The amount to thin in pixels. Default value: 1.
  • min_thickness: Half of the minimum width you want to keep from being thinned. Default value: 1.
  • post_cleaning: The smallest allowable object size in pixels. Set to 0 for no cleaning. Default value: 100.

graphAnalysis

This section defines the parameters used for the graph analysis.

  • pixel_dimensions: A string with the pixel dimensions in format "z,y,x". Default value: "1.0,1.0,1.0"
  • pruning_scale: Scaling factor for pruning as float. All branches which length are below the distance scaled by this factor to the closest background point are pruned. Default value: 1.5
  • length_limit: Minimum branch length as float. All branches below this length will be removed. Default value: 3.0
  • diameter_scale: Branches with lengths shorter than their diameter multiplied by this factor are removed. Default value: 2.0
  • branching_threshold: Percentage segment length to use for vectorization of branches for branching angle calculation. Default value: 0.25
  • extended output: Either 1 or 0. If set to 1 graph outputs are generated. Default value: 1
  • experimental_flag: Either 1 or 0. If set to 1 experimental statistics are calculated. Default value: 0
  • remove_border_end_pts: Either 1 or 0. If set to 1 end points which are are at the image border are removed and excluded from quantification. Default value: 0
  • remove_end_pts_from_small_filaments: Either 1 or 0. If set to 1 end points from filaments with less than 5 segments are removed and excluded from quantification.
  • seg_interpolate: Either 1 or 0. If set to 1 segment interpolation (smoothing of vessels) is performed. Default value: 0
  • cut_neighbor_brpt_segs: This parameter can be used to disable (if set to 0) the deletion of segments connected through 2 branching points which do not fulfill the criteria defined by length_limit and diameter_scale. Then only segments with a terminating end which do not fulfill the criteria defined by length_limit and diameter_scale are removed. Default value: 1

Rendering

This section contains all information on the 2D and 3D rendering of your data (if enabled - see general parameters). Parameters in this section are applied to rendering the binary segmentation and skeletonization as well. The binary and skeleton sections below can be used to override certain parameters for the respective previews.

The rendering is done using Blender. Many of the parameters here are parsed directly to Blender. Learn more about the software here: https://www.blender.org/

Params

  • model_file_path: A string containing the path to the .sty file to be processed.
  • out_dir: A string containing the path to a directory to save the resulting files in.
  • save_raw: Boolean parameter. If enabled, the .blend file of your mesh is saved. You can open this file in Blender for custom analysis later.
  • save_glb: Boolean parameter. If enabled, the mesh and its material are saved as a .glb file.
  • camera_pos_x: The original camera x-position. From the original position, the camera is zoomed out, until the mesh is fully visible. Default value: -2.0.
  • camera_pos_y: The original camera y-position. Default value: 3.0.
  • camera_pos_z: The original camera z-position. Default value: 3.0.
  • camera_angle_x: The original camera x euler angle. Default value: 422.0.
  • camera_angle_y: The original camera y euler angle. Default value: 0.0.
  • camera_angle_z: The original camera z euler angle. Default value: 149.0.
  • background_r: Float parameter between 0.0 and 1.0. The r-color component for the background. Default value: 0.638.
  • background_g: Float parameter between 0.0 and 1.0. The g-color component for the background. Default value: 0.638.
  • background_b: Float parameter between 0.0 and 1.0. The b-color component for the background. Default value: 0.638.
  • background_a: Float parameter between 0.0 and 1.0. The a-color component for the background. Default value: 1.0.
  • background_intensity: Float parameter between 0.0 and 1.0. Background intensity. Default value: 1.0.
  • mesh_r: Float parameter between 0.0 and 1.0. The r-color component for the mesh. (Overwritten by the other modules.)
  • mesh_g: Float parameter between 0.0 and 1.0. The g-color component for the mesh. (Overwritten by the other modules.)
  • mesh_b: Float parameter between 0.0 and 1.0. The b-color component for the mesh. (Overwritten by the other modules.)
  • mesh_a: Float parameter between 0.0 and 1.0. The a-color component for the mesh. (Overwritten by the other modules.)
  • mesh_roughness: Float parameter between 0.0 and 1.0. Describes the roughness for the material. (Overwritten by other modules.)
  • mesh_metallic: Float parameter between 0.0 and 1.0. Describes the metallic for the material. (Overwritten by other modules.)
  • mesh_sheen: Float parameter between 0.0 and 1.0. Describes the sheen for the material. (Overwritten by other modules.)
  • mesh_specular: Float parameter between 0.0 and 1.0. Describes the specularity for the material. (Overwritten by other modules.)
  • render_engine: String parameter. The rendering engine to be used by Blender. Can be set to: 'CYCLES' (Default), 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'.
  • render_device: String parameter. The device to render on. Can be set to: 'CPU' (Default) or 'GPU'.
  • render_distance: Integer parameter. The maximum distance for the camera's furthest frustum plane in blender units. Default: 500000.
  • image_resolution_x: Integer parameter. The rendered 2D image's x size in pixel. Default: 1920.
  • image_resolution_y: Integer parameter. The rendered 2D image's y size in pixel. Default: 1080.
  • image_resolution_scale: Float parameter. Scales the image_resolution_x and image_resolution_y parameters by this value. Default: 1.0.
  • image_color_mode: String parameter. Image's color mode. Can be set to: 'BW', 'RGB' (Default), 'RGBA'.
  • image_bit_depth: Integer parameter. Describes the image's bit depth. Can be set to 8 (Default) or 16.
  • file_format: String parameter. The file format to save the image to. Can be set to: 'JPEG', 'PNG' (Default), 'TIFF', 'IRIS', 'JPEG2000', 'BMP', 'TARGA', 'TARGA_RAW'.
  • image_compression: Float paramter between 0.0 and 1.0. Sets the image compression rate. Default 0.0 (uncompressed).

rendering_binary

For rendering the segmentation, the following Rendering parameters are overwritten as such:

  • mesh_r: Overwritten to: 0.528
  • mesh_g: Overwritten to: 0.002
  • mesh_b: Overwritten to: 0.0013
  • mesh_roughness: Overwritten to: 0.65
  • mesh_metallic: Overwritten to: 0.0
  • mesh_sheen: Overwritten to: 0.0
  • mesh_specular: Overwritten to: 0.0

rendering_skeleton

For rendering the skeletonization, the following Rendering parameters are overwritten as such:

  • mesh_r: Overwritten to: 0.01
  • mesh_g: Overwritten to: 0.06
  • mesh_b: Overwritten to: 0.528
  • mesh_roughness: Overwritten to: 0.0
  • mesh_metallic: Overwritten to: 0.792
  • mesh_sheen: Overwritten to: 0.15
  • mesh_specular: Overwritten to: 0.233