Particle Analysis in time + batch

plugin
macro
fiji
roi
Tags: #<Tag:0x00007fd54078a560> #<Tag:0x00007fd54078a330> #<Tag:0x00007fd54078a038> #<Tag:0x00007fd540789e58>

#1

Hi all,

I created a macro to analyze particles in a cell and see the evolution (number + size) of the particles over time.
The Analyze Particles plugin worked great and summarize allowed me to immediately get the count of particles for each time points.

But, since the Analyze Particles works on Binary images, the intensity measurements don’t appear in the summary. I also tried BioVoxxel analyze particles which seems to work but then crash due an error in column 21 (?).

Is there any way to do it easily instead of looping through all the time points, counting the ROI in the ROI Manager and getting the mean intensity for each frames ?

Thanks for the help.


#2

You can make Analyze Particles do the measurement on a different image by setting the Redirect to: option in the Set Measurements dialog (Analyze > Set Measurements…).

From the documentation:

Redirect to The image selected from this popup menu will be used as the target for statistical calculations done by Analyze▷Measure… M and Analyze▷Analyze Particles… commands. This feature allows you to outline a structure on one image and measure the intensity of the corresponding region in another image.


#3

Thanks ! That’s exactly what I was looking for and liked in the BioVoxxel plugin. :slight_smile:
Can this run as batch ? I just tried and it says it can’t find the image open ?

Edit: Nevermind fixed the problem by adding brackets ! :).

Thanks again !


#4

Could you run the BioVoxxel Particle Analyzer again on your image and provide the error message as well as the image you run it on. I would like to see if it is a general bug and fix it.


#5
(Fiji Is Just) ImageJ 2.0.0-rc-61/1.51n; Java 1.8.0_131 [64-bit]; Linux 4.12.0-041200-generic; 465MB of 8352MB (5%)
 
java.lang.IllegalArgumentException: Column not defined: 21
	at ij.measure.ResultsTable.getValueAsDouble(ResultsTable.java:354)
	at ij.measure.ResultsTable.getValue(ResultsTable.java:378)
	at Extended_Particle_Analyzer.particleAnalysis(Extended_Particle_Analyzer.java:446)
	at Extended_Particle_Analyzer.run(Extended_Particle_Analyzer.java:340)
	at ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:265)
	at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:114)
	at ij.IJ.runUserPlugIn(IJ.java:219)
	at ij.IJ.runPlugIn(IJ.java:181)
	at ij.Executer.runCommand(Executer.java:137)
	at ij.Executer.run(Executer.java:66)
	at java.lang.Thread.run(Thread.java:748)

Here is the error that I get.

As for the images, they are quite big, I would have to send them to you via another way…


#6

@lguerard

Ah ok, I see. Seen this before. Will address this asap and update the toolbox with a bugfix :blush:


#7

Hi @lguerard,

could you please try to update the BioVoxxel toolbox and run the Extended Particle Analyzer again?
The problem with the column header as occurring in your posted error message should now hopefully be solved.

Now it also has the “MinFeret” as an additional parameter to limit the analysis.
Please let me know if there are any other problems with the tool.


#8

Hi @biovoxxel,

Thanks for the update.

I just tried again and still got the same error after updating it :confused:

(Fiji Is Just) ImageJ 2.0.0-rc-61/1.51n; Java 1.8.0_131 [64-bit]; Linux 4.4.0-83-generic; 465MB of 8100MB (5%)
 
java.lang.IllegalArgumentException: Column not defined: 21
	at ij.measure.ResultsTable.getValueAsDouble(ResultsTable.java:354)
	at ij.measure.ResultsTable.getValue(ResultsTable.java:378)
	at Extended_Particle_Analyzer.particleAnalysis(Extended_Particle_Analyzer.java:446)
	at Extended_Particle_Analyzer.run(Extended_Particle_Analyzer.java:340)
	at ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:265)
	at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:114)
	at ij.IJ.runUserPlugIn(IJ.java:219)
	at ij.IJ.runPlugIn(IJ.java:181)
	at ij.Executer.runCommand(Executer.java:137)
	at ij.Executer.run(Executer.java:63)
	at ij.IJ.run(IJ.java:297)
	at ij.macro.Functions.doRun(Functions.java:601)
	at ij.macro.Functions.doFunction(Functions.java:96)
	at ij.macro.Interpreter.doStatement(Interpreter.java:230)
	at ij.macro.Interpreter.doStatements(Interpreter.java:218)
	at ij.macro.Interpreter.run(Interpreter.java:115)
	at ij.macro.Interpreter.run(Interpreter.java:85)
	at ij.macro.Interpreter.run(Interpreter.java:96)
	at ij.plugin.Macro_Runner.runMacro(Macro_Runner.java:155)
	at ij.IJ.runMacro(IJ.java:134)
	at ij.IJ.runMacro(IJ.java:123)
	at net.imagej.legacy.IJ1Helper$3.call(IJ1Helper.java:1052)
	at net.imagej.legacy.IJ1Helper$3.call(IJ1Helper.java:1048)
	at net.imagej.legacy.IJ1Helper.runMacroFriendly(IJ1Helper.java:999)
	at net.imagej.legacy.IJ1Helper.runMacro(IJ1Helper.java:1048)
	at net.imagej.legacy.plugin.IJ1MacroEngine.eval(IJ1MacroEngine.java:136)
	at org.scijava.script.ScriptModule.run(ScriptModule.java:159)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65)
	at org.scijava.thread.DefaultThreadService3.call(DefaultThreadService.java:237)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)

I managed to make it work with the Particle Analyzer plugin but let me know if you want me to make some more tests !


#9

@lguerard BTW, check where this was discussed previously ;-):


#10

Hi @lguerard,

I cant reproduce the problem. Could you provide me with the images you tested it on and potentially a macro one-liner recording the extended particle analyzer if possible to see which settings you are using. This should help to solve teh problem.

Thanks in advance

EDIT: I think I found the culprit. Could it be that the image you redirect to is a 32-bit images with NaNs assigned to some pixels (e.g. after thresholding)?


#11

Hi @imagejan,

Indeed, sorry for posting without finding this one before… I’ll be more careful next time ;).

@biovoxxel: you should be able to find an image here with a test macro. Also sometimes, it only applies to one image and not to the whole stack, tell me if I’m doing something wrong… :confused: . Thanks for your help :slight_smile: .