These are chat archives for fiji/fiji
ops.transform().project(imp, ops.stats().max, 1)but IJ2 want the first argument to be out. Do I need to create an empty ImgPlus ? Can't I just get the out as the return object of the ops (the Python way) ?
Got it with that
z_dim = data.dimensionIndex(Axes.Z) projected_dimensions = [data.dimension(d) for d in range(0, data.numDimensions()) if d != z_dim] z_projected = ops.create().img(projected_dimensions) max_op = ops.op(Ops.Stats.Max, data) ops.transform().project(z_projected, data, max_op, z_dim) ij.ui().show("z_proj", z_projected)
If you know a quicker way to do it that would be cool (5 lines for a z projection seems pretty long...)
ops.create().somethingis the way to precreate the needed output image. Yes, we want the framework to do that automatically whenever possible, and have taken care to make many ops work this way. But not all of them do yet.