Search in sources :

Example 1 with SNRHysteresisFilter

use of gdsc.smlm.results.filter.SNRHysteresisFilter in project GDSC-SMLM by aherbert.

the class FreeFilterResults method logDemoFilters.

public static void logDemoFilters(String title) {
    comment(title + " example filters");
    IJ.log("");
    comment("Filters are described using XML");
    comment("Multiple filters can be combined using AND/OR filters");
    IJ.log("");
    comment("Single filters");
    IJ.log("");
    demo(new WidthFilter(2));
    demo(new WidthFilter2(0.7, 2));
    demo(new SBRFilter(15));
    demo(new ShiftFilter(0.7));
    demo(new EShiftFilter(0.8));
    demo(new SignalFilter(1000));
    demo(new SNRFilter(10));
    demo(new SNRFilter2(10, 0.7, 2));
    demo(new ANRFilter(11));
    demo(new ANRFilter2(11, 0.75, 1.95));
    demo(new PrecisionFilter(30));
    demo(new PrecisionFilter2(30));
    demo(new SNRHysteresisFilter(50, 1, 2, 1, 10, 20));
    demo(new PrecisionHysteresisFilter(2, 0, 1, 0, 20, 30));
    demo(new TraceFilter(0.5, 1));
    demo(new CoordinateFilter(15.5f, 234.5f, 80.99f, 133f));
    demo(new MultiFilter(30, 45f, 0.7, 1.5, 0.5, 0.6, 45));
    demo(new MultiFilter2(30, 45f, 0.7, 1.5, 0.5, 0.6, 45));
    demo(new MultiHysteresisFilter(2, 0, 1, 0, 20, 10, 40f, 20f, 0.8, 0.2, 1.2, 0.4, 0.3, 0.8, 20, 30));
    demo(new MultiHysteresisFilter2(2, 0, 2, 1, 20, 10, 40f, 20f, 0.8, 0.2, 1.2, 0.4, 0.3, 0.8, 20, 30));
    comment("Combined filters");
    IJ.log("");
    demo(new AndFilter(new SNRFilter(10), new WidthFilter(2)));
    demo(new OrFilter(new SNRFilter(10), new PrecisionFilter(30)));
    demo(new OrFilter(new AndFilter(new SNRFilter(10), new PrecisionFilter(30)), new TraceFilter(0.5, 1)));
}
Also used : PrecisionFilter(gdsc.smlm.results.filter.PrecisionFilter) MultiHysteresisFilter2(gdsc.smlm.results.filter.MultiHysteresisFilter2) OrFilter(gdsc.smlm.results.filter.OrFilter) MultiFilter(gdsc.smlm.results.filter.MultiFilter) WidthFilter(gdsc.smlm.results.filter.WidthFilter) SNRFilter2(gdsc.smlm.results.filter.SNRFilter2) SBRFilter(gdsc.smlm.results.filter.SBRFilter) AndFilter(gdsc.smlm.results.filter.AndFilter) EShiftFilter(gdsc.smlm.results.filter.EShiftFilter) ANRFilter(gdsc.smlm.results.filter.ANRFilter) WidthFilter2(gdsc.smlm.results.filter.WidthFilter2) SNRHysteresisFilter(gdsc.smlm.results.filter.SNRHysteresisFilter) MultiFilter2(gdsc.smlm.results.filter.MultiFilter2) SNRFilter(gdsc.smlm.results.filter.SNRFilter) PrecisionHysteresisFilter(gdsc.smlm.results.filter.PrecisionHysteresisFilter) PrecisionFilter2(gdsc.smlm.results.filter.PrecisionFilter2) TraceFilter(gdsc.smlm.results.filter.TraceFilter) SignalFilter(gdsc.smlm.results.filter.SignalFilter) ANRFilter2(gdsc.smlm.results.filter.ANRFilter2) CoordinateFilter(gdsc.smlm.results.filter.CoordinateFilter) EShiftFilter(gdsc.smlm.results.filter.EShiftFilter) ShiftFilter(gdsc.smlm.results.filter.ShiftFilter) MultiHysteresisFilter(gdsc.smlm.results.filter.MultiHysteresisFilter)

