Closed thewtex closed 3 years ago
When passing ndarray from the ImJoy interface, since there is no way to explicitly set the pixelType, maybe we should support additional options for the setImage
function?
When passing ndarray from the ImJoy interface, since there is no way to explicitly set the pixelType, maybe we should support additional options for the setImage function?
To prevent option creep/explosion on the viewer interface, can the object be converted, then the pixelType
set?:
Hi, I don't fully get, how would you do it?
E.g.
itkImage = ndarrayToItkImage(ndarray)
itkImage.imageType.pixelType = 14
viewer.setImage(itkImage)
Aha, well, yes and no, for js plugins we can potentially do that, but it will be hard for Python plugins where we just want to call viewer.setImage(numpy_array)
. We may not want to always import itk module, or have the ndarray2ItkImage() function defined in the caller plugin.
Since we are supporting layers in the viewer, I guess allowing an extra config object will be useful anyway, for example setting the name, colormap, contrast for the image.
Let's keep pushing forward Python plugins that provide the desired functionality.
Eventually in the config object, we will support an entire image configuration (data + complete config).
:tada: This PR is included in version 11.1.6 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Do not make an implicit assumption so independentComponents can be enabled via pixelType.