Projection Shift¶
Description¶
Horizontal and vertical shift are calculated using a chosen method and added to the metadata. The vertical and horizontal shifts can be corrected using the ProjectionVerticalAlignment and SinogramAlignment (in ‘shift’ mode) plugins respectively. Method: Uses either skimage template_matching or orb feature tracking plus robust ransac matching to calculate the translation between different combinations of 10 consecutive projection images. A least squares solution to the shift values between images is calculated and returned for the middle 8 images.
Parameters
in_datasets:
visibility: datasets
dtype: "[list[],list[str]]"
description:
summary: A list of the dataset(s) to process.
verbose: A list of strings, where each string gives the name of a dataset that was either specified by a loader plugin or created as output to a previous plugin. The length of the list is the number of input datasets requested by the plugin. If there is only one dataset and the list is left empty it will default to that dataset.
default: "[]"
out_datasets:
visibility: datasets
dtype: "[list[],list[str]]"
description: Set the output dataset name
default: "['proj_shift']"
method:
visibility: intermediate
dtype: str
description: Method used to calculate the shift between images.
default: orb_ransac
options: "['template_matching', 'orb_ransac']"
template:
visibility: basic
dtype: "[list[str],None]"
description: "Position of the template to match (required) e.g. [300:500, 300:500]."
default: None
threshold:
visibility: intermediate
dtype: "[list[float,float],None]"
description: "e.g. [a, b] will set all values above a to b."
default: None
n_keypoints:
dependency:
method: orb_ransac
visibility: intermediate
dtype: int
description: Number of keypoints to use in ORB feature detector.
default: "20"
Key
visibility: The visibility level of the parameter
dtype: The type of data
description: A short explanation of the parameter
default: The default value
options: A list of permitted values
dependency: The name of the parameter and value which this parameter depends upon
range: A guide for the range of the parameter
Citations
No citations
API
-
class
ProjectionShift
[source] -
get_max_frames
()[source]
-
nOutput_datasets
()[source] The number of datasets created by the plugin
- Returns
Number of output datasets
-
post_process
()[source] This method is called after the process function in the pipeline framework as a post-processing step. All processes will have finished performing the main processing at this stage.
- Parameters
exp (experiment class instance) – An experiment object, holding input and output datasets
-
pre_process
()[source] This method is called immediately after base_pre_process().
-
process_frames
(data)[source] This method is called after the plugin has been created by the pipeline framework and forms the main processing step
- Parameters
data (list(np.array)) – A list of numpy arrays for each input dataset.
-
set_filter_padding
(in_data, out_data)[source] Should be overridden to define how wide the frame should be for each input data set
-
setup
()[source] This method is first to be called after the plugin has been created. It determines input/output datasets and plugin specific dataset information such as the pattern (e.g. sinogram/projection).
-