Example 2 with SNRHysteresisFilter

use of gdsc.smlm.results.filter.SNRHysteresisFilter in project GDSC-SMLM by aherbert.

the class FilterAnalysis method addSNRHysteresisFilters.

private void addSNRHysteresisFilters(List<FilterSet> filterSets) {
    if (!hysteresisSnrFilter)
        return;
    for (double w = minWidth; w <= maxWidth; w += incWidth) {
        WidthFilter wf = new WidthFilter((float) w);
        for (int snrGap = minSnrGap; snrGap <= maxSnrGap; snrGap += incSnrGap) {
            List<Filter> filters = new LinkedList<Filter>();
            for (int snr = minSnr; snr <= maxSnr; snr++) {
                filters.add(new AndFilter(wf, new SNRHysteresisFilter(2, 0, 1, 0, snr, snrGap)));
            }
            filterSets.add(new FilterSet(filters));
        }
    }
}
Also used : AndFilter(gdsc.smlm.results.filter.AndFilter) FilterSet(gdsc.smlm.results.filter.FilterSet) Filter(gdsc.smlm.results.filter.Filter) OrFilter(gdsc.smlm.results.filter.OrFilter) FilenameFilter(java.io.FilenameFilter) AndFilter(gdsc.smlm.results.filter.AndFilter) WidthFilter(gdsc.smlm.results.filter.WidthFilter) SNRFilter(gdsc.smlm.results.filter.SNRFilter) PrecisionHysteresisFilter(gdsc.smlm.results.filter.PrecisionHysteresisFilter) TraceFilter(gdsc.smlm.results.filter.TraceFilter) PrecisionFilter(gdsc.smlm.results.filter.PrecisionFilter) SNRHysteresisFilter(gdsc.smlm.results.filter.SNRHysteresisFilter) SNRHysteresisFilter(gdsc.smlm.results.filter.SNRHysteresisFilter) LinkedList(java.util.LinkedList) WidthFilter(gdsc.smlm.results.filter.WidthFilter)

Aggregations

AndFilter (gdsc.smlm.results.filter.AndFilter)2 OrFilter (gdsc.smlm.results.filter.OrFilter)2 PrecisionFilter (gdsc.smlm.results.filter.PrecisionFilter)2 PrecisionHysteresisFilter (gdsc.smlm.results.filter.PrecisionHysteresisFilter)2 SNRFilter (gdsc.smlm.results.filter.SNRFilter)2 SNRHysteresisFilter (gdsc.smlm.results.filter.SNRHysteresisFilter)2 TraceFilter (gdsc.smlm.results.filter.TraceFilter)2 WidthFilter (gdsc.smlm.results.filter.WidthFilter)2 ANRFilter (gdsc.smlm.results.filter.ANRFilter)1 ANRFilter2 (gdsc.smlm.results.filter.ANRFilter2)1 CoordinateFilter (gdsc.smlm.results.filter.CoordinateFilter)1 EShiftFilter (gdsc.smlm.results.filter.EShiftFilter)1 Filter (gdsc.smlm.results.filter.Filter)1 FilterSet (gdsc.smlm.results.filter.FilterSet)1 MultiFilter (gdsc.smlm.results.filter.MultiFilter)1 MultiFilter2 (gdsc.smlm.results.filter.MultiFilter2)1 MultiHysteresisFilter (gdsc.smlm.results.filter.MultiHysteresisFilter)1 MultiHysteresisFilter2 (gdsc.smlm.results.filter.MultiHysteresisFilter2)1 PrecisionFilter2 (gdsc.smlm.results.filter.PrecisionFilter2)1 SBRFilter (gdsc.smlm.results.filter.SBRFilter)1