Ticket #1314 (closed defect: fixed)
Opened 2012-07-11T11:51:38-05:00
Last modified 2012-10-16T14:53:35-05:00
Enhance OPS equation language
Reported by: | bdezonia | Owned by: | bdezonia |
---|---|---|---|
Priority: | major | Milestone: |
|
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 2012-07-16T10:38:58-05:00 by bdezonia
comment:3 Changed 2012-07-23T14:25:16-05:00 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 2012-07-23T15:17:40-05:00 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 2012-07-24T12:17:56-05:00 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.
See also #1228