NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 1265 - Cell Counter Hates Me
Cell Counter Hates Me
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: Plugins
unspecified
Macintosh Mac OS
: P4 normal
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2016-04-29 14:26 CDT by amandajensen09
Modified: 2016-05-02 11:36 CDT
3 users (show)

See Also:

Description amandajensen09 2016-04-29 14:26:15 CDT
Some times it works, sometimes it doesnt and it give me this:

Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 8
	at java.util.Vector.get(Vector.java:748)
	at CellCounter.populateTxtFields(CellCounter.java:465)
	at CellCounter.actionPerformed(CellCounter.java:653)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.Component.processMouseEvent(Component.java:6535)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6300)
	at java.awt.Container.processEvent(Container.java:2236)
	at java.awt.Component.dispatchEventImpl(Component.java:4891)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Component.dispatchEvent(Component.java:4713)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
	at java.awt.Container.dispatchEventImpl(Container.java:2280)
	at java.awt.Window.dispatchEventImpl(Window.java:2750)
	at java.awt.Component.dispatchEvent(Component.java:4713)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
............................................................................ or someother thing that fills up the console

Information about your version of Java:

  os.arch => x86_64
  os.name => Mac OS X
  os.version => 10.11.4
  java.version => 1.8.0_66
  java.vendor => Oracle Corporation
  java.runtime.name => Java(TM) SE Runtime Environment
  java.runtime.version => 1.8.0_66-b17
  java.vm.name => Java HotSpot(TM) 64-Bit Server VM
  java.vm.version => 25.66-b17
  java.vm.vendor => Oracle Corporation
  java.vm.info => mixed mode
  java.awt.graphicsenv => sun.awt.CGraphicsEnvironment
  java.specification.name => Java Platform API Specification
  java.specification.version => 1.8
  sun.cpu.endian => little
  sun.desktop => null
  file.separator => /

The up-to-date check says: UP_TO_DATE

Information relevant to JAVA_HOME related problems:

  JAVA_HOME is set to: /Applications/Fiji.app/java/macosx/jdk1.8.0_66/jre/Contents/Home/
  imagej.dir => /Applications/Fiji.app

Information about the version of each plugin:

Activated update sites:
ImageJ: http://update.imagej.net/ (last check:20160422155140)
Fiji: http://update.fiji.sc/ (last check:20160418082001)
Java-8: http://sites.imagej.net/Java-8/ (last check:20160428090103)

Files not up-to-date:
  11d245d5 (MODIFIED) 20160429122236 jars/ij-1.50i.jar
Comment 1 amandajensen09 2016-04-29 14:27:14 CDT
It also appears to be happing most often when I am trying to load markers.  And its sporadic.
Comment 2 Wayne Rasband 2016-04-30 13:52:21 CDT
Try using the built-in multi-point tool to do the counting. It supports up to 100 counters. For more information, double click on the multi-point tool icon and click “Help” in the dialog.
Comment 3 Curtis Rueden 2016-04-30 20:36:40 CDT
I second Wayne's suggestion. Please give the multi-point tool a try and let us know how it works for you.

If there is something that the Cell Counter plugin does which the built-in multi-point tool cannot do, let us know on the ImageJ Forum (http://forum.imagej.net/) and we can give you suggestions on how best to proceed.

For what it's worth, I did push a quick workaround to the Cell Counter code to avoid this exact error message:

https://github.com/fiji/Cell_Counter/commit/35ad3e52e339307aa8b3a43cbe4832aa697f0b55

However, the error suggests a deeper bug in Cell Counter somewhere, which might not be so easy to discern, given the irreproducible nature of the failures on your system. So even after we cut a new release of Cell Counter, you may have other sporadic problematic behavior.
Comment 4 amandajensen09 2016-04-30 20:48:14 CDT
Hola!

Yeah the thing about the cell counter that the multupoint doesn't do is:
1.  I can count multiple types (type one cell #, type 2 how many are yellow, type 3 how many are little etc etc.) I'm count 10 different things right now.
2. I can save it.  So if I need to go back and say look at all the yellow cells and now measure them I can just load the counts back onto my tiff image and now measure them.
3.  I have upwards of 100 cells per image so if the multupoint tool only counts 100...

I mean I just rebooted fiji/my computer and it works fine right now.  Just sometimes, mid count the console pops up with lots of angry red words and the counter doesn't want to work anymore.  Then sometime if I restart fiji it works again.  Meh. :)
Comment 5 Wayne Rasband 2016-05-02 10:17:08 CDT
> 1. I can count multiple types (type one cell #, type 2 how many
> are yellow, type 3 how many are little etc etc.) I'm count
> 10 different things right now.

The multi-point tool supports up to 100 types of counters and each counter can count up to two billion objects

> 2. I can save it.  So if I need to go back and say look at all
> the yellow cells and now measure them I can just load the counts
> back onto my tiff image and now measure them.

With the multi-point tool, the counts are saved when you save the image in TIFF format, or you can save the counts separately by using File>Save As>Selection and restore them using File>Open.

> 3.  I have upwards of 100 cells per image so if the
> multupoint tool only counts 100...

The multi-point tool counts up to two billion of each type.
Comment 6 amandajensen09 2016-05-02 10:39:54 CDT
Well I need 3 billion!  No just kidding.  Okay awesome I'll start working with the multi-point tool.  Hey thank for helping you guys rock!
Comment 7 amandajensen09 2016-05-02 11:33:07 CDT
okay so obviously I'm not very adept at this.  But the 100 different counters...can they be used simultaneously?  I just counted my 156 cells, blue dots small size.  Now I want to count how many are yellow (say yellow dots small size), but keep my original 156 counted so I dont could yellow ones, I didnt previously count as one of my 156 cells (things I determined to be dead but still are yellow).  Also is there a way to have the points be specific to a channel?  I have three densely packed channel so its easiest to have a 3rd of my counts on one channel a third on the second channel and a 3rd on the 3rd channel.  If I can get the multi point tool to work like cell the counter it is significantly less glitchy so I would now prefer to use that over the cell counter plugin.
Comment 8 Curtis Rueden 2016-05-02 11:36:27 CDT
Glad to see these detailed questions!

However, you may want to ask on the ImageJ Forum instead: http://forum.imagej.net/

That service is meant more for Q&A, while this system is for bug reports. (Also: this BugZilla system is much more primitive/outdated, and slated for demolition soon, whereas the Forum is IMHO very nice to use!)