Re: local threshold plugin

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

Re: local threshold plugin

Sanneke Brinkers
A while ago in March, Tony Collins gave some information on the local
threshold plugin that can be found in the plugins/segmentation dir. I too
have that local threshold plugin, but not the source code (only the .class
file). Does anyone still have the source code and/or more extensive
information about this plugin?

Thanks very much!

Sanneke

On Fri, 10 Mar 2006 09:16:28 -0500, Tony Collins <[hidden email]>
wrote:

>The source code contians a lot of information about most plugins. For
>the Local_threshold plugin:
>
>// local thresholding and unsharp masking by median filtering
>// Other operations can be substituted for median filter
>// For unsharp masking just cancel thresholding
>// Rex Couture 11-13-03
>// Based on macro by Gabriel Landini.  Thanks to Wayne for help with Java.
>
>
>Regards,
>
>Tony
>
>Ricardo Armisen wrote:
>> hi all
>> I have a plugin called local threshold under a segmentation plugin menu,
>> I am not sure where I got it, do you have any information about it?
>> thanks
>>
>> ricardo
>
>--
>Tony Collins, Ph.D.
>Facility Manager
>Wright Cell Imaging Facility
>Toronto Western Research Institute
>13-407 McLaughlin Pavilion
>399 Bathurst Street
>Toronto, ON. M5T 2S8
>tel. (416) 603 5367 fax: (416) 603 5745
>http://www.uhnresearch.ca/wcif
>=========================================================================
Reply | Threaded
Open this post in threaded view
|

Re: local threshold plugin

Volker Baecker
In my version there is the attached source code for the local threshold.
It is equivalent to the macro that can be found under
http://www.aecom.yu.edu/aif/instructions/imagej/macros/local-threshold-unsharp-masking.txt
Cheers,
Volker

Sanneke Brinkers a écrit :

> A while ago in March, Tony Collins gave some information on the local
> threshold plugin that can be found in the plugins/segmentation dir. I too
> have that local threshold plugin, but not the source code (only the .class
> file). Does anyone still have the source code and/or more extensive
> information about this plugin?
>
> Thanks very much!
>
> Sanneke
>
> On Fri, 10 Mar 2006 09:16:28 -0500, Tony Collins <[hidden email]>
> wrote:
>
>  
>> The source code contians a lot of information about most plugins. For
>> the Local_threshold plugin:
>>
>> // local thresholding and unsharp masking by median filtering
>> // Other operations can be substituted for median filter
>> // For unsharp masking just cancel thresholding
>> // Rex Couture 11-13-03
>> // Based on macro by Gabriel Landini.  Thanks to Wayne for help with Java.
>>
>>
>> Regards,
>>
>> Tony
>>
>> Ricardo Armisen wrote:
>>    
>>> hi all
>>> I have a plugin called local threshold under a segmentation plugin menu,
>>> I am not sure where I got it, do you have any information about it?
>>> thanks
>>>
>>> ricardo
>>>      
>> --
>> Tony Collins, Ph.D.
>> Facility Manager
>> Wright Cell Imaging Facility
>> Toronto Western Research Institute
>> 13-407 McLaughlin Pavilion
>> 399 Bathurst Street
>> Toronto, ON. M5T 2S8
>> tel. (416) 603 5367 fax: (416) 603 5745
>> http://www.uhnresearch.ca/wcif
>> =========================================================================
>>    
>
>  
--
passerelle antivirus du campus CNRS de Montpellier
--



//Plugin

// local thresholding and unsharp masking by median filtering
// Other operations can be substituted for median filter
// For unsharp masking just cancel thresholding
// Rex Couture 11-13-03
// Based on macro by Gabriel Landini.  Thanks to Wayne for help with Java.

import ij.*;
import ij.process.*;
import ij.gui.*;
import java.awt.*;
import ij.plugin.*;

public class Local_Threshold implements PlugIn {

        public void run(String arg) {
                IJ.run("Duplicate...", "title=Original");
                IJ.run("32-bit");
                IJ.run("Duplicate...", "title=Filtered");
                double a = IJ.getNumber("Radius", 7);
                IJ.selectWindow("Filtered");
                IJ.run("Median...", "radius=" +a);
                IJ.run("Image Calculator...", "image1=Original operation=Subtract image2=Filtered create");
                IJ.run("Rename...", "title=Result");
                IJ.run("Threshold...");
        }

}