3D objects counter in batch mode?

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

3D objects counter in batch mode?

S.T.Ligthart
Dear all,
 
Recently, I have started to work with the 3D objects counter plugin from
Fabrice Cordelières and with great pleasure. At this moment, I would
like to process multiple ics-files (3 channel image stacks) from a
directory to do a fast batch-count. However, when I use the
“setBatchMode(true)” command, my objects are not counted anymore. No
error message appears.
 
I use ImageJ 1.35p on a Linux server with suse 9.2 and the proper Java
installed. Below is a part of my code. It runs perfectly when I set the
setBatchMode command as comment (with //), but otherwise gives count of
0. I changed the 3D objects counter plugin a little bit: it prints the
number of particles and some more information to the log. Thus, I can
see that in normal mode particles are counted and in batch mode a count
of 0 is returned. Could it be that in batch mode the plugin does not
receive the proper image?
 
dir_ics = getDirectory("Choose main directory to analyze");
list_dir_ics= getFileList(dir_ics);
setBatchMode(true);
path_file_ics = dir_ics+list_dir_ics[0];
open(path_file_ics);
index_slash = lastIndexOf(path_file_ics, "/" );
index_dot = lastIndexOf(path_file_ics, "." );
icsfileName=substring(path_file_ics, index_slash+1, index_dot);
for (k=1; k<4; k++) {
            cur_ch = icsfileName + " ch: "+d2s(k,0); ;
            selectImage(cur_ch);
            run("8-bit");
            run("Make Montage...", "columns=1 rows="+nSlices+1+" scale=1
first=1 last="+nSlices+1+" increment=1");
            rename("Montage Stack");
            run("MultiThresholder", "Entropy");
            getThreshold(lower, upper);
            print(upper);
            close;
            selectImage(cur_ch);
            run(" 3D objects counter3", "threshold="+upper+" slice=5
min=50 max=500");
}
 
Anyone any idea?
 
Thanks!
 
Sjoerd Ligthart
University of Twente
 
Ps. I really enjoyed the conference, many thanks to the organizers and
speakers!
Reply | Threaded
Open this post in threaded view
|

Re: 3D objects counter in batch mode?

Fabrice Cordelières
Dear Sjoerd,

Thanks for reporting this weird behaviour of the plugin. I never tested it
in such way... I'll have a look at it. I must also say that I get a modified
version of the initial plugin from Jonathan Jackson which I didn't took time
to ask Wayne to put on the website (I'll do so in the near future), and I'll
check if the problem is also present in his variant of the plugin.

I'll let you know ASAP about possible modifications.

Fabrice


 
Fabrice Cordelières, PhD
 
Institut Curie - Section de recherche/ CNRS UMR 146
Plateforme d'Imagerie Cellulaire et Tissulaire
Bâtiment 112 - Centre universitaire
91405 Orsay Cedex
FRANCE
 
Tél. : +33 1 69 86 31 30
Fax. : +33 1 69 86 17 03

-----Message d'origine-----
De : ImageJ Interest Group [mailto:[hidden email]] De la part de
S.T.Ligthart
Envoyé : lundi 22 mai 2006 15:26
À : [hidden email]
Objet : 3D objects counter in batch mode?

Dear all,
 
Recently, I have started to work with the 3D objects counter plugin from
Fabrice Cordelières and with great pleasure. At this moment, I would like to
process multiple ics-files (3 channel image stacks) from a directory to do a
fast batch-count. However, when I use the “setBatchMode(true)” command, my
objects are not counted anymore. No error message appears.
 
I use ImageJ 1.35p on a Linux server with suse 9.2 and the proper Java
installed. Below is a part of my code. It runs perfectly when I set the
setBatchMode command as comment (with //), but otherwise gives count of 0. I
changed the 3D objects counter plugin a little bit: it prints the number of
particles and some more information to the log. Thus, I can see that in
normal mode particles are counted and in batch mode a count of 0 is
returned. Could it be that in batch mode the plugin does not receive the
proper image?
 
dir_ics = getDirectory("Choose main directory to analyze"); list_dir_ics=
getFileList(dir_ics); setBatchMode(true); path_file_ics =
dir_ics+list_dir_ics[0]; open(path_file_ics); index_slash =
lastIndexOf(path_file_ics, "/" ); index_dot = lastIndexOf(path_file_ics, "."
); icsfileName=substring(path_file_ics, index_slash+1, index_dot); for (k=1;
k<4; k++) {
            cur_ch = icsfileName + " ch: "+d2s(k,0); ;
            selectImage(cur_ch);
            run("8-bit");
            run("Make Montage...", "columns=1 rows="+nSlices+1+" scale=1
first=1 last="+nSlices+1+" increment=1");
            rename("Montage Stack");
            run("MultiThresholder", "Entropy");
            getThreshold(lower, upper);
            print(upper);
            close;
            selectImage(cur_ch);
            run(" 3D objects counter3", "threshold="+upper+" slice=5 min=50
max=500"); }
 
Anyone any idea?
 
Thanks!
 
Sjoerd Ligthart
University of Twente
 
Ps. I really enjoyed the conference, many thanks to the organizers and
speakers!