Repository navigation
Transform section pattern for some cases of non-auto axis image saver - #654
Conversation
For cases where the `axis` parameter of the image saver is configured to: - not be `auto` - and the given integer value is not the slicing dim represented by the pattern associated with the section the image saver method is in then the images saved are likely not what is intended. For example, consider the following sequence of methods: - normaliser - stats calculator (produces side output) - rescaler (depends on side output of global stats) - image saver (with `axis` set to 1) The fact that the rescaler requires the side output produced by the stats calculator means that a new section is started after the stats calculator. Thus, where will be two sections made from this sequence of methods. The normaliser will have the projection pattern, and this means that the first section has the projection pattern (which has slicing dimension 0). The rescaler has the "all" pattern and so does the image saver. This will ultimately result in the second section having the projection pattern, which means that a chunk will be split into blocks of projections. However, the image saver's setting of `axis=1` will result in saving images sliced along axis 1 of each of the blocks of projections, which are something like "partial sinograms" within each block of projections. This is unlikely to be what the user intended, and instead what was probably intended was to save the output of the rescaler as "full sinograms". In order to accomplish this, a reslice operation is needed between the first and second section, and this can be achieved by transforming the pattern for the second section from projection to sinogram. The changes made in this commit perform such a transformation where relevant. Note that the above example is one specific case, but more generally, this transformation will be applied to a section containing an image saver method if the image saver is configured with an `axis` value that is not `auto` and this value is not the slicing dim represented by the pattern of the image saver's section.
68ac701 to
abc15b3
Compare
|
thanks! So, if I understand correctly, the reslice operation happens only if the user select the right |
I'm not sure what "the right
Perhaps a succinct way to describe the behaviour is the following: if the |
|
thanks, yes this axis |
|
The IRIS GPU runners are still experiencing issues, but the framework and small data tests pass locally, so I'll go ahead and merge this. |
Fixes https://jira.diamond.ac.uk/browse/IMGDA-606
For cases where the
axisparameter of the image saver is configured to:autothen the images saved are likely not what is intended.
For example, consider the following sequence of methods:
axisset to 1)The fact that the rescaler requires the side output produced by the stats calculator means that a new section is started after the stats calculator. Thus, where will be two sections made from this sequence of methods.
The normaliser will have the projection pattern, and this means that the first section has the projection pattern (which has slicing dimension 0).
The rescaler has the "all" pattern and so does the image saver. This will ultimately result in the second section having the projection pattern, which means that a chunk will be split into blocks of projections.
However, the image saver's setting of
axis=1will result in saving images sliced along axis 1 of each of the blocks of projections, which are something like "partial sinograms" within each block of projections. This is unlikely to be what the user intended, and instead what was probably intended was to save the output of the rescaler as "full sinograms". In order to accomplish this, a reslice operation is needed between the first and second section, and this can be achieved by transforming the pattern for the second section from projection to sinogram.The changes made in this commit perform such a transformation where relevant.
Note that the above example is one specific case, but more generally, this transformation will be applied to a section containing an image saver method if the image saver is configured with an
axisvalue that is notautoand this value is not the slicing dim represented by the pattern of the image saver's section.Checklist