1
|
|
|
from savu.plugins.plugin_tools import PluginTools |
2
|
|
|
|
3
|
|
|
|
4
|
|
|
class TomoPhantomArtifactsTools(PluginTools): |
5
|
|
|
"""A plugin to add artifacts to the generated synthetic data using TomoPhantom |
6
|
|
|
""" |
7
|
|
|
|
8
|
|
|
def define_parameters(self): |
9
|
|
|
""" |
10
|
|
|
artifacts_noise_type: |
11
|
|
|
visibility: intermediate |
12
|
|
|
dtype: str |
13
|
|
|
description: Set the noise type, Poisson or Gaussian. |
14
|
|
|
default: Poisson |
15
|
|
|
artifacts_noise_amplitude: |
16
|
|
|
visibility: intermediate |
17
|
|
|
dtype: float |
18
|
|
|
description: Define the amplitude of noise. |
19
|
|
|
default: 100000 |
20
|
|
|
dependency: |
21
|
|
|
artifacts_noise_type |
22
|
|
|
artifacts_misalignment_maxamplitude: |
23
|
|
|
visibility: advanced |
24
|
|
|
dtype: [None,int] |
25
|
|
|
description: Incorporate misalignment into projections (in pixels). |
26
|
|
|
default: None |
27
|
|
|
artifacts_zingers_percentage: |
28
|
|
|
visibility: intermediate |
29
|
|
|
dtype: [None,float] |
30
|
|
|
description: Add broken pixels to projections, a percent from total pixels number |
31
|
|
|
default: None |
32
|
|
|
artifacts_zingers_modulus: |
33
|
|
|
visibility: advanced |
34
|
|
|
dtype: int |
35
|
|
|
description: modulus to control the amount of 4/6 pixel clusters (zingers) to be added |
36
|
|
|
default: 10 |
37
|
|
|
dependency: |
38
|
|
|
artifacts_zingers_percentage |
39
|
|
|
artifacts_stripes_percentage: |
40
|
|
|
visibility: intermediate |
41
|
|
|
dtype: [None,float] |
42
|
|
|
description: The amount of stripes in the data (percent-wise) |
43
|
|
|
default: None |
44
|
|
|
artifacts_stripes_maxthickness: |
45
|
|
|
visibility: advanced |
46
|
|
|
dtype: float |
47
|
|
|
description: Defines the maximal thickness of a stripe. |
48
|
|
|
default: 3.0 |
49
|
|
|
dependency: |
50
|
|
|
artifacts_stripes_percentage |
51
|
|
|
artifacts_stripes_intensity: |
52
|
|
|
visibility: advanced |
53
|
|
|
dtype: float |
54
|
|
|
description: To incorporate the change of intensity in the stripe. |
55
|
|
|
default: 0.3 |
56
|
|
|
dependency: |
57
|
|
|
artifacts_stripes_percentage |
58
|
|
|
artifacts_stripes_type: |
59
|
|
|
visibility: advanced |
60
|
|
|
dtype: str |
61
|
|
|
options: [full, partial] |
62
|
|
|
description: Set the stripe type to full or partial. |
63
|
|
|
default: full |
64
|
|
|
dependency: |
65
|
|
|
artifacts_stripes_percentage |
66
|
|
|
artifacts_stripes_variability: |
67
|
|
|
visibility: advanced |
68
|
|
|
dtype: float |
69
|
|
|
description: The intensity variability of a stripe. |
70
|
|
|
default: 0.007 |
71
|
|
|
dependency: |
72
|
|
|
artifacts_stripes_percentage |
73
|
|
|
artifacts_pve: |
74
|
|
|
visibility: advanced |
75
|
|
|
dtype: [None,int] |
76
|
|
|
description: the strength of partial volume effect, linked to the \ |
77
|
|
|
limited resolution of the detector, try 1 or 3 |
78
|
|
|
default: None |
79
|
|
|
artifacts_fresnel_distance: |
80
|
|
|
visibility: advanced |
81
|
|
|
dtype: [None,int] |
82
|
|
|
description: observation distance for fresnel propagator, e.g. 20 |
83
|
|
|
default: None |
84
|
|
|
artifacts_fresnel_scale_factor: |
85
|
|
|
visibility: advanced |
86
|
|
|
dtype: float |
87
|
|
|
description: fresnel propagator sacaling |
88
|
|
|
default: 10 |
89
|
|
|
dependency: |
90
|
|
|
artifacts_fresnel_distance |
91
|
|
|
artifacts_fresnel_wavelenght: |
92
|
|
|
visibility: advanced |
93
|
|
|
dtype: float |
94
|
|
|
description: fresnel propagator wavelength |
95
|
|
|
default: 0.003 |
96
|
|
|
dependency: |
97
|
|
|
artifacts_fresnel_distance |
98
|
|
|
in_datasets: |
99
|
|
|
visibility: datasets |
100
|
|
|
dtype: [list[],list[str]] |
101
|
|
|
description: Default input dataset names. |
102
|
|
|
default: "['synth_proj_data']" |
103
|
|
|
out_datasets: |
104
|
|
|
visibility: datasets |
105
|
|
|
dtype: [list[],list[str]] |
106
|
|
|
description: Default out dataset names. |
107
|
|
|
default: "['synth_proj_data_artifacts']" |
108
|
|
|
""" |
109
|
|
|
|
110
|
|
|
|
111
|
|
|
def citation(self): |
112
|
|
|
""" |
113
|
|
|
TomoPhantom is a software package to generate 2D-4D |
114
|
|
|
analytical phantoms and their Radon transforms for various |
115
|
|
|
testing purposes. |
116
|
|
|
bibtex: |
117
|
|
|
@article{kazantsev2018tomophantom, |
118
|
|
|
title={TomoPhantom, a software package to generate 2D-4D analytical phantoms for CT image reconstruction algorithm benchmarks}, |
119
|
|
|
author={Kazantsev, Daniil and Pickalov, Valery and Nagella, Srikanth and Pasca, Edoardo and Withers, Philip J}, |
120
|
|
|
journal={SoftwareX}, |
121
|
|
|
volume={7}, |
122
|
|
|
pages={150--155}, |
123
|
|
|
year={2018}, |
124
|
|
|
publisher={Elsevier} |
125
|
|
|
} |
126
|
|
|
endnote: |
127
|
|
|
%0 Journal Article |
128
|
|
|
%T TomoPhantom, a software package to generate 2D-4D analytical phantoms for CT image reconstruction algorithm benchmarks |
129
|
|
|
%A Kazantsev, Daniil |
130
|
|
|
%A Pickalov, Valery |
131
|
|
|
%A Nagella, Srikanth |
132
|
|
|
%A Pasca, Edoardo |
133
|
|
|
%A Withers, Philip J |
134
|
|
|
%J SoftwareX |
135
|
|
|
%V 7 |
136
|
|
|
%P 150-155 |
137
|
|
|
%@ 2352-7110 |
138
|
|
|
%D 2018 |
139
|
|
|
%I Elsevier |
140
|
|
|
|
141
|
|
|
doi: "10.1016/j.softx.2018.05.003" |
142
|
|
|
""" |
143
|
|
|
|