Centering360¶
Description¶
A plugin to calculate the centre of rotation
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: The default names
default: "['cor_preview', 'cor_broadcast']"
preview:
visibility: basic
dtype: preview
description: A slice list of required frames (sinograms) to use in the calculation of the centre of rotation (this will not reduce the data size for subsequent plugins).
default: "[]"
example: "The typical three dimensional data structure is [angles, detY, detZ], e.g. for sinogram choose [:,sliceNo,:] [angles, detZ, detY]. If the data is four dimensional, include a time parameter."
win_width:
visibility: basic
dtype: int
description: Width of window used for finding the overlap area
default: "100"
side:
visibility: basic
dtype: "[None,int]"
description: Overlap size. "None" corresponding to fully automated determination. "0" corresponding to the left side. "1" corresponding to the right side.
default: None
options: "['None', 1, 0]"
denoise:
visibility: intermediate
dtype: bool
description: Apply the gaussian filter if True
default: "True"
norm:
visibility: intermediate
dtype: bool
description: Apply the normalisation if True
default: "True"
use_overlap:
visibility: intermediate
dtype: bool
description: Use the combination of images in the overlap area for calculating correlation coefficients if True.
default: "True"
broadcast_method:
visibility: intermediate
dtype: str
options: "['median', 'mean', 'nearest', 'linear_fit']"
description:
summary: Method of broadcasting centre values calculated from preview slices to full dataset.
options:
median: None
mean: None
nearest: None
linear_fit: None
default: median
datasets_to_populate:
visibility: intermediate
dtype: "[list[],list[str]]"
description: A list of datasets which require this information
default: "[]"
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
Data processing methods and data acquisition for samples larger than the field of view in parallel-beam tomography by Vo, Nghia T et al.
Bibtex
@article{Vo:21,
author = {Nghia T. Vo and Robert C. Atwood and Michael Drakopoulos and Thomas Connolley},
journal = {Opt. Express},
keywords = {Digital image processing; Fluorescence tomography; Image processing; Image registration; Phase contrast; Phase retrieval},
number = {12},
pages = {17849--17874},
publisher = {OSA},
title = {Data processing methods and data acquisition for samples larger than the field of view in parallel-beam tomography},
volume = {29},
month = {Jun},
year = {2021},
url = {http://www.osapublishing.org/oe/abstract.cfm?URI=oe-29-12-17849},
doi = {10.1364/OE.418448},
abstract = {Parallel-beam tomography systems at synchrotron facilities have limited field of view (FOV) determined by the available beam size and detector system coverage. Scanning the full size of samples bigger than the FOV requires various data acquisition schemes such as grid scan, 360-degree scan with offset center-of-rotation (COR), helical scan, or combinations of these schemes. Though straightforward to implement, these scanning techniques have not often been used due to the lack of software and methods to process such types of data in an easy and automated fashion. The ease of use and automation is critical at synchrotron facilities where using visual inspection in data processing steps such as image stitching, COR determination, or helical data conversion is impractical due to the large size of datasets. Here, we provide methods and their implementations in a Python package, named Algotom, for not only processing such data types but also with the highest quality possible. The efficiency and ease of use of these tools can help to extend applications of parallel-beam tomography systems.},
}
Endnote
%0 Journal Article
%T Data processing methods and data acquisition for samples larger than the field of view in parallel-beam tomography
%A Vo, Nghia T
%A Atwood, Robert C
%A Drakopoulos, Michael
%A Connolley, Thomas
%J Optics Express
%V 29
%N 12
%P 17849-17874
%@ 1094-4087
%D 2021
%I Optical Society of America
API
-
class
Centering360
[source] -
calculate_curvature
(list_metric)[source] Calculate the curvature of a fitted curve going through the minimum value of a metric list.
- Parameters
list_metric (array_like) – 1D array. List of metrics.
- Returns
curvature (float) – Quadratic coefficient of the parabola fitting.
min_pos (float) – Position of the minimum value with sub-pixel accuracy.
-
correlation_metric
(mat1, mat2)[source] Calculate the correlation metric. Smaller metric corresponds to better correlation.
- Parameters
mat1 (array_like) –
mat2 (array_like) –
- Returns
Correlation metric.
- Return type
float
-
executive_summary
()[source] Provide a summary to the user for the result of the plugin.
- e.g.
Warning, the sample may have shifted during data collection
Filter operated normally
- Returns
A list of string summaries
-
find_overlap
(mat1, mat2, win_width, side=None, denoise=True, norm=False, use_overlap=False)[source] Find the overlap area and overlap side between two images (Ref. [1]) where the overlap side referring to the first image.
- Parameters
mat1 (array_like) – 2D array. Projection image or sinogram image.
mat2 (array_like) – 2D array. Projection image or sinogram image.
win_width (int) – Width of the searching window.
side ({None, 0, 1}, optional) – Only there options: None, 0, or 1. “None” corresponding to fully automated determination. “0” corresponding to the left side. “1” corresponding to the right side.
denoise (bool, optional) – Apply the Gaussian filter if True.
norm (bool, optional) – Apply the normalization if True.
use_overlap (bool, optional) – Use the combination of images in the overlap area for calculating correlation coefficients if True.
- Returns
overlap (float) – Width of the overlap area between two images.
side (int) – Overlap side between two images.
overlap_position (float) – Position of the window in the first image giving the best correlation metric.
References
-
fix_transport
()[source]
-
get_max_frames
()[source]
-
nOutput_datasets
()[source] The number of datasets created by the plugin
- Returns
Number of output datasets
-
populate_meta_data
(key, value)[source]
-
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] Find the center-of-rotation (COR) in a 360-degree scan with offset COR use the method presented in Ref. [1].
- Parameters
data (array_like) – 2D array. 360-degree sinogram.
- Returns
cor – Center-of-rotation.
- Return type
float
References
-
search_overlap
(mat1, mat2, win_width, side, denoise=True, norm=False, use_overlap=False)[source] Calculate the correlation metrics between a rectangular region, defined by the window width, on the utmost left/right side of image 2 and the same size region in image 1 where the region is slided across image 1.
- Parameters
mat1 (array_like) – 2D array. Projection image or sinogram image.
mat2 (array_like) – 2D array. Projection image or sinogram image.
win_width (int) – Width of the searching window.
side ({0, 1}) – Only two options: 0 or 1. It is used to indicate the overlap side respects to image 1. “0” corresponds to the left side. “1” corresponds to the right side.
denoise (bool, optional) – Apply the Gaussian filter if True.
norm (bool, optional) – Apply the normalization if True.
use_overlap (bool, optional) – Use the combination of images in the overlap area for calculating correlation coefficients if True.
- Returns
list_metric (array_like) – 1D array. List of the correlation metrics.
offset (int) – Initial position of the searching window where the position corresponds to the center of the window.
-
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).
-