Commit 5eff60a
committed
Fix preview value of VoCentering's input data not persisting across iterations
One of the things that occurs after a plugin finishes running is that it
resets the preview value for all of its datasets:
https://github.com/DiamondLightSource/Savu/blob/df7418a8189a54d13d8cddfd0a17f6295611cd1a/savu/plugins/driver/plugin_driver.py#L67.
If there is a non-empty preview value set in VoCentering and it is in an
iterative loop, the above results in VoCentering ignoring its preview
value on iterations after the 0th one, and instead calculating the
centre of rotation on however many sinograms were provided by the
previewed data outputted by the loader plugin.
For example, when using VoCentering in an iterative loop, if:
- the loader has a non-empty preview value of [:, 200:800, :]
- VoCentering has a non-empty preview value of [:, mid, :]
this then causes VoCentering on iteration 0 to calculate the centre of
rotation of 1 sinogram (expected behaviour), but on iteration 1 (and
onwards) to calculate the centre of rotation of 600 sinograms
(unexpected behaviour).
In this example, on all iterations it's expected that only a single
sinogram is processed, which corresponds to the middle slice of the
previewed data outputted by the loader. This happens on iteration 0, but
does not happen on subsequent iterations. Instead, what happens on
iteration 1 and onwards is that 600 sinograms are processed by
VoCentering, which correspond to the entire previewed data outputted by
the loader.
This change:
- updates the preview value in the `Preview` object associated with the
input dataset of VoCentering on every iteration after the 0th one
- subsequetly updates the `PluginData` object associated to the input
dataset of VoCentering on every iteration after the 0th one (this is
so then the transport layer is made aware of the preview value being
reset)
and thus preserves the VoCentering plugin's preview value across all
iterations, allowing VoCentering to process the expected number of
sinograms on every iteration.1 parent 732c6e4 commit 5eff60a
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
182 | 192 | | |
183 | 193 | | |
184 | 194 | | |
| |||
0 commit comments