Test Failed
Pull Request — master (#872)
by
unknown
04:20
created

savu.plugins.centering.centering360_tools   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 79
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 79
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A Centering360Tools.define_parameters() 0 2 1
A Centering360Tools.citation() 0 2 1
1
from savu.plugins.plugin_tools import PluginTools
2
3
class Centering360Tools(PluginTools):
4
    """A plugin to calculate the centre of rotation
5
    """
6
    def define_parameters(self):
7
        """
8
        preview:
9
             visibility: basic
10
             dtype: preview
11
             description: A slice list of required frames (sinograms) to use in
12
               the calculation of the centre of rotation (this will not reduce
13
               the data size for subsequent plugins).
14
             default: '[]'
15
             example: 'The typical three dimensional data structure is
16
                [angles, detY, detZ], e.g. for sinogram choose [:,sliceNo,:]
17
                [angles, detZ, detY]. If the data is four dimensional, include
18
                a time parameter.'
19
        win_width:
20
             visibility: basic
21
             dtype: int
22
             description: Width of window used for finding the overlap area
23
             default: 100
24
        side:
25
             visibility: basic
26
             dtype: [None,int]
27
             description: Overlap size. "None" corresponding to fully automated
28
               determination. "0" corresponding to the left side.
29
                "1" corresponding to the right side.
30
             default: None
31
             options: [None, 1, 0]
32
        denoise:
33
             visibility: intermediate
34
             dtype: bool
35
             description: Apply the gaussian filter if True
36
             default: True
37
        norm:
38
             visibility: intermediate
39
             dtype: bool
40
             description: Apply the normalisation if True
41
             default: True
42
        use_overlap:
43
             visibility: intermediate
44
             dtype: bool
45
             description: Use the combination of images in the overlap area for calculating
46
               correlation coefficients if True.
47
             default: True
48
49
50
        broadcast_method:
51
             visibility: intermediate
52
             dtype: str
53
             options: [median, mean, nearest, linear_fit]
54
             description:
55
               summary: Method of broadcasting centre values calculated
56
                 from preview slices to full dataset.
57
               options:
58
                   median:
59
                   mean:
60
                   nearest:
61
                   linear_fit:
62
             default: median
63
        datasets_to_populate:
64
             visibility: intermediate
65
             dtype: [list[],list[str]]
66
             description: A list of datasets which require this information
67
             default: []
68
        out_datasets:
69
             visibility: datasets
70
             dtype: [list[],list[str]]
71
             description: The default names
72
             default: "['cor_preview', 'cor_broadcast']"
73
74
75
        """
76
77
    def citation(self):
78
        """
79
        The center of rotation for this reconstruction was calculated
80
        automatically using the method described in this work
81
        bibtex:
82
                @article{Vo:21,
83
                author = {Nghia T. Vo and Robert C. Atwood and Michael Drakopoulos and Thomas Connolley},
84
                journal = {Opt. Express},
85
                keywords = {Digital image processing; Fluorescence tomography; Image processing; Image registration; Phase contrast; Phase retrieval},
86
                number = {12},
87
                pages = {17849--17874},
88
                publisher = {OSA},
89
                title = {Data processing methods and data acquisition for samples larger than the field of view in parallel-beam tomography},
90
                volume = {29},
91
                month = {Jun},
92
                year = {2021},
93
                url = {http://www.osapublishing.org/oe/abstract.cfm?URI=oe-29-12-17849},
94
                doi = {10.1364/OE.418448},
95
                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.},
96
                }
97
98
        endnote:
99
                %0 Journal Article
100
                %T Data processing methods and data acquisition for samples larger than the field of view in parallel-beam tomography
101
                %A Vo, Nghia T
102
                %A Atwood, Robert C
103
                %A Drakopoulos, Michael
104
                %A Connolley, Thomas
105
                %J Optics Express
106
                %V 29
107
                %N 12
108
                %P 17849-17874
109
                %@ 1094-4087
110
                %D 2021
111
                %I Optical Society of America
112
        doi: "https://doi.org/10.1364/OE.418448"
113
114
        """
115