Ticket #1314 (closed defect: fixed)

Opened 7 years ago

Last modified 6 years ago

Enhance OPS equation language

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej2-b4-plugins
Component: ImgLib2 OPS Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking: #1333

Description

In IJ1 the Process > Math > Macro language defines a couple helper variables such as "a" (angle from origin), "d" (distance from center), "x, y, z" (coord values), "v" (pixel value), and "w, h" (dimensions). Extend the OPS equation language to handle some or all of these and make IJ2 more closely compatible with IJ1.

Note currently "v" is handled as "img" in OPS. In general I want to save single letter strings for variable declarations.

Since multidimimensionality is the norm we can't just have x, y, and z. We let user define names of axes (like u,v,w) and refer to them. So x,y,z handled.

"a" is not handled. We could define something like "angle" but it would be from origin and in IJ2 that is top left. A little weird.

"d" is currently not handled. We could define something like "distctr".

"w" and "h" are not multidim friendly. We need a way to handle sizes of arbitrary dimensions. Maybe overload the max() function. So you can say "max(u)". Or more easily define "dim(u)".

Change History

comment:1 Changed 7 years ago by bdezonia

See also #1228

Last edited 7 years ago by bdezonia (previous) (diff)

comment:2 Changed 7 years ago by bdezonia

  • Blocking 1333 added

comment:3 Changed 7 years ago by bdezonia

With imglib commit 4a3efbcc1c073fe8ca73692fe1b924f118010698 references to image dimensions can now be made in the equation language. For instance by "dim(x)" or "dim(w)" etc.

comment:4 Changed 7 years ago by bdezonia

With imglib commit 23afe2ee2b62454fa3461d36ec082a1361d8c571 "dctr" is now supported. The only thing not in place is a default angle measure which we may not support. Discuss with others.

comment:5 Changed 7 years ago by bdezonia

  • Status changed from new to closed
  • Resolution set to fixed

With imglib commit f9d69e03a2c152aa0384e2cafdeb1079caeaa863 references to the angle a point makes with the origin is now supported. One can specify angle(x,y) or angle(x,z) or angle(u,v) etc.

comment:6 Changed 6 years ago by bdezonia

Last edited 6 years ago by bdezonia (previous) (diff)
Note: See TracTickets for help on using tickets.