To support generating overlay like this one (useful to visualize registration differences):
Image copied from here
An idea would be to add a new blending mode. Currently we have the following:
Would that generally be useful ?
Maybe the blending should be adding and you would pick colors that add together to white / gray. Then you’d a get grayscale image where the images are registered well and otherwise some of one or the other color
Hi - can you elaborate on what blend function that would be?
I am assuming we would have to write a custom blend function.
For reference, here is the code used to generate the figure above.
This file has been truncated.
def overlay_slices(L, R, slice_index=None, slice_type=1, ltitle='Left',
r"""Plot three overlaid slices from the given volumes.
Creates a figure containing three images: the gray scale k-th slice of
the first volume (L) to the left, where k=slice_index, the k-th slice of
the second volume (R) to the right and the k-th slices of the two given
images on top of each other using the red channel for the first volume and
the green channel for the second one. It is assumed that both volumes have
the same shape. The intended use of this function is to visually assess the
quality of a registration result.
L : array, shape (S, R, C)
the first volume to extract the slice from plotted to the left
R : array, shape (S, R, C)
the second volume to extract the slice from, plotted to the right
slice_index : int (optional)
the index of the slices (along the axis given by slice_type) to be
Hmm, I see, yes that could be useful. It would be easy enough to add a blend mode yes. Also though very easy to have a scripted module or cli that just makes a red/green mix of the two volumes with hot update. Could also be added as an extension to the CompareVolumes module. I don’t have a strong preference.
We currently do not need this feature,
@Samuel_Gerber and I discussed this in the context of a proposal and I wanted to have this documented so that we could refer to it at a later time.