New plugin: auto threshold

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

New plugin: auto threshold

Gabriel Landini
Hi,
I thought it would be useful to have various global autothreshold methods
implemented for IJ/Fiji, so I ported/collected several into a single plugin.
(requires IJ v1.42m.)
For those using Fiji, the source is in the repository already.

http://pacific.mpi-cbg.de/wiki/index.php/Auto_Threshold

Let me know of any bugs/requests.
Cheers

Gabriel
Reply | Threaded
Open this post in threaded view
|

Re: New plugin: auto threshold

Roberto Sotto-Maior Fortes de Oliveira
Hi Gabriel,

Bravo!

Your work will really help me and anyone deciding about what thresolding
method use.
For next implementation, I would like to suggest an option to make the
montage in a vertical fashion helping vertical monitor users.

Regards,

Roberto
Reply | Threaded
Open this post in threaded view
|

Re: New plugin: auto threshold

Gabriel Landini
On Saturday 11 April 2009, Roberto Sotto-Maior Fortes de Oliveira wrote:
> Your work will really help me and anyone deciding about what thresolding
> method use.
> For next implementation, I would like to suggest an option to make the
> montage in a vertical fashion helping vertical monitor users.

There is version 1.3 for download (same link) which introduces global
threshold for stacks based on the accumulated stack histogram.

The aspect ratio is simple to fix. If you download the jar file, you can
extract (jar files are zip files) the java source and change the line:

mm.makeMontage( imp3, 5, 3, 1.0, 1, (ml-1), 1, 0, true);

Specifically numbers 5 (rows) and 3 (columns) for any other combination which
multiplied is at least 13.

For instance:
mm.makeMontage( imp3, 3, 5, 1.0, 1, (ml-1), 1, 0, true); would make the
montage with a vertical aspect ratio).
You just compile the java file and add it to the jar file.
I hope it helps.

Cheers

Gabriel
Reply | Threaded
Open this post in threaded view
|

memory problem

Laura Lucia Prieto Godino
Hi list,

I have a problem and I really can't find the way of solving it. Since  
4 days ago, when I use the colour couting it wont do the operation and  
will say that the available memory ha been used, so what i do is to  
increase the memory allowance for image j, restart it and keep using  
it, but now it has reached the limit again (766MB) and this means that  
there must be something wrong because every time I open 6 stacks at a  
time, do a few things with them, extract some info and  then I close  
them all, and open a 6 new ones, so as I close everytime the  old  
stacks, and as I open always the same number of stacks the memory  
should not run out, but it does, which means that somehow image j is  
keeping in the memory the old stacks that i have opened, but I dont  
need that, i just need image j to remeber what i am doing with the  
stacks that are open, once i close them i am done with them! How can I  
solve this problem, for the moment I can keep expanding the memory  
allowance of image j but that is obviously a short term solution.

Thank you very much,

best,

lucia


  Lucia Prieto Godino
PhD student.
Department of Zoology,
Downing street
University of Cambridge.
UK
Reply | Threaded
Open this post in threaded view
|

Re: New plugin: auto threshold

Wayne Rasband
In reply to this post by Gabriel Landini
I updated the MultiThresholder plugin at

     http://rsb.info.nih.gov/ij/plugins/multi-thresholder.html

to use the 13 auto-threshold methods from Gabriel's Auto_Threshold
plugin. The next step will be to get the built in
Image>Adjust>Threshold tool to use them.

-wayne

On Apr 10, 2009, at 11:45 AM, Gabriel Landini wrote:

> Hi,
> I thought it would be useful to have various global autothreshold
> methods
> implemented for IJ/Fiji, so I ported/collected several into a single
> plugin.
> (requires IJ v1.42m.)
> For those using Fiji, the source is in the repository already.
>
> http://pacific.mpi-cbg.de/wiki/index.php/Auto_Threshold
>
> Let me know of any bugs/requests.
> Cheers
>
> Gabriel
>
Reply | Threaded
Open this post in threaded view
|

Re: memory problem

Michael Schmid
In reply to this post by Laura Lucia Prieto Godino
Hi Lucia,

some possible reasons for a memory leak:

Do you use a BatchMode macro that creates new images in BatchMode  
(thus invisible), but never closes them? Quit Batchmode with  
setbatchMode("exit and display") to check this.

Are there any threads that don't terminate? See  
Plugins>Utilities>Threads. You should typically see something like  
the following:

Thread Group: system  Max Priority: 10
     Thread: Reference Handler  Priority: 10 Daemon
     Thread: Finalizer  Priority: 8 Daemon
     Thread: Signal Dispatcher  Priority: 9 Daemon
     Thread: Java2D Disposer  Priority: 10 Daemon
     Thread Group: main  Max Priority: 10
         Thread: AWT-AppKit  Priority: 5 Daemon
         Thread: AWT-Shutdown  Priority: 5
         Thread: AWT-EventQueue-0  Priority: 6
         Thread: SocketListener  Priority: 5
         Thread: DestroyJavaVM  Priority: 5
         Thread: Threads...  Priority: 4

You can also use Process>Utilities>Monitor Memory for further  
analysis. The display will include unused (but available) memory.  
Thus Click the status line (below the icons of the ImageJ panel)  
twice to start GarbageCollection, i.e., to free unused memory.

Hope this helps,

Michael
________________________________________________________________

On 13 Apr 2009, at 13:09, Laura Lucia Prieto Godino wrote:

> Hi list,
>
> I have a problem and I really can't find the way of solving it.  
> Since 4 days ago, when I use the colour couting it wont do the  
> operation and will say that the available memory ha been used, so  
> what i do is to increase the memory allowance for image j, restart  
> it and keep using it, but now it has reached the limit again  
> (766MB) and this means that there must be something wrong because  
> every time I open 6 stacks at a time, do a few things with them,  
> extract some info and  then I close them all, and open a 6 new  
> ones, so as I close everytime the  old stacks, and as I open always  
> the same number of stacks the memory should not run out, but it  
> does, which means that somehow image j is keeping in the memory the  
> old stacks that i have opened, but I dont need that, i just need  
> image j to remeber what i am doing with the stacks that are open,  
> once i close them i am done with them! How can I solve this  
> problem, for the moment I can keep expanding the memory allowance  
> of image j but that is obviously a short term solution.
>
> Thank you very much,
>
> best,
>
> lucia
>
>
>  Lucia Prieto Godino
> PhD student.
> Department of Zoology,
> Downing street
> University of Cambridge.
> UK