Skip to content

feature request: to_affine(broadcast=True) #83

Description

@jo-mueller

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions