Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fiji>Image>Overlay>List elements returns only the first 63 independent points of many more #67

Closed
lollopus opened this issue Oct 9, 2018 · 5 comments

Comments

@lollopus
Copy link

lollopus commented Oct 9, 2018

The issue came up with an output file of Alex Herbert's FindFoci plugin, when using the option to label maxima as overlay points. In particular I have an image with 300 points, but the List elements command in Fiji returns only the first 63!

0	null	Point	126	4851	1	1	cyan	yellow	1	14	0	14	0
1	null	Point	123	5721	1	1	cyan	yellow	1	18	0	18	0
2	null	Point	1409	1256	1	46	cyan	yellow	1	21	0	21	0
3	null	Point	1409	1212	1	1	cyan	yellow	1	22	0	22	0
4	null	Point	18	3805	1	1	cyan	yellow	1	24	0	24	0
5	null	Point	117	5728	1	1	cyan	yellow	1	27	0	27	0
6	null	Point	539	5791	1	1	cyan	yellow	1	40	0	40	0
7	null	Point	20	1940	1	1	cyan	yellow	1	43	0	43	0
8	null	Point	108	4858	1	1	cyan	yellow	1	44	0	44	0
9	null	Point	257	4857	622	146	cyan	yellow	1	47	0	47	0
10	null	Point	606	1135	804	3826	cyan	yellow	1	48	0	48	0
11	null	Point	621	5029	1	1	cyan	yellow	1	49	0	49	0
12	null	Point	485	5039	264	21	cyan	yellow	1	50	0	50	0
13	null	Point	637	4914	216	878	cyan	yellow	1	51	0	51	0
14	null	Point	508	5146	1	1	cyan	yellow	1	53	0	53	0
15	null	Point	1401	3387	3	44	cyan	yellow	1	54	0	54	0
16	null	Point	496	5389	1	1	cyan	yellow	1	55	0	55	0
17	null	Point	17	3387	21	456	cyan	yellow	1	56	0	56	0
18	null	Point	19	209	308	2533	cyan	yellow	1	57	0	57	0
19	null	Point	17	2702	613	2692	cyan	yellow	1	58	0	58	0
20	null	Point	155	4531	1	1	cyan	yellow	1	59	0	59	0
21	null	Point	18	1847	624	3524	cyan	yellow	1	61	0	61	0
22	null	Point	158	3965	1188	1632	cyan	yellow	1	62	0	62	0
23	null	Point	81	4255	99	307	cyan	yellow	1	63	0	63	0
24	null	Point	147	3921	1257	562	cyan	yellow	1	64	0	64	0
25	null	Point	143	3898	1214	683	cyan	yellow	1	65	0	65	0
26	null	Point	55	3878	1307	658	cyan	yellow	1	66	0	66	0
27	null	Point	21	1548	1390	2697	cyan	yellow	1	67	0	67	0
28	null	Point	68	924	1341	3676	cyan	yellow	1	68	0	68	0
29	null	Point	105	4387	143	606	cyan	yellow	1	69	0	69	0
30	null	Point	70	4279	76	241	cyan	yellow	1	70	0	70	0
31	null	Point	21	1752	230	4005	cyan	yellow	1	71	0	71	0
32	null	Point	35	4179	235	879	cyan	yellow	1	72	0	72	0
33	null	Point	18	1515	1393	4187	cyan	yellow	1	73	0	73	0
34	null	Point	19	1867	108	2508	cyan	yellow	1	74	0	74	0
35	null	Point	150	4825	1004	218	cyan	yellow	1	75	0	75	0
36	null	Point	89	4411	134	1382	cyan	yellow	1	76	0	76	0
37	null	Point	14	3757	1108	1624	cyan	yellow	1	77	0	77	0
38	null	Point	15	4249	226	1544	cyan	yellow	1	78	0	78	0
39	null	Point	30	4243	192	1550	cyan	yellow	1	79	0	79	0
40	null	Point	84	4737	1049	1056	cyan	yellow	1	80	0	80	0
41	null	Point	29	4019	184	1625	cyan	yellow	1	81	0	81	0
42	null	Point	12	1338	1399	4040	cyan	yellow	1	82	0	82	0
43	null	Point	20	4336	181	1425	cyan	yellow	1	83	0	83	0
44	null	Point	17	3866	1129	1916	cyan	yellow	1	84	0	84	0
45	null	Point	13	4253	215	1459	cyan	yellow	1	85	0	85	0
46	null	Point	75	4346	1098	1416	cyan	yellow	1	86	0	86	0
47	null	Point	18	3705	186	2073	cyan	yellow	1	87	0	87	0
48	null	Point	18	3823	156	1868	cyan	yellow	1	88	0	88	0
49	null	Point	18	3739	219	2040	cyan	yellow	1	89	0	89	0
50	null	Point	64	4854	173	905	cyan	yellow	1	90	0	90	0
51	null	Point	18	3837	211	1941	cyan	yellow	1	91	0	91	0
52	null	Point	18	3848	168	1944	cyan	yellow	1	92	0	92	0
53	null	Point	43	4841	198	906	cyan	yellow	1	93	0	93	0
54	null	Point	98	4918	566	703	cyan	yellow	1	94	0	94	0
55	null	Point	17	3882	113	1803	cyan	yellow	1	95	0	95	0
56	null	Point	132	5382	46	313	cyan	yellow	1	96	0	96	0
57	null	Point	145	4990	514	733	cyan	yellow	1	97	0	97	0
58	null	Point	10	5617	145	80	cyan	yellow	1	98	0	98	0
59	null	Point	170	4848	92	881	cyan	yellow	1	99	0	99	0
60	null	Point	21	5301	145	455	cyan	yellow	1	100	0	100	0
61	null	Point	153	5358	67	402	cyan	yellow	1	101	0	101	0
62	null	Point	724	5334	1	1	cyan	yellow	1	105	0	105	0

@rasband
Copy link
Member

rasband commented Oct 9, 2018

Please provide a minimal and complete example that reproduces this problem. Something like the following JavaScript that lists 5000 points.

  n = 5000;
  w = 1000, h = 700;
  img = IJ.createImage("Demo","8-bit black",w,h,1);
  ran = new Random();
  overlay = new Overlay();
  for (i=0; i<n; i++) {
      x = ran.nextFloat()*w;
      y = ran.nextFloat()*h;
      overlay.add(new PointRoi(x,y));
  }
  img.setOverlay(overlay);
  img.show();
  IJ.run("List Elements", "");

@lollopus
Copy link
Author

lollopus commented Oct 9, 2018

I cannot reproduce this programmatically so I'll repost this issue in Alex's GSDC repository instead.

Sorry @rasband

@ctrueden ctrueden closed this as completed Oct 9, 2018
@imagejan
Copy link
Member

For the record, the new issue is now here: aherbert/gdsc#5

@lollopus
Copy link
Author

lollopus commented Oct 10, 2018

I'm reporting here the results of my interaction with Alex Herbert on this issue.

There is no bug either in ImageJ or FindFoci: FindFoci labels maxima by adding a PointRoi as an overlay for each slice of the image stack. Each of these PointRois may, in turn, contain one or more point maxima.

I did not realize this when I examined the output table of the ListElements command, wrongly assuming that each line of the table consisted of just 1 point.

This brings me to a feature enhancement suggestion: to add in the results table a column for the .npoints field of any PolygonRois present in the overlay. This would avoid any confusion such as the one in which I incurred.

@rasband
Copy link
Member

rasband commented Oct 10, 2018

The latest ImageJ daily build (1.52h31) adds a "Points" column to the Image>Overlay>List Elements table. View the code changes at d320de6.

screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants