two small technical queries...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

two small technical queries...

Kenneth Sloan-2
We are producing yet another pair of data gathering plugins.  I have two questions that I could probably answer by scouring the documentation.  Perhaps someone will be kind enough to point me at illuminating examples.

*Java plugin
*processing image stacks (8-bit, 1000x500x500 or so)

Q1) what’s the best way to get the user to drop multiple classes of Points, giving x,y,z,<category> for each point.  I’d like different colors for the markers, and I’d like the markers to persist as the user browses through the stack

Q2) same question, but for Polygons.  Our current version (a modification of a previous plugin) limits the polygons to be planar, and lie in a single slice (and display only when viewing that slice).  I’d like to allow polyLINES w/ x,y,z coordinates, and I’d like the graphics to persist as the user browses the stack.

Our current problem with the points is that they are all the same color; our current problem with the polygons is that they appear only in the constant-z slice in which they were defined.

Most useful would be exemplary code that allows a user to select, mark, and edit points and non-planar polylines.


--
Kenneth Sloan
[hidden email] <mailto:[hidden email]>
Vision is the art of seeing what is invisible to others.





--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: two small technical queries...

Michael Schmid
Hi Kenneth,

you can have points with different color as overlay.  The following macro
is an example:

  setTool("multipoint");
  run("Point Tool...", "type=Hybrid color=Green size=Small show counter=0");
  setTool("point");

  run("Point Tool...", "type=Hybrid color=Blue size=Small");
  makePoint(132, 64);
  run("Add Selection...");  //add to overlay
  run("Point Tool...", "type=Hybrid color=Red size=Small");
  makePoint(122, 74);
  run("Add Selection...");  //add to overlay

  run("Select None");

Strangely, it seems that the 'Set Stack Positions' in the Overlay Options
is ignored for points: "Set Stack Position" in the Overlay Options does
not determine whether they are linked to stack slices.  The way out is
first selecting the multi point tool, setting 'Show all' there (which sets
Prefs.showAllPoints), then switching back to single points so you can have
different colors.

Concerning a polygon with its vertices having 3 coordinates, x, y, z
(z=stack slice):  I do not see how this could work.  In general, the
intersection of a 3D polygon with a slice will be single points, not
lines.  Maybe you are looking for a 3D polyhedron?  The intersection of
the polyhedron planes with slices are lines.

Michael
______________________________________________________________________


On Mon, December 21, 2015 19:57, Kenneth Sloan wrote:

> We are producing yet another pair of data gathering plugins.  I have two
> questions that I could probably answer by scouring the documentation.
> Perhaps someone will be kind enough to point me at illuminating examples.
>
> *Java plugin
> *processing image stacks (8-bit, 1000x500x500 or so)
>
> Q1) what’s the best way to get the user to drop multiple classes of
> Points, giving x,y,z,<category> for each point.  I’d like different
> colors for the markers, and I’d like the markers to persist as the user
> browses through the stack
>
> Q2) same question, but for Polygons.  Our current version (a modification
> of a previous plugin) limits the polygons to be planar, and lie in a
> single slice (and display only when viewing that slice).  I’d like to
> allow polyLINES w/ x,y,z coordinates, and I’d like the graphics to
> persist as the user browses the stack.
>
> Our current problem with the points is that they are all the same color;
> our current problem with the polygons is that they appear only in the
> constant-z slice in which they were defined.
>
> Most useful would be exemplary code that allows a user to select, mark,
> and edit points and non-planar polylines.
>
>
> --
> Kenneth Sloan
> [hidden email] <mailto:[hidden email]>
> Vision is the art of seeing what is invisible to others.
>
>
>
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html