Ignore:
Timestamp:
03/25/11 20:19:17 (9 years ago)
Author:
aivar
Message:

CurveFitData needs to keep track of how many pixels went into each data point (so that the IRF can be scaled appropriately). Improved channel handling. Show IRF on decay graph.

Location:
trunk/projects/slim-plugin/src/main/java/loci/slim/ui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/projects/slim-plugin/src/main/java/loci/slim/ui/ExcitationGraph.java

    r7671 r7674  
    7575public class ExcitationGraph implements IStartStopBaseProportionListener { 
    7676    static final int HORZ_TWEAK = 0; //TODO this was necessary for the fitted decay graph: 4; 
    77     static final Color EXCITATION_COLOR = Color.BLACK; 
     77    static final Color EXCITATION_COLOR = Color.GRAY; 
    7878    static final Color BACK_COLOR = Color.WHITE; 
    7979    static final Color START_COLOR = Color.BLUE.darker(); 
     
    111111     */ 
    112112    ExcitationGraph(final int start, final int stop, final float base, 
    113             final int bins, final double timeInc, float[] values) { 
     113            final int bins, float[] values, final float timeInc) { 
    114114        m_start = start; 
    115115        m_stop = stop; 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/ui/ExcitationPanel.java

    r7672 r7674  
    7474public class ExcitationPanel extends JFrame { 
    7575    private Excitation m_excitation; 
    76     private int m_start; 
    77     private int m_stop; 
    78     private int m_base; 
    7976    private JTextField m_fileField; 
    8077    private JTextField m_startField; 
     
    9390        float[] values = excitation.getValues(); 
    9491        int bins = values.length; 
    95         int timeInc = 1; 
    96         ExcitationGraph excitationGraph = new ExcitationGraph(start, stop, base, bins, timeInc, values); 
     92        float timeInc = excitation.getTimeInc(); 
     93        ExcitationGraph excitationGraph = new ExcitationGraph(start, stop, base, bins, values, timeInc); 
    9794         
    9895        JPanel panel = new JPanel(new BorderLayout()); 
     
    115112        this.setVisible(false); 
    116113    } 
    117      
    118     public int getStart() { 
    119         return m_start; 
    120     } 
    121      
    122     public int getStop() { 
    123         return m_stop; 
    124     } 
    125      
    126     public int getBase() { 
    127         return m_base; 
    128     } 
    129114 
    130     public double[] getValues() { 
     115    public double[] getValues(int pixels) { 
    131116        float floatValues[] = m_excitation.getValues(); 
     117        for (float fV : floatValues) { 
     118            System.out.print(" " + fV); 
     119        } 
     120        System.out.println(""); 
     121        System.out.println("start " + m_excitation.getStart() + " stop " + m_excitation.getStop() + " base " + m_excitation.getBase()); 
     122 
     123        int start = m_excitation.getStart(); 
     124        int stop = m_excitation.getStop(); 
     125        float base = m_excitation.getBase(); 
    132126        double[] values = new double[floatValues.length]; 
    133127        for (int i = 0; i < values.length; ++i) { 
    134             if (i < m_start || i >= m_stop) { 
     128            if (i < start || i > stop) { 
    135129                values[i] = 0.0; 
    136130            } 
    137             else if (floatValues[i] > m_base) { 
    138                 values[i] = floatValues[i]; 
     131            else if (floatValues[i] > base) { 
     132                values[i] = pixels * floatValues[i]; 
     133                System.out.println("pixels " + pixels + "  value " + values[i]); 
    139134            } 
    140135            else { 
     
    142137            } 
    143138        } 
     139        System.out.println(""); 
    144140        return values; 
    145141    } 
Note: See TracChangeset for help on using the changeset viewer.