Can't Multithread on Third Party Plugins

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

Can't Multithread on Third Party Plugins

Zwick, Ari A.
Hi,

I am trying to get multithreading to work with a number of plugins in
ImageJ, most important to me is Object Counter 3D.  When I try to use this
program on a 64 mb file that includes all objects of volume 16-61200000
voxels, I run into a processing time of about 6-8 hours.  I intend to scale
this up by a factor of 10, which means that unless I can use all 8 cores on
my computer instead of 1, then I'll be waiting for days.  I've noticed that
I cannot get third party plugins to use more than 1 core, but the native
ImageJ functions do use all 8 cores.

I have a Dell PowerEdge 1900 with dual xeon processors (1.6 ghz) with 16 gb
ddr2 ram.  I am using Redhat Linux Server Edition Version 5.4 64 bit.  I
have the latest versions of ImageJ 64 bit and Java installed, except Java3D,
which I am in the process of getting.  I've been trolling around on the
forums and I get the impression that many plugins are not written to utilize
multiple cores, although I am not sure if this is true.  If Object Counter
3d does not utilize multithreading, might anyone be able to suggest how to
modify the source code?  I am open to any and all solutions to my problem,
and I apologize if someone has already posted about this, but I really did
try to find a post about it before.  

Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Can't Multithread on Third Party Plugins

Robert Dougherty
Ari,
You might look at my Local Thickness plugins. The approach is simple  
and effective, but has the drawback that all of the threads have the  
priority of the event dispatching thread, so there is no way to add an  
abort feature. If you need that, Swing Workers provide an option.
Bob

Robert P. Dougherty, Ph.D.
President, OptiNav, Inc.
4176 148 Ave. NE
Redmond, WA 98052
[hidden email]
(425)891-4883
www.optinav.com


On Mar 25, 2010, at 4:22 PM, Ari Zwick <[hidden email]> wrote:

> Hi,
>
> I am trying to get multithreading to work with a number of plugins in
> ImageJ, most important to me is Object Counter 3D.  When I try to  
> use this
> program on a 64 mb file that includes all objects of volume  
> 16-61200000
> voxels, I run into a processing time of about 6-8 hours.  I intend  
> to scale
> this up by a factor of 10, which means that unless I can use all 8  
> cores on
> my computer instead of 1, then I'll be waiting for days.  I've  
> noticed that
> I cannot get third party plugins to use more than 1 core, but the  
> native
> ImageJ functions do use all 8 cores.
>
> I have a Dell PowerEdge 1900 with dual xeon processors (1.6 ghz)  
> with 16 gb
> ddr2 ram.  I am using Redhat Linux Server Edition Version 5.4 64  
> bit.  I
> have the latest versions of ImageJ 64 bit and Java installed, except  
> Java3D,
> which I am in the process of getting.  I've been trolling around on  
> the
> forums and I get the impression that many plugins are not written to  
> utilize
> multiple cores, although I am not sure if this is true.  If Object  
> Counter
> 3d does not utilize multithreading, might anyone be able to suggest  
> how to
> modify the source code?  I am open to any and all solutions to my  
> problem,
> and I apologize if someone has already posted about this, but I  
> really did
> try to find a post about it before.
>
> Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Can't Multithread on Third Party Plugins

Michael Doube
In reply to this post by Zwick, Ari A.
Ari,

You might like to try the Particle Analyser in BoneJ:

http://doube.org/bonej.html

Because of exactly your problem it is multithreaded, and runs
substantially faster than the old Object Counter 3D (which it was based
on).  It even uses Bob's multithreading approach.

We have been experimenting with a single-threaded version of this
particle that runs in O(n) (linear) time (super-fast on big stacks), but
at the expense of tons of RAM.  You're welcome to check the code out at:
http://github.com/mdoube/BoneJ/blob/b29a8cbeae2078960e2a1b87b77d41debfe88df7/src/org/doube/bonej/ParticleCounter.java

Mike


On 25/03/2010 23:22, Ari Zwick wrote:

> Hi,
>
> I am trying to get multithreading to work with a number of plugins in
> ImageJ, most important to me is Object Counter 3D.  When I try to use this
> program on a 64 mb file that includes all objects of volume 16-61200000
> voxels, I run into a processing time of about 6-8 hours.  I intend to scale
> this up by a factor of 10, which means that unless I can use all 8 cores on
> my computer instead of 1, then I'll be waiting for days.  I've noticed that
> I cannot get third party plugins to use more than 1 core, but the native
> ImageJ functions do use all 8 cores.