Project napari shapes onto other image layers?

Hi Everyone,

I have a stack of images. When I draw a shape in a particular depth, I would like to see (without adding addition shapes) its projection at other depths (maybe as a wire frame). Does anyone know of a way to accomplish this?



interesting… just to clarify the desired outcome:
a) are you talking about a purely visual effect? where you don’t actually add any new layers or modify existing ones (whether it be manually or automated)? If so, that’s not something that napari can do yet.

b) what might be possible is to write some code that looks at your shape, and then creates a new surface layer (instead of shapes) that projects that shape through the full volume and shows the perimeter of the shape throughout. would that suffice?

Hi @mirestrepo

Also, just looking for a few clarifications on what you’d like to see. When you say other depths do you still mean looking at 2D slices in a 2D rendering mode? Or do you mean full 3D rendering? If you want the full 3D rendering then as @talley suggests we might need to do some stuff with a surface layer, but if you only ever want 2D views then we should be able to stay within shapes.

I’m curious if you have played with examples/ as it contains two different shapes layers, one which is fundamentally 2D and is broadcast across all depths, the other which is fundamentally 3D and is only present on each layer.

I’m not sure if either of those are what you want. It sounds like you want something in between - where a shape is defined on one slice in a 3D volume but you can see projections into slices above and below. It sound quite analogous to a feature we have supported in the points layer n_dim mode, where we render points above and bellow the plane they are defined in to give the illusion of them being 3D spheres.

If you’re doing segmentation and want the pervious slice to guide the next slice you can copy and paste shapes from one layer to the next. Not sure if that helps