Something that is super-hard in napari are the following boundary conditions:
- Channels are separate layers in napari. That means, a napari implementation will always need to figure out which column/row in the affine matrix corresponds to the channel dimension, delete it from the affine and pass that to the viewer
- The affine must be square; That means that if a
projectAxis is encountered that does an up-projection, napari needs to broadcast the passed lower-dimensional array to make it fit the target dimension.
Consequence: an implementation needs to split transforms in a transform sequence into transforms before and after the projectAxis and make the lower-dimensional transforms artifically high-dim and then pass the whole thing to napari
So...I was wondering whether it would be possible to solve this whole ordeal in a simpler fashion over here, i.e., by adding a broadcast=True option to the to_affine() function or in the simplify() function? That flag would then have the path finder detect a projectAxis transform and insert (0...1...0) row/column vector to every transform until the projectAxis transform.
It's very specialcase to napari so I'm not sure whether that's too tailored or whether use cases could also profit from this.
Something that is super-hard in napari are the following boundary conditions:
projectAxisis encountered that does an up-projection, napari needs to broadcast the passed lower-dimensional array to make it fit the target dimension.Consequence: an implementation needs to split transforms in a transform sequence into transforms before and after the
projectAxisand make the lower-dimensional transforms artifically high-dim and then pass the whole thing to napariSo...I was wondering whether it would be possible to solve this whole ordeal in a simpler fashion over here, i.e., by adding a
broadcast=Trueoption to theto_affine()function or in thesimplify()function? That flag would then have the path finder detect aprojectAxistransform and insert (0...1...0) row/column vector to every transform until theprojectAxistransform.It's very specialcase to napari so I'm not sure whether that's too tailored or whether use cases could also profit from this.