Changeset 7992


Ignore:
Timestamp:
04/23/12 14:01:02 (7 years ago)
Author:
aivar
Message:

SLIM Plugin: Clean up code, comments.

Location:
trunk/projects/slim-plugin/src/main/java
Files:
1 deleted
59 edited

Legend:

Unmodified
Added
Removed
  • trunk/projects/slim-plugin/src/main/java/imagej/thread/ThreadPool.java

    r7805 r7992  
    4848 * T represents the type of the task result. 
    4949 *  
    50  * @author Aivar Grislis 
     50 * @author Aivar Grislis grislis at wisc dot edu 
    5151 */ 
    5252public class ThreadPool<T> { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/SLIMProcessor.java

    r7990 r7992  
    3535package loci.slim; 
    3636 
    37 import loci.slim.heuristics.CursorEstimator; 
    3837import ij.IJ; 
    3938import ij.ImagePlus; 
    40 import ij.gui.GenericDialog; 
    4139import ij.gui.Roi; 
    4240import ij.io.OpenDialog; 
     
    4543import ij.process.ImageProcessor; 
    4644 
    47 import java.awt.Canvas; 
    4845import java.awt.Color; 
    4946import java.awt.Rectangle; 
     
    5754 
    5855import loci.curvefitter.CurveFitData; 
    59 import loci.curvefitter.GrayCurveFitter; 
    60 import loci.curvefitter.GrayNRCurveFitter; 
    6156import loci.curvefitter.ICurveFitData; 
    6257import loci.curvefitter.ICurveFitter; 
    6358import loci.curvefitter.JaolhoCurveFitter; 
    64 import loci.curvefitter.MarkwardtCurveFitter; 
    6559import loci.curvefitter.SLIMCurveFitter; 
    6660import loci.formats.FormatException; 
    6761import loci.formats.FormatTools; 
    68 import loci.formats.IFormatReader; 
    6962import loci.formats.ImageReader; 
    7063import loci.slim.analysis.SLIMAnalysis; 
    7164import loci.slim.process.ISLIMBinner; 
    7265import loci.slim.process.SLIMBinning; 
    73 import loci.slim.colorizer.DataColorizer; 
    74 import loci.slim.colorizer.DataColorizer2; 
    7566import loci.slim.fitting.cursor.FitterEstimator; 
    7667import loci.slim.heuristics.CursorEstimator; 
     
    9283 
    9384// Kludge in the new stuff: 
    94 import loci.slim.fitting.FitInfo; 
    9585import loci.slim.fitting.IDecayImage; 
    9686import loci.slim.fitting.IFittedImage; 
     
    117107import loci.curvefitter.ICurveFitter.FitFunction; 
    118108import loci.curvefitter.ICurveFitter.FitRegion; 
    119 import loci.curvefitter.ICurveFitter.NoiseModel; 
    120109 
    121110 
     
    159148    private static final Character SUB_3  = '\u2083'; 
    160149     
    161     private IUserInterfacePanel m_uiPanel; 
    162  
    163     private Object m_synchFit = new Object(); 
    164     private volatile boolean m_quit; 
    165     private volatile boolean m_cancel; 
    166     private volatile boolean m_fitInProgress; 
    167     private volatile boolean m_fitted; 
     150    private IUserInterfacePanel _uiPanel; 
     151 
     152    private final Object _synchFit = new Object(); 
     153    private volatile boolean _quit; 
     154    private volatile boolean _cancel; 
     155    private volatile boolean _fitInProgress; 
     156    private volatile boolean _fitted; 
    168157 
    169158    private static final String FILE_KEY = "file"; 
    170159    private static final String PATH_KEY = "path"; 
    171     private String m_file; 
    172     private String m_path; 
    173     private Hashtable<String, Object> m_globalMetadata; 
    174  
    175     private Image<T> m_image; 
    176     private LocalizableByDimCursor<T> m_cursor; 
    177  
    178     private Image<DoubleType> m_fittedImage = null; 
    179     private int m_fittedParameterCount = 0; 
    180     boolean m_visibleFit = true; 
     160    private String _file; 
     161    private String _path; 
     162    private Hashtable<String, Object> _globalMetadata; 
     163 
     164    private Image<T> _image; 
     165    private LocalizableByDimCursor<T> _cursor; 
     166 
     167    private Image<DoubleType> _fittedImage = null; 
     168    private int _fittedParameterCount = 0; 
     169    boolean _visibleFit = true; 
    181170 
    182171    // data parameters 
    183     private boolean m_hasChannels; 
    184     private int m_channels; 
    185     private int m_channelIndex; 
    186     private int m_width; 
    187     private int m_height; 
    188     private int[] m_cLengths; 
    189     private int m_bins; 
    190     private int m_binIndex; 
    191  
    192     private double m_timeRange; 
    193     private double m_minNonZeroPhotonCount; 
    194  
    195     private FitRegion m_region; 
    196     private FitAlgorithm m_algorithm; 
    197     private FitFunction m_function; 
    198  
    199     private SLIMAnalysis m_analysis; 
    200     private SLIMBinning m_binning; 
    201  
    202     private ExcitationPanel m_excitationPanel = null; 
    203     private IGrayScaleImage m_grayScaleImage; 
     172    private boolean _hasChannels; 
     173    private int _channels; 
     174    private int _channelIndex; 
     175    private int _width; 
     176    private int _height; 
     177    private int[] _cLengths; 
     178    private int _bins; 
     179    private int _binIndex; 
     180 
     181    private double _timeRange; 
     182    private double _minNonZeroPhotonCount; 
     183 
     184    private FitRegion _region; 
     185    private FitAlgorithm _algorithm; 
     186    private FitFunction _function; 
     187 
     188    private SLIMAnalysis _analysis; 
     189    private SLIMBinning _binning; 
     190 
     191    private ExcitationPanel _excitationPanel = null; 
     192    private IGrayScaleImage _grayScaleImage; 
    204193    // user sets this from the grayScalePanel control 
    205     private int m_channel; 
    206     private boolean m_fitAllChannels; 
     194    private int _channel; 
     195    private boolean _fitAllChannels; 
    207196 
    208197    // current x, y 
    209     private int m_x; 
    210     private int m_y; 
    211  
    212     private double[] m_param = new double[7]; 
    213     private boolean[] m_free = { true, true, true, true, true, true, true }; 
    214  
    215     private int m_startBin; 
    216     private int m_stopBin; 
    217     private int m_startX; 
    218     private int m_threshold; 
    219     private float m_chiSqTarget; 
     198    private int _x; 
     199    private int _y; 
     200 
     201    private double[] _param = new double[7]; 
     202    private boolean[] _free = { true, true, true, true, true, true, true }; 
     203 
     204    private int _startBin; 
     205    private int _stopBin; 
     206    private int _startX; 
     207    private int _threshold; 
     208    private float _chiSqTarget; 
    220209     
    221     private FitInfo m_fitInfo; 
    222  
    223     private int m_debug = 0; 
     210    private FitInfo _fitInfo; 
     211 
     212    private int _debug = 0; 
    224213 
    225214    public SLIMProcessor() { 
    226         m_analysis = new SLIMAnalysis(); 
    227         m_binning = new SLIMBinning(); 
    228         m_quit = false; 
    229         m_cancel = false; 
    230         m_fitInProgress = false; 
    231         m_fitted = false; 
     215        _analysis = new SLIMAnalysis(); 
     216        _binning = new SLIMBinning(); 
     217        _quit = false; 
     218        _cancel = false; 
     219        _fitInProgress = false; 
     220        _fitted = false; 
    232221    } 
    233222 
     
    235224        boolean success = false; 
    236225 
    237         m_image = image; 
     226        _image = image; 
    238227        if (getImageInfo(image)) { 
    239228            // show the UI; do fits 
     
    250239        boolean success = false; 
    251240        if (showFileDialog(getFileFromPreferences())) { 
    252             m_image = loadImage(m_path, m_file); 
    253             if (null == m_image) { 
     241            _image = loadImage(_path, _file); 
     242            if (null == _image) { 
    254243                System.out.println("image is null"); 
    255244            } 
    256             if (getImageInfo(m_image)) { 
    257                 savePathAndFileInPreferences(m_path, m_file); 
     245            if (getImageInfo(_image)) { 
     246                savePathAndFileInPreferences(_path, _file); 
    258247                success = true; 
    259248            } 
     
    272261     * Loops until quitting time and handles fit requests. 
    273262     * Fitting is driven by a button on the UI panel which 
    274      * sets the global m_fitInProgress. 
     263     * sets the global _fitInProgress. 
    275264     * 
    276265     * @param uiPanel 
     
    281270         
    282271        // cursor support 
    283         _fittingCursor = new FittingCursor(m_timeRange, m_bins); 
     272        _fittingCursor = new FittingCursor(_timeRange, _bins); 
    284273        _fittingCursor.addListener(new FittingCursorListener()); 
    285274         
     
    288277        fittingCursorHelper.setFittingCursor(_fittingCursor); 
    289278        final IUserInterfacePanel uiPanel = new UserInterfacePanel(TABBED, 
    290                 USE_TAU, m_analysis.getChoices(), m_binning.getChoices(), 
     279                USE_TAU, _analysis.getChoices(), _binning.getChoices(), 
    291280                fittingCursorHelper); 
    292         m_uiPanel = uiPanel; //TODO almost got by having it just be a local variable 
     281        _uiPanel = uiPanel; //TODO almost got by having it just be a local variable 
    293282        uiPanel.setX(0); 
    294283        uiPanel.setY(0); 
    295284        //TODO ARG these estimates s/n/b necessary; use the EstimateCursors class 
    296         //uiPanel.setStart(estimator.getStart(m_bins)); 
    297         //uiPanel.setStop(estimator.getStop(m_bins)); 
     285        //uiPanel.setStart(estimator.getStart(_bins)); 
     286        //uiPanel.setStop(estimator.getStop(_bins)); 
    298287        uiPanel.setThreshold(estimator.getThreshold()); 
    299288        uiPanel.setChiSquareTarget(estimator.getChiSquareTarget()); 
     
    307296                 * Triggers a fit. 
    308297                 */ 
     298                @Override 
    309299                public void doFit() { 
    310                     m_cancel = false; 
    311                     m_fitInProgress = true; 
     300                    _cancel = false; 
     301                    _fitInProgress = true; 
    312302                } 
    313303 
     
    315305                 * Cancels ongoing fit. 
    316306                 */ 
     307                @Override 
    317308                public void cancelFit() { 
    318                     m_cancel = true; 
    319                     if (null != m_fitInfo) { 
    320                         m_fitInfo.setCancel(true); 
     309                    _cancel = true; 
     310                    if (null != _fitInfo) { 
     311                        _fitInfo.setCancel(true); 
    321312                    } 
    322313                } 
     
    325316                 * Triggers refit of current pixel. 
    326317                 */ 
     318                @Override 
    327319                public void doPixelFit() { 
    328320                    // ordinarily these fits take place in the thread at the end  
     
    336328                 * Quits running plugin. 
    337329                 */ 
     330                @Override 
    338331                public void quit() { 
    339                     m_quit = true; 
     332                    _quit = true; 
    340333                } 
    341334 
     
    346339                 * @return whether successful 
    347340                 */ 
     341                @Override 
    348342                public boolean loadExcitation(String fileName) { 
    349                     Excitation excitation = ExcitationFileHandler.getInstance().loadExcitation(fileName, m_timeRange); 
     343                    Excitation excitation = ExcitationFileHandler.getInstance().loadExcitation(fileName, _timeRange); 
    350344                    return updateExcitation(uiPanel, excitation); 
    351345                } 
     
    357351                 * @return whether successful 
    358352                 */ 
     353                @Override 
    359354                public boolean createExcitation(String fileName) { 
    360355                    int channel = 0; 
    361                     if (null != m_grayScaleImage) { 
    362                         channel = m_grayScaleImage.getChannel(); 
     356                    if (null != _grayScaleImage) { 
     357                        channel = _grayScaleImage.getChannel(); 
    363358                    } 
    364359                    int x = uiPanel.getX(); 
    365360                    int y = uiPanel.getY(); 
    366                     double[] values = new double[m_bins]; 
    367                     for (int b = 0; b < m_bins; ++b) { 
    368                         values[b] = getData(m_cursor, channel, x, y, b); 
     361                    double[] values = new double[_bins]; 
     362                    for (int b = 0; b < _bins; ++b) { 
     363                        values[b] = getData(_cursor, channel, x, y, b); 
    369364                    } 
    370                     Excitation excitation = ExcitationFileHandler.getInstance().createExcitation(fileName, values, m_timeRange); 
     365                    Excitation excitation = ExcitationFileHandler.getInstance().createExcitation(fileName, values, _timeRange); 
    371366                    return updateExcitation(uiPanel, excitation); 
    372367                } 
     
    376371                 * 
    377372                 */ 
     373                @Override 
    378374                public void cancelExcitation() { 
    379                     if (null != m_excitationPanel) { 
    380                         m_excitationPanel.quit(); 
    381                         m_excitationPanel = null; 
     375                    if (null != _excitationPanel) { 
     376                        _excitationPanel.quit(); 
     377                        _excitationPanel = null; 
    382378                        updateExcitation(null, null); 
    383379                        //TODO redo stop/start cursors on decay curve? 
     
    388384                 * Estimates prompt and decay cursors. 
    389385                 */ 
     386                @Override 
    390387                public void estimateCursors() { 
    391                     double xInc = m_timeRange; 
     388                    double xInc = _timeRange; 
    392389                     
    393390                    double[] prompt = null; 
    394                     if (null != m_excitationPanel) { 
    395                         prompt = m_excitationPanel.getRawValues(); 
     391                    if (null != _excitationPanel) { 
     392                        prompt = _excitationPanel.getRawValues(); 
    396393                    } 
    397                     double[] decay = new double[m_bins]; 
    398                     for (int b = 0; b < m_bins; ++b) { 
    399                         decay[b] = getData(m_cursor, m_channel, m_x, m_y, b); 
     394                    double[] decay = new double[_bins]; 
     395                    for (int b = 0; b < _bins; ++b) { 
     396                        decay[b] = getData(_cursor, _channel, _x, _y, b); 
    400397                    } 
    401398                     
    402                     double chiSqTarget = m_uiPanel.getChiSquareTarget(); 
     399                    double chiSqTarget = _uiPanel.getChiSquareTarget(); 
    403400//                    System.out.println("prompt is " + prompt + " and fitting cursor thinks prompt " + _fittingCursor.getHasPrompt()); 
    404401                    if (null != prompt && _fittingCursor.getHasPrompt()) { 
     
    443440 
    444441        // create a grayscale image from the data 
    445         m_grayScaleImage = new GrayScaleImage(m_image); 
    446         m_grayScaleImage.setListener( 
     442        _grayScaleImage = new GrayScaleImage(_image); 
     443        _grayScaleImage.setListener( 
    447444            new ISelectListener() { 
     445                @Override 
    448446                public void selected(int channel, int x, int y) { 
    449447                    // just ignore clicks during a fit 
    450                     if (!m_fitInProgress) { 
    451                         synchronized (m_synchFit) { 
    452                             float zoomFactor = ((GrayScaleImage)m_grayScaleImage).getZoomFactor(); 
     448                    if (!_fitInProgress) { 
     449                        synchronized (_synchFit) { 
     450                            float zoomFactor = ((GrayScaleImage)_grayScaleImage).getZoomFactor(); 
    453451                            x *= zoomFactor; 
    454452                            y *= zoomFactor; 
    455453                             
    456                             m_x = x; 
    457                             m_y = y; //TODO ARG 4/6/12 trying to fix my flakey bug 
     454                            _x = x; 
     455                            _y = y; //TODO ARG 4/6/12 trying to fix my flakey bug 
    458456                             
    459457                            uiPanel.setX(x); 
    460458                            uiPanel.setY(y); 
    461                             getFitSettings(m_grayScaleImage, uiPanel, _fittingCursor); 
     459                            getFitSettings(_grayScaleImage, uiPanel, _fittingCursor); 
    462460                            // fit on the pixel clicked 
    463461                            fitPixel(uiPanel, _fittingCursor); 
     
    468466        ); 
    469467        // get a correction factor for photon counts 
    470         m_minNonZeroPhotonCount = m_grayScaleImage.getMinNonZeroPhotonCount(); 
     468        _minNonZeroPhotonCount = _grayScaleImage.getMinNonZeroPhotonCount(); 
    471469 
    472470        // what is the brightest point in the image? 
    473         int[] brightestPoint = m_grayScaleImage.getBrightestPoint(); 
    474         m_x = brightestPoint[0]; 
    475         m_y = brightestPoint[1]; 
    476         uiPanel.setX(m_x); 
    477         uiPanel.setY(m_y); 
     471        int[] brightestPoint = _grayScaleImage.getBrightestPoint(); 
     472        _x = brightestPoint[0]; 
     473        _y = brightestPoint[1]; 
     474        uiPanel.setX(_x); 
     475        uiPanel.setY(_y); 
    478476 
    479477        // set start and stop for now; will be updated if we load an excitation curvce 
     
    481479         
    482480        // fit on the brightest pixel 
    483         getFitSettings(m_grayScaleImage, uiPanel, _fittingCursor); 
     481        getFitSettings(_grayScaleImage, uiPanel, _fittingCursor); 
    484482        fitPixel(uiPanel, _fittingCursor);  
    485483 
    486484        // processing loop; waits for UI panel input 
    487         while (!m_quit) { 
    488             while (!m_fitInProgress) { 
     485        while (!_quit) { 
     486            while (!_fitInProgress) { 
    489487                try { 
    490488                    Thread.sleep(1000); 
     
    493491 
    494492                } 
    495                 if (m_quit) { 
     493                if (_quit) { 
    496494                    hideUIPanel(uiPanel); 
    497495                    return; 
     
    500498 
    501499            //uiPanel.enable(false); //TODO this might be better to be same as grayScalePanel 
    502             m_grayScaleImage.enable(false); 
     500            _grayScaleImage.enable(false); 
    503501 
    504502            // get settings of requested fit 
    505             getFitSettings(m_grayScaleImage, uiPanel, _fittingCursor); 
     503            getFitSettings(_grayScaleImage, uiPanel, _fittingCursor); 
    506504 
    507505            // do the fit 
    508506            fitData(uiPanel); 
    509507 
    510             m_fitInProgress = false; 
     508            _fitInProgress = false; 
    511509            //uiPanel.enable(true); 
    512             m_grayScaleImage.enable(true); 
     510            _grayScaleImage.enable(true); 
    513511            uiPanel.reset(); 
    514512        } 
     
    517515 
    518516    private void hideUIPanel(IUserInterfacePanel uiPanel) { 
    519         m_grayScaleImage.setListener(null); 
     517        _grayScaleImage.setListener(null); 
    520518        //TODO uiPanel is still hooked up as start stop listeners to decay curves! 
    521519        uiPanel.getFrame().setVisible(false); 
     
    531529        // get selected channel 
    532530        int channel = 0; 
    533         if (null != m_grayScaleImage) { 
    534             channel = m_grayScaleImage.getChannel(); 
    535         } 
    536         double[] decay = new double[m_bins]; 
    537         for (int b = 0; b < m_bins; ++b) { 
    538             decay[b] = getData(m_cursor, channel, m_x, m_y, b); 
    539         } 
    540         int[] results = CursorEstimator.estimateDecayCursors(m_timeRange, decay); 
     531        if (null != _grayScaleImage) { 
     532            channel = _grayScaleImage.getChannel(); 
     533        } 
     534        double[] decay = new double[_bins]; 
     535        for (int b = 0; b < _bins; ++b) { 
     536            decay[b] = getData(_cursor, channel, _x, _y, b); 
     537        } 
     538        int[] results = CursorEstimator.estimateDecayCursors(_timeRange, decay); 
    541539        int transientStart = results[CursorEstimator.TRANSIENT_START]; 
    542540        int dataStart = results[CursorEstimator.DATA_START]; 
     
    557555     */ 
    558556    private double[] getSummedDecay() { 
    559         double[] decay = new double[m_bins]; 
     557        double[] decay = new double[_bins]; 
    560558        for (int i = 0; i < decay.length; ++i) { 
    561559            decay[i] = 0.0; 
    562560        } 
    563         for (int y = 0; y < m_height; ++y) { 
    564             for (int x = 0; x < m_width; ++x) { 
    565                 for (int c = 0; c < m_channels; ++c) { 
    566                     for (int b = 0; b < m_bins; ++b) { 
    567                         decay[b] += getData(m_cursor, c, x, y, b); 
     561        for (int y = 0; y < _height; ++y) { 
     562            for (int x = 0; x < _width; ++x) { 
     563                for (int c = 0; c < _channels; ++c) { 
     564                    for (int b = 0; b < _bins; ++b) { 
     565                        decay[b] += getData(_cursor, c, x, y, b); 
    568566                    } 
    569567                } 
     
    577575//        System.out.println("###update excitation " + excitation); 
    578576        if (null != excitation) { 
    579             if (null != m_excitationPanel) { 
    580                 m_excitationPanel.quit(); 
     577            if (null != _excitationPanel) { 
     578                _excitationPanel.quit(); 
    581579            } 
    582580 
    583581            // get selected channel 
    584582            int channel = 0; 
    585             if (null != m_grayScaleImage) { 
    586                 channel = m_grayScaleImage.getChannel(); 
    587             } 
    588             double[] decay = new double[m_bins]; 
    589             for (int b = 0; b < m_bins; ++b) { 
    590                 decay[b] = getData(m_cursor, channel, m_x, m_y, b); 
     583            if (null != _grayScaleImage) { 
     584                channel = _grayScaleImage.getChannel(); 
     585            } 
     586            double[] decay = new double[_bins]; 
     587            for (int b = 0; b < _bins; ++b) { 
     588                decay[b] = getData(_cursor, channel, _x, _y, b); 
    591589            } 
    592590 
    593591            double chiSqTarget = uiPanel.getChiSquareTarget(); 
    594592            double[] results = CursorEstimator.estimateCursors 
    595                     (m_timeRange, excitation.getValues(), decay, chiSqTarget); 
     593                    (_timeRange, excitation.getValues(), decay, chiSqTarget); 
    596594             
    597595            // want all the fitting cursor listeners to get everything at once 
     
    606604            _fittingCursor.sendNotifications(); 
    607605 
    608             m_excitationPanel = new ExcitationPanel(excitation, _fittingCursor); //TODO ARG excitation cursor change refit problem here; get new values before excitation ready for refit 
     606            _excitationPanel = new ExcitationPanel(excitation, _fittingCursor); //TODO ARG excitation cursor change refit problem here; get new values before excitation ready for refit 
    609607 
    610608            success = true; 
     
    617615 
    618616    private void getFitSettings(IGrayScaleImage grayScalePanel, IUserInterfacePanel uiPanel, FittingCursor cursor) { 
    619         m_channel        = grayScalePanel.getChannel(); 
    620  
    621         m_region         = uiPanel.getRegion(); 
    622         m_algorithm      = uiPanel.getAlgorithm(); 
    623         m_function       = uiPanel.getFunction(); 
    624         m_fitAllChannels = uiPanel.getFitAllChannels(); 
    625  
    626         m_x              = uiPanel.getX(); 
    627         m_y              = uiPanel.getY(); 
    628         m_threshold      = uiPanel.getThreshold(); 
    629  
    630         m_param          = uiPanel.getParameters(); 
    631         m_free           = uiPanel.getFree(); 
    632          
    633         m_startBin       = cursor.getTransientStartBin(); 
    634         m_stopBin        = cursor.getTransientStopBin(); 
     617        _channel        = grayScalePanel.getChannel(); 
     618 
     619        _region         = uiPanel.getRegion(); 
     620        _algorithm      = uiPanel.getAlgorithm(); 
     621        _function       = uiPanel.getFunction(); 
     622        _fitAllChannels = uiPanel.getFitAllChannels(); 
     623 
     624        _x              = uiPanel.getX(); 
     625        _y              = uiPanel.getY(); 
     626        _threshold      = uiPanel.getThreshold(); 
     627 
     628        _param          = uiPanel.getParameters(); 
     629        _free           = uiPanel.getFree(); 
     630         
     631        _startBin       = cursor.getTransientStartBin(); 
     632        _stopBin        = cursor.getTransientStopBin(); 
    635633    } 
    636634 
     
    642640     */ 
    643641    private boolean showFileDialog(String[] defaultPathAndFile) { 
    644         OpenDialog dialog = new OpenDialog("Load Data", m_path, m_file); 
    645         m_path = dialog.getDirectory(); 
    646         m_file = dialog.getFileName(); 
     642        OpenDialog dialog = new OpenDialog("Load Data", _path, _file); 
     643        _path = dialog.getDirectory(); 
     644        _file = dialog.getFileName(); 
    647645//        System.out.println("directory is " + dialog.getDirectory()); 
    648646//        System.out.println("file is " + dialog.getFileName()); 
     
    671669        try { 
    672670            imageReader.setId(path + file); 
    673             m_globalMetadata = imageReader.getGlobalMetadata(); 
     671            _globalMetadata = imageReader.getGlobalMetadata(); 
    674672            imageReader.close(); 
    675673        } 
     
    697695        } 
    698696        Integer xIndex, yIndex, lifetimeIndex, channelIndex; 
    699         m_width = ImageUtils.getWidth(image); 
    700         m_height = ImageUtils.getHeight(image); 
    701         m_channels = ImageUtils.getNChannels(image); 
     697        _width = ImageUtils.getWidth(image); 
     698        _height = ImageUtils.getHeight(image); 
     699        _channels = ImageUtils.getNChannels(image); 
    702700        //TODO this is broken; returns 1 when there are 16 channels; corrected below 
    703         System.out.println("ImageUtils.getNChannels returns " + m_channels); 
    704         m_hasChannels = false; 
     701        System.out.println("ImageUtils.getNChannels returns " + _channels); 
     702        _hasChannels = false; 
    705703        if (dimensions.length > 3) { 
    706             m_hasChannels = true; 
    707             m_channelIndex = 3; 
    708             m_channels = dimensions[m_channelIndex]; 
    709         } 
    710         System.out.println("corrected to " + m_channels); 
    711         m_bins = ImageUtils.getDimSize(image, FormatTools.LIFETIME); 
    712         m_binIndex = 2; 
    713         System.out.println("width " + m_width + " height " + m_height + " timeBins " + m_bins + " channels " + m_channels); 
    714         m_cursor = image.createLocalizableByDimCursor(); 
    715          
    716         m_timeRange = 10.0f; 
    717         if (null != m_globalMetadata) { 
    718             Number timeBase = (Number) m_globalMetadata.get("time base"); 
     704            _hasChannels = true; 
     705            _channelIndex = 3; 
     706            _channels = dimensions[_channelIndex]; 
     707        } 
     708        System.out.println("corrected to " + _channels); 
     709        _bins = ImageUtils.getDimSize(image, FormatTools.LIFETIME); 
     710        _binIndex = 2; 
     711        System.out.println("width " + _width + " height " + _height + " timeBins " + _bins + " channels " + _channels); 
     712        _cursor = image.createLocalizableByDimCursor(); 
     713         
     714        _timeRange = 10.0f; 
     715        if (null != _globalMetadata) { 
     716            Number timeBase = (Number) _globalMetadata.get("time base"); 
    719717            if (null != timeBase) { 
    720                 m_timeRange = timeBase.floatValue(); 
    721             } 
    722         } 
    723         m_timeRange /= m_bins; 
     718                _timeRange = timeBase.floatValue(); 
     719            } 
     720        } 
     721        _timeRange /= _bins; 
    724722 
    725723        //TODO ARG debugging 
    726         if (null != m_globalMetadata) { 
    727             java.util.Set<String> keySet = m_globalMetadata.keySet(); 
     724        if (null != _globalMetadata) { 
     725            java.util.Set<String> keySet = _globalMetadata.keySet(); 
    728726            for (String key : keySet) { 
    729                 System.out.println("key: " + key + " value:" + m_globalMetadata.get(key)); 
     727                System.out.println("key: " + key + " value:" + _globalMetadata.get(key)); 
    730728            }  
    731729        } 
     
    765763        Image<DoubleType> fittedImage = null; 
    766764        // only one fit at a time 
    767         synchronized (m_synchFit) { 
     765        synchronized (_synchFit) { 
    768766             
    769             switch (m_region) { 
     767            switch (_region) { 
    770768                case SUMMED: 
    771769                    // sum all pixels 
     
    778776                case POINT: 
    779777                    // fit single pixel 
    780                     fittedImage = fitPixel(uiPanel, m_x, m_y); 
     778                    fittedImage = fitPixel(uiPanel, _x, _y); 
    781779                    break; 
    782780                case EACH: 
     
    788786        if (null != fittedImage) { 
    789787            for (String analysis : uiPanel.getAnalysisList()) { 
    790                 m_analysis.doAnalysis(analysis, fittedImage, uiPanel.getRegion(), uiPanel.getFunction()); //TODO get from uiPanel or get from global?  re-evaluate approach here 
     788                _analysis.doAnalysis(analysis, fittedImage, uiPanel.getRegion(), uiPanel.getFunction()); //TODO get from uiPanel or get from global?  re-evaluate approach here 
    791789            } 
    792790        } 
     
    830828    private Image<DoubleType> fitImage(IUserInterfacePanel uiPanel) { 
    831829        // get fit settings from the UI panel 
    832         FitInfo fitInfo = getFitInfo(m_grayScaleImage, uiPanel, _fittingCursor); 
    833         fitInfo.setXInc(m_timeRange); 
    834         if (_fittingCursor.getHasPrompt() && null != m_excitationPanel) { 
     830        FitInfo fitInfo = getFitInfo(_grayScaleImage, uiPanel, _fittingCursor); 
     831        fitInfo.setXInc(_timeRange); 
     832        if (_fittingCursor.getHasPrompt() && null != _excitationPanel) { 
    835833            double start = _fittingCursor.getPromptStartValue(); 
    836834            double stop  = _fittingCursor.getPromptStopValue(); 
    837835            double base  = _fittingCursor.getPromptBaselineValue(); 
    838             double[] values = m_excitationPanel.getValues(start, stop, base); 
     836            double[] values = _excitationPanel.getValues(start, stop, base); 
    839837            fitInfo.setPrompt(values); 
    840838        } 
    841839        fitInfo.setIndexColorModel(HistogramTool.getIndexColorModel()); 
    842         m_fitInfo = fitInfo; 
     840        _fitInfo = fitInfo; 
    843841         
    844842        // set up images 
    845         IDecayImage decayImage = new DecayImageWrapper(m_image, m_width, m_height, m_channels, m_bins, m_binIndex); 
     843        IDecayImage decayImage = new DecayImageWrapper(_image, _width, _height, _channels, _bins, _binIndex); 
    846844        IFittedImage previousImage = null; 
    847845        int width = decayImage.getWidth(); 
     
    856854        // set up preprocessor chain 
    857855        IProcessor processor = decayImage; 
    858         ISLIMBinner binner = m_binning.getBinner(uiPanel.getBinning()); 
     856        ISLIMBinner binner = _binning.getBinner(uiPanel.getBinning()); 
    859857        if (null != binner) { 
    860             binner.init(m_width, m_height); 
     858            binner.init(_width, _height); 
    861859            binner.chain(processor); 
    862860            processor = binner; 
     
    930928                    components, 
    931929                    fitInfo.getColorizeGrayScale(), 
    932                     m_grayScaleImage); 
     930                    _grayScaleImage); 
    933931            imageColorizer.beginFit(); 
    934932        } 
     
    10881086 
    10891087        // loop over all channels or just the current one 
    1090         for (int channel : getChannelIndices(m_fitAllChannels, m_channel, m_channels)) { 
     1088        for (int channel : getChannelIndices(_fitAllChannels, _channel, _channels)) { 
    10911089            curveFitData = new CurveFitData(); 
    10921090            curveFitData.setParams(params.clone()); //TODO NO NO NO s/b either from UI or fitted point or fitted whole image 
    1093             yCount = new double[m_bins]; 
    1094             for (int b = 0; b < m_bins; ++b) { 
     1091            yCount = new double[_bins]; 
     1092            for (int b = 0; b < _bins; ++b) { 
    10951093                yCount[b] = 0.0; 
    10961094            } 
     
    11011099 
    11021100            // sum this channel 
    1103             for (int y = 0; y < m_height; ++y) { 
    1104                 for (int x = 0; x < m_width; ++x) { 
    1105                     for (int b = 0; b < m_bins; ++b) { 
    1106                         double count = getData(m_cursor, m_channel, x, y, b); 
     1101            for (int y = 0; y < _height; ++y) { 
     1102                for (int x = 0; x < _width; ++x) { 
     1103                    for (int b = 0; b < _bins; ++b) { 
     1104                        double count = getData(_cursor, _channel, x, y, b); 
    11071105                        yCount[b] += count; 
    11081106                        photons += (int) count; 
     
    11131111            curveFitData.setYCount(yCount); 
    11141112            curveFitData.setTransStartIndex(0); 
    1115             curveFitData.setDataStartIndex(m_startBin); 
    1116             curveFitData.setTransEndIndex(m_stopBin); 
    1117             yFitted = new double[m_bins]; 
     1113            curveFitData.setDataStartIndex(_startBin); 
     1114            curveFitData.setTransEndIndex(_stopBin); 
     1115            yFitted = new double[_bins]; 
    11181116            curveFitData.setYFitted(yFitted);       
    11191117 
    11201118            // use zero for current channel if it's the only one 
    1121             int nominalChannel = m_fitAllChannels ? channel : 0; 
     1119            int nominalChannel = _fitAllChannels ? channel : 0; 
    11221120            curveFitData.setChannel(nominalChannel); 
    11231121            curveFitData.setX(0); 
     
    11321130 
    11331131        // show decay and update UI parameters 
    1134         int visibleChannel = m_fitAllChannels ? m_channel : 0; 
     1132        int visibleChannel = _fitAllChannels ? _channel : 0; 
    11351133        String title = "Summed"; 
    1136         if (1 < m_channels) { 
    1137             title += " Channel " + (m_channel + 1); 
     1134        if (1 < _channels) { 
     1135            title += " Channel " + (_channel + 1); 
    11381136        } 
    11391137        showDecayGraph(title, uiPanel, _fittingCursor, dataArray[visibleChannel]); 
     
    11411139 
    11421140        // get the results 
    1143         int channels = m_fitAllChannels ? m_channels : 1; 
     1141        int channels = _fitAllChannels ? _channels : 1; 
    11441142        //fittedPixels = makeImage(channels, 1, 1, uiPanel.getParameterCount()); //TODO ImgLib bug if you use 1, 1, 1, 4; see "imglibBug()" below. 
    11451143        fittedPixels = makeImage(channels + 1, 2, 2, uiPanel.getParameterCount()); //TODO this is a workaround; unused pixels will remain NaNs 
     
    11631161 
    11641162        // loop over all channels or just the current one 
    1165         for (int channel : getChannelIndices(m_fitAllChannels, m_channel, m_channels)) { 
     1163        for (int channel : getChannelIndices(_fitAllChannels, _channel, _channels)) { 
    11661164            int roiNumber = 1; 
    11671165            for (Roi roi: getRois()) { 
    11681166                curveFitData = new CurveFitData(); 
    11691167                curveFitData.setParams(params.clone()); 
    1170                 yCount = new double[m_bins]; 
    1171                 for (int b = 0; b < m_bins; ++b) { 
     1168                yCount = new double[_bins]; 
     1169                for (int b = 0; b < _bins; ++b) { 
    11721170                    yCount[b] = 0.0; 
    11731171                } 
     
    11781176                        if (roi.contains(bounds.x + x, bounds.y + y)) { 
    11791177                            ++pixels; 
    1180                             for (int b = 0; b < m_bins; ++b) { 
    1181                                 yCount[b] += getData(m_cursor, channel, x, y, b); 
     1178                            for (int b = 0; b < _bins; ++b) { 
     1179                                yCount[b] += getData(_cursor, channel, x, y, b); 
    11821180                            } 
    11831181                        } 
     
    11861184                curveFitData.setYCount(yCount); 
    11871185                curveFitData.setTransStartIndex(0); 
    1188                 curveFitData.setDataStartIndex(m_startBin); 
    1189                 curveFitData.setTransEndIndex(m_stopBin); 
     1186                curveFitData.setDataStartIndex(_startBin); 
     1187                curveFitData.setTransEndIndex(_stopBin); 
    11901188                 
    1191                 yFitted = new double[m_bins]; 
     1189                yFitted = new double[_bins]; 
    11921190                curveFitData.setYFitted(yFitted); 
    11931191 
    11941192                // use zero for current channel if it's the only one 
    1195                 int nominalChannel = m_fitAllChannels ? channel : 0; 
     1193                int nominalChannel = _fitAllChannels ? channel : 0; 
    11961194                curveFitData.setChannel(nominalChannel); 
    11971195                curveFitData.setX(roiNumber - 1); 
     
    12131211        int roiNumber = 1; 
    12141212        for (Roi roi: getRois()) { 
    1215             int nominalChannel = m_fitAllChannels ? m_channel : 0; 
     1213            int nominalChannel = _fitAllChannels ? _channel : 0; 
    12161214            int dataIndex = nominalChannel * getRois().length + (roiNumber - 1); 
    12171215 
    12181216            String title = "Roi " + roiNumber; 
    1219             if (1 < m_channels) { 
    1220                 title += " Channel " + (m_channel + 1); 
     1217            if (1 < _channels) { 
     1218                title += " Channel " + (_channel + 1); 
    12211219            } 
    12221220            showDecayGraph(title, uiPanel, _fittingCursor, dataArray[dataIndex]); 
     
    12321230         
    12331231        // show colorized lifetimes 
    1234         ImageProcessor imageProcessor = new ColorProcessor(m_width, m_height); 
     1232        ImageProcessor imageProcessor = new ColorProcessor(_width, _height); 
    12351233        ImagePlus imagePlus = new ImagePlus("ROIs Fitted Lifetimes", imageProcessor); 
    12361234        roiNumber = 1; 
    12371235        for (Roi roi: getRois()) { 
    1238             int nominalChannel = m_fitAllChannels ? m_channel : 0; 
     1236            int nominalChannel = _fitAllChannels ? _channel : 0; 
    12391237            int dataIndex = nominalChannel * getRois().length + (roiNumber - 1); 
    12401238            double lifetime = dataArray[dataIndex].getParams()[3]; 
     
    12581256 
    12591257        // get the results 
    1260         int channels = m_fitAllChannels ? m_channels : 1; 
     1258        int channels = _fitAllChannels ? _channels : 1; 
    12611259        //fittedPixels = makeImage(channels, 1, 1, uiPanel.getParameterCount()); //TODO ImgLib bug if you use 1, 1, 1, 4; see "imglibBug()" below. 
    12621260        fittedPixels = makeImage(channels + 1, getRois().length + 1, 2, uiPanel.getParameterCount()); //TODO this is a workaround; unused pixels will remain NaNs 
     
    12721270        int x = uiPanel.getX(); 
    12731271        int y = uiPanel.getY(); 
    1274         m_startBin = fittingCursor.getDataStartBin(); 
    1275         m_stopBin = fittingCursor.getTransientStopBin(); 
    1276 //        System.out.println("m_startBin is " + m_startBin + " m_stopBin " + m_stopBin); 
     1272        _startBin = fittingCursor.getDataStartBin(); 
     1273        _stopBin = fittingCursor.getTransientStopBin(); 
     1274//        System.out.println("_startBin is " + _startBin + " _stopBin " + _stopBin); 
    12771275//        System.out.println("FYI FWIW prompt delay is " + _fittingCursor.getPromptDelay()); 
    12781276//        System.out.println("prompt start is " + _fittingCursor.getPromptStartValue() + " stop " + _fittingCursor.getPromptStopValue()); 
     
    12911289         
    12921290        // set up the source 
    1293         IDecayImage decayImage = new DecayImageWrapper(m_image, m_width, m_height, m_channels, m_bins, m_binIndex); 
     1291        IDecayImage decayImage = new DecayImageWrapper(_image, _width, _height, _channels, _bins, _binIndex); 
    12941292        IProcessor processor = decayImage; 
    1295         ISLIMBinner binner = m_binning.getBinner(uiPanel.getBinning()); 
     1293        ISLIMBinner binner = _binning.getBinner(uiPanel.getBinning()); 
    12961294        if (null != binner) { 
    1297             binner.init(m_width, m_height); 
     1295            binner.init(_width, _height); 
    12981296            binner.chain(processor); 
    12991297            processor = binner; 
     
    13011299         
    13021300        // set up the location 
    1303         int[] location = new int[] { m_x, m_y, m_channel }; 
     1301        int[] location = new int[] { _x, _y, _channel }; 
    13041302         
    13051303        // build the data 
     
    13121310 
    13131311        // loop over all channels or just the current one 
    1314         for (int channel : getChannelIndices(m_fitAllChannels, m_channel, m_channels)) { 
     1312        for (int channel : getChannelIndices(_fitAllChannels, _channel, _channels)) { 
    13151313            curveFitData = new CurveFitData(); 
    13161314            curveFitData.setParams(params.clone()); //TODO NO NO NO s/b either from UI or fitted point or fitted whole image 
     
    13191317            yCount = processor.getPixel(location); 
    13201318            int photons = 0; 
    1321             for (int c = 0; c < m_bins; ++c) { 
     1319            for (int c = 0; c < _bins; ++c) { 
    13221320                photons += yCount[c]; 
    13231321            } 
     
    13331331//            System.out.println("uiPanel.getFunction is " + uiPanel.getAlgorithm() + " SLIMCURVE_RLD_LMA is " + FitAlgorithm.SLIMCURVE_RLD_LMA); 
    13341332            
    1335             yFitted = new double[m_bins]; 
     1333            yFitted = new double[_bins]; 
    13361334            curveFitData.setYFitted(yFitted); 
    13371335            curveFitData.setChiSquareTarget(chiSquareTarget); 
    13381336 
    13391337            // use zero for current channel if it's the only one 
    1340             int nominalChannel = m_fitAllChannels ? channel : 0; 
     1338            int nominalChannel = _fitAllChannels ? channel : 0; 
    13411339            curveFitData.setChannel(nominalChannel); 
    13421340            curveFitData.setX(0); 
     
    13521350        // show decay graph for visible channel 
    13531351        String title = "Fitted Pixel " + x + " " + y; 
    1354         if (1 < m_channels) { 
    1355             title += " Channel " + (m_channel + 1); 
     1352        if (1 < _channels) { 
     1353            title += " Channel " + (_channel + 1); 
    13561354        } 
    13571355        int visibleChannel = 0; 
    1358         if (m_fitAllChannels) { 
    1359             visibleChannel = m_channel; 
     1356        if (_fitAllChannels) { 
     1357            visibleChannel = _channel; 
    13601358        } 
    13611359        showDecayGraph(title, uiPanel, _fittingCursor, dataArray[visibleChannel]); 
     
    13651363         
    13661364        // get the results 
    1367         int channels = m_fitAllChannels ? m_channels : 1; 
     1365        int channels = _fitAllChannels ? _channels : 1; 
    13681366        //fittedPixels = makeImage(channels, 1, 1, uiPanel.getParameterCount()); //TODO ImgLib bug if you use 1, 1, 1, 4; see "imglibBug()" below. 
    13691367        fittedPixels = makeImage(channels + 1, 2, 2, uiPanel.getParameterCount()); //TODO this is a workaround; unused pixels will remain NaNs 
     
    14581456    private double getData(LocalizableByDimCursor<T> cursor, int channel, int x, int y, int bin) { 
    14591457        int dim[]; 
    1460         if (m_hasChannels) { 
     1458        if (_hasChannels) { 
    14611459            dim = new int[] { x, y, bin, channel }; //TODO ARG is this order guaranteed? 
    14621460        } 
     
    14651463        } 
    14661464        cursor.moveTo(dim); 
    1467         return cursor.getType().getRealFloat() / m_minNonZeroPhotonCount; 
     1465        return cursor.getType().getRealFloat() / _minNonZeroPhotonCount; 
    14681466    } 
    14691467 
     
    15301528 
    15311529    private void cancelImageFit() { 
    1532         m_fittedImage = null; 
    1533         m_fittedParameterCount = 0; 
     1530        _fittedImage = null; 
     1531        _fittedParameterCount = 0; 
    15341532    } 
    15351533 
     
    16811679        curveFitter.setFitFunction(fitFunction); 
    16821680        curveFitter.setNoiseModel(uiPanel.getNoiseModel()); 
    1683         curveFitter.setXInc(m_timeRange); 
     1681        curveFitter.setXInc(_timeRange); 
    16841682        curveFitter.setFree(translateFree(uiPanel.getFunction(), uiPanel.getFree())); 
    1685         if (null != m_excitationPanel) { 
     1683        if (null != _excitationPanel) { 
    16861684            double[] excitation = null; 
    1687             if (null != m_excitationPanel) { 
     1685            if (null != _excitationPanel) { 
    16881686                double start = _fittingCursor.getPromptStartValue(); 
    16891687                double stop  = _fittingCursor.getPromptStopValue(); 
    16901688                double base  = _fittingCursor.getPromptBaselineValue(); 
    1691                 excitation = m_excitationPanel.getValues(start, stop, base); 
     1689                excitation = _excitationPanel.getValues(start, stop, base); 
    16921690            }             
    16931691            curveFitter.setInstrumentResponse(excitation); 
     
    17571755    { 
    17581756        loci.slim.ui.IDecayGraph decayGraph = loci.slim.ui.DecayGraph.getInstance(); 
    1759         JFrame frame = decayGraph.init(uiPanel.getFrame(), m_bins, m_timeRange); 
     1757        JFrame frame = decayGraph.init(uiPanel.getFrame(), _bins, _timeRange); 
    17601758        decayGraph.setTitle(title); 
    17611759        decayGraph.setFittingCursor(fittingCursor); 
     
    18131811                _promptBaseline = promptBaseline; 
    18141812 
    1815                 fitPixel(m_uiPanel, _fittingCursor); 
     1813                fitPixel(_uiPanel, _fittingCursor); 
    18161814            } 
    18171815        } 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/analysis/ISLIMAnalyzer.java

    r7875 r7992  
    4848 * <a href="http://dev.loci.wisc.edu/svn/software/trunk/projects/slim-plugin/src/main/java/loci/slim/analysis/ISLIMAnalyzer.java">SVN</a></dd></dl> 
    4949 * 
    50  * @author Aivar Grislis 
     50 * @author Aivar Grislis grislis at wisc dot edu 
    5151 */ 
    5252public interface ISLIMAnalyzer { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/analysis/SLIMAnalysis.java

    r7875 r7992  
    5757 * <a href="http://dev.loci.wisc.edu/svn/software/trunk/projects/slim-plugin/src/main/java/loci/slim/analysis/SLIMAnalysis.java">SVN</a></dd></dl> 
    5858 * 
    59  * @author Aivar Grislis 
     59 * @author Aivar Grislis grislis at wisc dot edu 
    6060 */ 
    6161public class SLIMAnalysis { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/analysis/SLIMAnalyzer.java

    r7668 r7992  
    5353 * <a href="http://dev.loci.wisc.edu/svn/software/trunk/projects/slim-plugin/src/main/java/loci/slim/analysis/SLIMAnalyzer.java">SVN</a></dd></dl> 
    5454 * 
    55  * @author Aivar Grislis 
     55 * @author Aivar Grislis grislis at wisc dot edu 
    5656 */ 
    5757@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD}) 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/FitInfo.java

    r7970 r7992  
     1// 
     2// FitInfo.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the names of the ImageJDev.org developers nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
     34 
    535package loci.slim.fitting; 
    636 
     
    1444/** 
    1545 * 
    16  * @author aivar 
     46 * @author Aivar Grislis grislis at wisc dot edu 
    1747 */ 
    1848public class FitInfo { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/IDecayImage.java

    r7889 r7992  
     1// 
     2// IDecayImage.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the names of the ImageJDev.org developers nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
     34 
    535package loci.slim.fitting; 
    636 
     
    1343/** 
    1444 * 
    15  * @author Aivar Grislis 
     45 * @author Aivar Grislis grislis at wisc dot edu 
    1646 */ 
    1747public interface IDecayImage<T extends RealType<T>> extends IProcessor { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/IFittedImage.java

    r7889 r7992  
     1// 
     2// IFittedImage.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the names of the ImageJDev.org developers nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
     34 
    535package loci.slim.fitting; 
    636 
    737import mpicbg.imglib.image.Image; 
    838import mpicbg.imglib.type.numeric.real.DoubleType; 
     39 
    940/** 
    1041 * 
    11  * @author Aivar Grislis 
     42 * @author Aivar Grislis grislis at wisc dot edu 
    1243 */ 
    1344public interface IFittedImage { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/callable/FittingEngineCallable.java

    r7936 r7992  
    44 
    55/* 
    6 ImageJ software for multidimensional image processing and analysis. 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
    77 
    8 Copyright (c) 2011, ImageJDev.org. 
     8Copyright (c) 2010, UW-Madison LOCI 
    99All rights reserved. 
    1010 
     
    3535package loci.slim.fitting.callable; 
    3636 
    37 import loci.slim.fitting.cursor.FitterEstimator; 
    3837import loci.slim.fitting.params.FitResults; 
    3938import loci.slim.fitting.params.ILocalFitParams; 
    4039import loci.slim.fitting.params.IGlobalFitParams; 
    4140import loci.slim.fitting.params.IFitResults; 
    42 import loci.slim.heuristics.CursorEstimator; 
    4341 
    4442import loci.curvefitter.CurveFitData; 
    4543import loci.curvefitter.ICurveFitData; 
    4644import loci.curvefitter.ICurveFitter; 
    47 import loci.curvefitter.ICurveFitter.FitAlgorithm; 
    4845 
    4946/** 
     
    5148 * Callable, meant to be called from multiple threads. 
    5249 * 
    53  * @author Aivar Grislis 
     50 * @author Aivar Grislis grislis at wisc dot edu 
    5451 */ 
    5552public class FittingEngineCallable implements IFittingEngineCallable { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/callable/IFittingEngineCallable.java

    r7889 r7992  
    44 
    55/* 
    6 ImageJ software for multidimensional image processing and analysis. 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
    77 
    8 Copyright (c) 2011, ImageJDev.org. 
     8Copyright (c) 2010, UW-Madison LOCI 
    99All rights reserved. 
    1010 
     
    4444/** 
    4545 * 
    46  * @author Aivar Grislis 
     46 * @author Aivar Grislis grislis at wisc dot edu 
    4747 */ 
    4848public interface IFittingEngineCallable extends Callable<IFitResults> { 
    49      
     49 
     50    /** 
     51     * Set up for a fit. 
     52     *  
     53     * @param curveFitter 
     54     * @param params 
     55     * @param data  
     56     */ 
    5057    public void setup(ICurveFitter curveFitter, 
    5158            IGlobalFitParams params, ILocalFitParams data); 
    52      
     59 
     60    /** 
     61     * Do the fit. 
     62     *  
     63     * @return  
     64     */ 
    5365    public IFitResults call(); 
    5466} 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/config/Configuration.java

    r7889 r7992  
    44 
    55/* 
    6 ImageJ software for multidimensional image processing and analysis. 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
    77 
    8 Copyright (c) 2011, ImageJDev.org. 
     8Copyright (c) 2010, UW-Madison LOCI 
    99All rights reserved. 
    1010 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/config/ConfigurationHelper.java

    r7889 r7992  
    44 
    55/* 
    6 ImageJ software for multidimensional image processing and analysis. 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
    77 
    8 Copyright (c) 2011, ImageJDev.org. 
     8Copyright (c) 2010, UW-Madison LOCI 
    99All rights reserved. 
    1010 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/cursor/FitterEstimator.java

    r7977 r7992  
     1// 
     2// FitterEstimator.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the names of the ImageJDev.org developers nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
     34 
    535package loci.slim.fitting.cursor; 
    636 
     
    1141 * with a LMA fit.  It allows for some peculiarities of TRI2. 
    1242 * 
    13  * @author aivar 
     43 * @author Aivar Grislis grislis at wisc dot edu 
    1444 */ 
    1545public class FitterEstimator implements IFitterEstimator { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/cursor/FittingCursor.java

    r7987 r7992  
    44 
    55/* 
    6 ImageJ software for multidimensional image processing and analysis. 
    7  
    8 Copyright (c) 2011, ImageJDev.org. 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
    99All rights reserved. 
    1010 
     
    4949    private static final String DOUBLE_ZERO_STRING = "0.0"; 
    5050    private static final String INTEGER_ZERO_STRING = "0"; 
    51     private double _inc; 
    52     private int _bins; 
    53     private Set<IFittingCursorListener> _listeners; 
     51    private final double _inc; 
     52    private final int _bins; 
     53    private final Set<IFittingCursorListener> _listeners; 
    5454    private boolean _showBins; 
    5555    private volatile boolean _suspend; 
     
    193193     */ 
    194194    public String getPromptDelay() { 
    195         StringBuffer returnValue = new StringBuffer(); 
     195        StringBuilder returnValue = new StringBuilder(); 
    196196        if (_showBins) { 
    197197            if (_hasPrompt) { 
     
    296296     */ 
    297297    public String getPromptWidth() { 
    298         StringBuffer returnValue = new StringBuffer(); 
     298        StringBuilder returnValue = new StringBuilder(); 
    299299        if (_showBins) { 
    300300            if (_hasPrompt) { 
     
    451451     */ 
    452452    public String getTransientStart() { 
    453         StringBuffer returnValue = new StringBuffer(); 
     453        StringBuilder returnValue = new StringBuilder(); 
    454454        if (_showBins) { 
    455455            returnValue.append(getTransientStartBin()); 
     
    531531     */ 
    532532    public String getDataStart() { 
    533         StringBuffer returnValue = new StringBuffer(); 
     533        StringBuilder returnValue = new StringBuilder(); 
    534534        if (_showBins) { 
    535535            returnValue.append(getDataStartBin()); 
     
    612612     */ 
    613613    public String getTransientStop() { 
    614         StringBuffer returnValue = new StringBuffer(); 
     614        StringBuilder returnValue = new StringBuilder(); 
    615615        if (_showBins) { 
    616616            returnValue.append(getTransientStopBin()); 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/cursor/FittingCursorHelper.java

    r7988 r7992  
     1// 
     2// FittingCursorHelper.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the names of the ImageJDev.org developers nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
     34 
    535package loci.slim.fitting.cursor; 
    636 
     
    1040 * keeps the user interface display up to date. 
    1141 *  
    12  * @author Aivar Grislis 
     42 * @author Aivar Grislis grislis at wisc dot edu 
    1343 */ 
    1444public class FittingCursorHelper implements IFittingCursorUI { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/cursor/ICursorEstimator.java

    r7903 r7992  
    44 
    55/* 
    6 ImageJ software for multidimensional image processing and analysis. 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
    77 
    8 Copyright (c) 2011, ImageJDev.org. 
     8Copyright (c) 2010, UW-Madison LOCI 
    99All rights reserved. 
    1010 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/cursor/IFittingCursorListener.java

    r7903 r7992  
    11// 
    2 // ICursor.java 
     2// IFittingCursorListener.java 
    33// 
    44 
    55/* 
    6 ImageJ software for multidimensional image processing and analysis. 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
    77 
    8 Copyright (c) 2011, ImageJDev.org. 
     8Copyright (c) 2010, UW-Madison LOCI 
    99All rights reserved. 
    1010 
     
    3636 
    3737/** 
    38  * 
    39  * @author Aivar Grislis 
     38 * Listener interface for fitting cursor changes. 
     39 *  
     40 * @author Aivar Grislis grislis at wisc dot edu 
    4041 */ 
    4142public interface IFittingCursorListener { 
    42      
     43 
     44    /** 
     45     * Callback when the cursor changes. 
     46     *  
     47     * @param cursor  
     48     */ 
    4349    public void cursorChanged(FittingCursor cursor); 
    4450} 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/cursor/IFittingCursorUI.java

    r7910 r7992  
     1// 
     2// IFittingCursorUI.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the names of the ImageJDev.org developers nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
     34 
    535package loci.slim.fitting.cursor; 
    636 
     
    838 *  This is an interface to get/set transient and prompt cursors as strings. 
    939 *  
    10  * @author aivar 
     40 * @author Aivar Grislis grislis at wisc dot edu 
    1141 */ 
    1242public interface IFittingCursorUI { 
     
    82112    /** 
    83113     * Gets the prompt baseline cursor. 
     114     *  
    84115     * @return  
    85116     */ 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/cursor/LameCursorEstimator.java

    r7904 r7992  
    44 
    55/* 
    6 ImageJ software for multidimensional image processing and analysis. 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
    77 
    8 Copyright (c) 2011, ImageJDev.org. 
     8Copyright (c) 2010, UW-Madison LOCI 
    99All rights reserved. 
    1010 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/engine/IFittingEngine.java

    r7889 r7992  
    44 
    55/* 
    6 ImageJ software for multidimensional image processing and analysis. 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
    77 
    8 Copyright (c) 2011, ImageJDev.org. 
     8Copyright (c) 2010, UW-Madison LOCI 
    99All rights reserved. 
    1010 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/engine/ThreadedFittingEngine.java

    r7889 r7992  
    44 
    55/* 
    6 ImageJ software for multidimensional image processing and analysis. 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
    77 
    8 Copyright (c) 2011, ImageJDev.org. 
     8Copyright (c) 2010, UW-Madison LOCI 
    99All rights reserved. 
    1010 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/params/FitResults.java

    r7889 r7992  
    44 
    55/* 
    6 ImageJ software for multidimensional image processing and analysis. 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
    77 
    8 Copyright (c) 2011, ImageJDev.org. 
     8Copyright (c) 2010, UW-Madison LOCI 
    99All rights reserved. 
    1010 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/params/GlobalFitParams.java

    r7936 r7992  
    44 
    55/* 
    6 ImageJ software for multidimensional image processing and analysis. 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
    77 
    8 Copyright (c) 2011, ImageJDev.org. 
     8Copyright (c) 2010, UW-Madison LOCI 
    99All rights reserved. 
    1010 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/params/IFitResults.java

    r7889 r7992  
    11// 
    2 // ILocalFitResults.java 
     2// FitResults.java 
    33// 
    44 
    55/* 
    6 ImageJ software for multidimensional image processing and analysis. 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
    77 
    8 Copyright (c) 2011, ImageJDev.org. 
     8Copyright (c) 2010, UW-Madison LOCI 
    99All rights reserved. 
    1010 
     
    4141 */ 
    4242public interface IFitResults { 
    43      
     43 
     44    /** 
     45     * Sets fitted chi square result. 
     46     *  
     47     * @param chiSquare  
     48     */ 
    4449    public void setChiSquare(double chiSquare); 
    45      
     50 
     51    /** 
     52     * Gets fitted chi square result. 
     53     *  
     54     * @return  
     55     */ 
    4656    public double getChiSquare(); 
    47      
     57 
     58    /** 
     59     * Sets fitted parameters. 
     60     *  
     61     * @param params  
     62     */ 
    4863    public void setParams(double[] params); 
    49      
     64 
     65    /** 
     66     * Gets fitted parameters. 
     67     *  
     68     * @return  
     69     */ 
    5070    public double[] getParams(); 
    51      
     71 
     72    /** 
     73     * Sets fitted curve. 
     74     *  
     75     * @param yFitted  
     76     */ 
    5277    public void setYFitted(double[] yFitted); 
    53      
     78 
     79    /** 
     80     * Gets fitted curve. 
     81     *  
     82     * @return  
     83     */ 
    5484    public double[] getYFitted(); 
    5585} 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/params/IGlobalFitParams.java

    r7936 r7992  
    44 
    55/* 
    6 ImageJ software for multidimensional image processing and analysis. 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
    77 
    8 Copyright (c) 2011, ImageJDev.org. 
     8Copyright (c) 2010, UW-Madison LOCI 
    99All rights reserved. 
    1010 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/params/ILocalFitParams.java

    r7889 r7992  
    44 
    55/* 
    6 ImageJ software for multidimensional image processing and analysis. 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
    77 
    8 Copyright (c) 2011, ImageJDev.org. 
     8Copyright (c) 2010, UW-Madison LOCI 
    99All rights reserved. 
    1010 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/fitting/params/LocalFitParams.java

    r7889 r7992  
    44 
    55/* 
    6 ImageJ software for multidimensional image processing and analysis. 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
    77 
    8 Copyright (c) 2011, ImageJDev.org. 
     8Copyright (c) 2010, UW-Madison LOCI 
    99All rights reserved. 
    1010 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/heuristics/CursorEstimator.java

    r7989 r7992  
    11// 
    2 // CursorHelper.java 
     2// CursorEstimator.java 
    33// 
    44 
     
    3636 
    3737import loci.curvefitter.CurveFitData; 
    38 import loci.curvefitter.ICurveFitData; 
    39 import loci.curvefitter.ICurveFitter; 
    4038import loci.curvefitter.ICurveFitter.FitAlgorithm; 
    4139import loci.curvefitter.ICurveFitter.NoiseModel; 
    42 import loci.curvefitter.IFitterEstimator; 
    4340import loci.curvefitter.SLIMCurveFitter; 
    4441 
     
    174171    } 
    175172 
     173    /** 
     174     * Provides estimation of prompt and decay cursors. 
     175     *  
     176     * @param xInc 
     177     * @param prompt 
     178     * @param decay 
     179     * @param chiSqTarget 
     180     * @return  
     181     */ 
    176182    public static double[] estimateCursors(double xInc, double[] prompt, 
    177183            double[] decay, double chiSqTarget) { 
     
    406412//        System.out.print("data start " + value[DATA_START]); 
    407413//        System.out.println("end " + value[TRANSIENT_STOP]); 
     414        //TODO ARG patches a bug!: 
    408415        if (value[DATA_START] < value[TRANSIENT_START]) { 
    409416            if (value[DATA_START] < 0.0) { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/heuristics/Estimator.java

    r7889 r7992  
     1// 
     2// Estimator.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the name of the UW-Madison LOCI nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
     34 
    535package loci.slim.heuristics; 
    636 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/heuristics/IEstimator.java

    r7889 r7992  
     1// 
     2// IEstimator.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the name of the UW-Madison LOCI nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
     34 
    535package loci.slim.heuristics; 
    636 
    737/** 
    8  * 
    9  * @author aivar 
     38 * Interface for a class with estimates and rules of thumb. 
     39 *  
     40 * @author Aivar Grislis grislis at wisc dot edu 
    1041 */ 
    1142public interface IEstimator { 
    1243 
     44    /** 
     45     * Get a decay start estimate. 
     46     *  
     47     * @param bins 
     48     * @return  
     49     */ 
     50    int getStart(int bins); 
     51 
     52    /** 
     53     * Get a decay stop estimate. 
     54     *  
     55     * @param bins 
     56     * @return  
     57     */ 
     58    int getStop(int bins); 
     59 
     60    /** 
     61     * Get a default threshold amount. 
     62     *  
     63     * @return  
     64     */ 
     65    int getThreshold(); 
     66 
     67    /** 
     68     * Get a default chi square target. 
     69     *  
     70     * @return  
     71     */ 
    1372    double getChiSquareTarget(); 
    1473 
     74    /** 
     75     * Gets default parameters for given number of components or stretched 
     76     * exponential. 
     77     *  
     78     * @param components 
     79     * @param stretched 
     80     * @return  
     81     */ 
    1582    double[] getParameters(int components, boolean stretched); 
    16  
    17     int getStart(int bins); 
    18  
    19     int getStop(int bins); 
    20  
    21     int getThreshold(); 
    22      
    2383} 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/histogram/ColorBarPanel.java

    r7889 r7992  
    11// 
    2 // ColorBar.java 
     2// ColorBarPanel.java 
    33// 
    44 
     
    4848 * 
    4949 * <dl><dt><b>Source code:</b></dt> 
    50  * <dd><a href="http://dev.loci.wisc.edu/trac/software/browser/trunk/projects/slim-plugin/src/main/java/loci/slim/colorizer/ColorBar.java">Trac</a>, 
    51  * <a href="http://dev.loci.wisc.edu/svn/software/trunk/projects/slim-plugin/src/main/java/loci/slim/colorizer/ColorBar.java">SVN</a></dd></dl> 
     50 * <dd><a href="http://dev.loci.wisc.edu/trac/software/browser/trunk/projects/slim-plugin/src/main/java/loci/slim/histogram/ColorBarPanel.java">Trac</a>, 
     51 * <a href="http://dev.loci.wisc.edu/svn/software/trunk/projects/slim-plugin/src/main/java/loci/slim/histogram/ColorBarPanel.java">SVN</a></dd></dl> 
    5252 * 
    5353 * @author Aivar Grislis grislis at wisc.edu 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/histogram/DoubleFormatter.java

    r7889 r7992  
     1// 
     2// DoubleFormatter.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the name of the UW-Madison LOCI nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
     34 
    535package loci.slim.histogram; 
    636 
     
    1242 * Builds a maximum or minimum value, rounding and formatting appropriately. 
    1343 *  
    14  * @author Aivar Grislis 
     44 * @author Aivar Grislis grislis at wisc dot edu 
    1545 */ 
    1646public class DoubleFormatter { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/histogram/HistogramData.java

    r7889 r7992  
     1// 
     2// HistogramData.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the name of the UW-Madison LOCI nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
     34 
    535package loci.slim.histogram; 
    636 
     
    1242 * available.  Handles optional autoranging. 
    1343 *  
    14  * @author Aivar Grislis 
     44 * @author Aivar Grislis grislis at wisc dot edu 
    1545 */ 
    1646public class HistogramData { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/histogram/HistogramDataChannel.java

    r7889 r7992  
     1// 
     2// HistogramDataChannel.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the name of the UW-Madison LOCI nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
     34 
    535package loci.slim.histogram; 
    636 
     
    939 * has only two dimensions there would be only one of these per HistogramData. 
    1040 * 
    11  * @author Aivar Grislis 
     41 * @author Aivar Grislis grislis at wisc dot edu 
    1242 */ 
    1343public class HistogramDataChannel { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/histogram/HistogramPanel.java

    r7889 r7992  
     1// 
     2// HistogramPanel.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the name of the UW-Madison LOCI nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
     34 
    535package loci.slim.histogram; 
    636 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/histogram/HistogramTool.java

    r7974 r7992  
     1// 
     2// HistogramTool.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the name of the UW-Madison LOCI nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
     34 
    535package loci.slim.histogram; 
    636 
     
    1141import ij.IJ; 
    1242import ij.plugin.LutLoader; 
    13 import ij.process.ByteProcessor; 
    14 import ij.ImagePlus; 
    1543import ij.process.LUT; 
    1644 
    1745import java.awt.Color; 
    18 import java.awt.event.ActionEvent; 
    19 import java.awt.event.ActionListener; 
    20 import java.awt.event.ItemEvent; 
    21 import java.awt.event.ItemListener; 
    2246import java.io.File; 
    2347import java.util.Timer; 
    2448import java.util.TimerTask; 
    2549 
    26 import javax.swing.BoxLayout; 
    27 import javax.swing.JCheckBox; 
    28 import javax.swing.JComponent; 
    2950import javax.swing.JFrame; 
    30 import javax.swing.JLabel; 
    31 import javax.swing.JPanel; 
    32 import javax.swing.JFormattedTextField; 
    33 import javax.swing.JTextField; 
    3451 
    3552 
     
    3855 * of UI components and the logic of updating the histogram. 
    3956 * 
    40  * @author Aivar Grislis 
     57 * @author Aivar Grislis grislis at wisc dot edu 
    4158 */ 
    4259public class HistogramTool { 
     
    5976     */ 
    6077    private HistogramTool() { //TODO ARG how do you pass this in if it is a singleton?  (cf getInstance() below) 
    61         //TODO ARG how is this a singleton if there are two flavors of it? 
    6278        //TODO ARG need to be able to close this window and have it pop back up as needed 
    6379        // boolean hasChannels) { 
     
    7389        _frame = new JFrame("Histogram"); 
    7490        _frame.setResizable(false); 
    75         //_frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); //TODO kind of lame, for now 
    7691        _frame.getContentPane().add(_histogramPanel, BorderLayout.NORTH); 
    7792        _frame.getContentPane().add(_colorBarPanel, BorderLayout.CENTER); 
     
    453468            } 
    454469            //TODO 
    455             System.out.println("HistogramTool.UIPanelListener.setCombineChannels(" + combineChannels + ")"); 
     470            //System.out.println("HistogramTool.UIPanelListener.setCombineChannels(" + combineChannels + ")"); 
    456471        } 
    457472         
     
    466481            } 
    467482            //TODO 
    468             System.out.println("HistogramTool.UIPanelListener.setDisplayChannels(" + displayChannels + ")"); 
     483            //System.out.println("HistogramTool.UIPanelListener.setDisplayChannels(" + displayChannels + ")"); 
    469484        } 
    470485 
     
    500515                changed(minView, maxView, minLUT, maxLUT); 
    501516            } 
    502             System.out.println("new min LUT is " + minLUT + "new max LUT is " + maxLUT);    
     517            //System.out.println("new min LUT is " + minLUT + "new max LUT is " + maxLUT);    
    503518        } 
    504519    } 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/histogram/IHistogramDataListener.java

    r7889 r7992  
     1// 
     2// IHistogramDataListener.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the name of the UW-Madison LOCI nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
    534 
    635package loci.slim.histogram; 
     
    938 * Interface for a listener to catch changes in the data. 
    1039 * 
    11  * @author aivar 
     40 * @author Aivar Grislis grislis at wisc dot edu 
    1241 */ 
    1342public interface IHistogramDataListener { 
     43     
     44    /** 
     45     * Called when the minimum or maximum changes. 
     46     *  
     47     * @param minView 
     48     * @param maxView 
     49     * @param minLUT 
     50     * @param maxLUT  
     51     */ 
    1452    public void minMaxChanged(double minView, double maxView, 
    1553            double minLUT, double maxLUT); 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/histogram/IHistogramPanelListener.java

    r7889 r7992  
     1// 
     2// IHistogramPanelListener.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the name of the UW-Madison LOCI nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
    534 
    635package loci.slim.histogram; 
     
    1039 * histogram panel. 
    1140 *  
    12  * @author Aivar Grislis 
     41 * @author Aivar Grislis grislis at wisc dot edu 
    1342 */ 
    1443public interface IHistogramPanelListener { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/histogram/IUIPanelListener.java

    r7962 r7992  
     1// 
     2// IUIPanelListener.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the name of the UW-Madison LOCI nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
    534 
    635package loci.slim.histogram; 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/histogram/PaletteFix.java

    r7889 r7992  
     1// 
     2// PaletteFix.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the name of the UW-Madison LOCI nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
    534 
    635package loci.slim.histogram; 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/histogram/UIPanel.java

    r7979 r7992  
     1// 
     2// UIPanel.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the name of the UW-Madison LOCI nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
     34 
    535package loci.slim.histogram; 
    636 
     
    939import java.awt.event.FocusAdapter; 
    1040import java.awt.event.FocusEvent; 
    11 import java.awt.event.FocusListener; 
    1241import java.awt.event.ItemEvent; 
    1342import java.awt.event.ItemListener; 
     
    72101        _minTextField.addActionListener( 
    73102            new ActionListener() { 
     103                @Override 
    74104                public void actionPerformed(ActionEvent event) { 
    75105                    updateMin(); 
     
    77107            } 
    78108        ); 
    79         _minTextField.addFocusListener(new FocusAdapter() { 
    80             public void focusLost(FocusEvent e) { 
    81                 updateMin(); 
    82             } 
    83         }); 
     109        _minTextField.addFocusListener( 
     110            new FocusAdapter() { 
     111                @Override 
     112                public void focusLost(FocusEvent e) { 
     113                    updateMin(); 
     114                } 
     115            } 
     116        ); 
    84117        readOutPanel.add(_minTextField); 
    85118 
     
    87120        _maxTextField.addActionListener( 
    88121            new ActionListener() { 
     122                @Override 
    89123                public void actionPerformed(ActionEvent event) { 
    90124                    updateMax(); 
     
    92126            } 
    93127        ); 
    94         _maxTextField.addFocusListener(new FocusAdapter() { 
    95             public void focusLost(FocusEvent e) { 
    96                 updateMax(); 
    97             } 
    98         }); 
     128        _maxTextField.addFocusListener( 
     129            new FocusAdapter() { 
     130                @Override 
     131                public void focusLost(FocusEvent e) { 
     132                    updateMax(); 
     133                } 
     134            } 
     135        ); 
    99136        readOutPanel.add(_maxTextField); 
    100137        add(readOutPanel); 
     
    103140        _autoRangeCheckBox.addItemListener( 
    104141            new ItemListener() { 
     142                @Override 
    105143                public void itemStateChanged(ItemEvent e) { 
    106144                    _autoRange = _autoRangeCheckBox.isSelected(); 
     
    117155        _excludePixelsCheckBox.addItemListener( 
    118156            new ItemListener() { 
     157                @Override 
    119158                public void itemStateChanged(ItemEvent e) { 
    120159                    _excludePixels = _excludePixelsCheckBox.isSelected(); 
     
    131170        _combineChannelsCheckBox.addItemListener( 
    132171            new ItemListener() { 
     172                @Override 
    133173                public void itemStateChanged(ItemEvent e) { 
    134174                    _combineChannels = _combineChannelsCheckBox.isSelected(); 
     
    158198        _displayChannelsCheckBox.addItemListener( 
    159199            new ItemListener() { 
     200                @Override 
    160201                public void itemStateChanged(ItemEvent e) { 
    161202                    _displayChannels = _displayChannelsCheckBox.isSelected(); 
     
    214255    } 
    215256 
     257    /** 
     258     * Sets whether to automatically set the LUT range. 
     259     *  
     260     * @param autoRange  
     261     */ 
    216262    public void setAutoRange(boolean autoRange) { 
    217263        _autoRange = autoRange; 
     
    219265        enableUI(autoRange); 
    220266    } 
    221      
     267 
     268    /** 
     269     * Sets whether to combine all channels. 
     270     *  
     271     * For IJ1 this doesn't change anything. 
     272     *  
     273     * @param combineChannels  
     274     */ 
    222275    public void setCombineChannels(boolean combineChannels) { 
    223276        _combineChannels = combineChannels; 
    224277        _combineChannelsCheckBox.setSelected(combineChannels); 
    225278    } 
    226      
     279 
     280    /** 
     281     * Sets whether to display all channels. 
     282     *  
     283     * @param displayChannels  
     284     */ 
    227285    public void setDisplayChannels(boolean displayChannels) { 
    228286        _displayChannels = displayChannels; 
    229287        _displayChannelsCheckBox.setSelected(displayChannels); 
    230288    } 
    231      
     289 
     290    /** 
     291     * Enables or disables the checkbox UI. 
     292     *  
     293     * @param enable  
     294     */ 
    232295    public void enableChannels(boolean enable) { 
    233296        _combineChannelsCheckBox.setEnabled(enable); 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/mask/IMaskGroup.java

    r7961 r7992  
     1// 
     2// IMaskGroup.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the names of the ImageJDev.org developers nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
    534 
    635package loci.slim.mask; 
    736 
    837/** 
    9  * 
    10  * @author aivar 
     38 * This is an interface for a group of associated mask nodes. 
     39 *  
     40 * @author Aivar Grislis grislis at wisc dot edu 
    1141 */ 
    1242public interface IMaskGroup { 
    13      
     43 
     44    /** 
     45     * Adds a mask node to group. 
     46     *  
     47     * @param node  
     48     */ 
    1449    public void addNode(MaskNode node); 
    1550 
     51    /** 
     52     * Removes a mask node from group. 
     53     *  
     54     * @param node  
     55     */ 
    1656    public void removeNode(MaskNode node); 
    1757 
     58    /** 
     59     * Updates the mask, notifies group. 
     60     *  
     61     * @param node originating node 
     62     * @param mask updated mask 
     63     */ 
    1864    public void updateMask(IMaskNode node, Mask mask); 
    1965} 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/mask/IMaskNode.java

    r7961 r7992  
     1// 
     2// IMaskNode.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the names of the ImageJDev.org developers nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
    534 
    635package loci.slim.mask; 
    736 
    837/** 
    9  * 
    10  * @author aivar 
     38 * Interface for a mask node. 
     39 *  
     40 * @author Aivar Grislis grislis at wisc dot edu 
    1141 */ 
    1242public interface IMaskNode { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/mask/IMaskNodeListener.java

    r7975 r7992  
     1// 
     2// IMaskNodeListener.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the names of the ImageJDev.org developers nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
    534 
    635package loci.slim.mask; 
    736 
    837/** 
    9  * 
    10  * @author aivar 
     38 * Interface to a listener for a mask node. 
     39 *  
     40 * @author Aivar Grislis grislis at wisc dot edu 
    1141 */ 
    1242public interface IMaskNodeListener { 
    1343 
     44    /** 
     45     * Tells listener mask has been updated. 
     46     *  
     47     * @param mask  
     48     */ 
    1449    public void updateMask(Mask mask); 
    1550     
  • trunk/projects/slim-plugin/src/main/java/loci/slim/mask/Mask.java

    r7961 r7992  
     1// 
     2// Mask.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the names of the ImageJDev.org developers nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
    534 
    635package loci.slim.mask; 
     
    2655        _bits = new boolean[width][height]; 
    2756    } 
    28      
     57 
     58    /** 
     59     * Gets the boolean switches. 
     60     *  
     61     * @return  
     62     */ 
    2963    public boolean[][] getBits() { 
    3064        return _bits; 
    3165    } 
    32      
     66 
     67    /** 
     68     * Sets the boolean switches. 
     69     *  
     70     * @param bits  
     71     */ 
    3372    public void setBits(boolean[][] bits) { 
    3473        _bits = bits; 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/mask/MaskGroup.java

    r7961 r7992  
     1// 
     2// MaskGroup.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the names of the ImageJDev.org developers nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
    534 
    635package loci.slim.mask; 
     
    1241 
    1342/** 
    14  * 
    15  * @author Aivar Grislis 
     43 * Mask group class associates a set of mask nodes. 
     44 *  
     45 * @author Aivar Grislis grislis at wisc dot edu 
    1646 */ 
    1747public class MaskGroup implements IMaskGroup { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/mask/MaskNode.java

    r7974 r7992  
     1// 
     2// MaskNode.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the names of the ImageJDev.org developers nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
    534 
    635package loci.slim.mask; 
    736 
    837/** 
    9  * 
    10  * @author Aivar Grislis 
     38 * Mask node class. 
     39 *  
     40 * @author Aivar Grislis grislis at wisc dot edu 
    1141 */ 
    1242public class MaskNode implements IMaskNode { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/process/Bin3x3.java

    r7990 r7992  
     1// 
     2// Bin3x3.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the names of the ImageJDev.org developers nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
     34 
    535package loci.slim.process; 
    636 
     
    939 * 
    1040 * <dl><dt><b>Source code:</b></dt> 
    11  * <dd><a href="http://dev.loci.wisc.edu/trac/software/browser/trunk/projects/slim-plugin/src/main/java/loci/slim/binning/plugins/Bin3x3.java">Trac</a>, 
    12  * <a href="http://dev.loci.wisc.edu/svn/software/trunk/projects/slim-plugin/src/main/java/loci/slim/binning/plugins/Bin3x3.java">SVN</a></dd></dl> 
     41 * <dd><a href="http://dev.loci.wisc.edu/trac/software/browser/trunk/projects/slim-plugin/src/main/java/loci/slim/process/Bin3x3.java">Trac</a>, 
     42 * <a href="http://dev.loci.wisc.edu/svn/software/trunk/projects/slim-plugin/src/main/java/loci/slim/process/Bin3x3.java">SVN</a></dd></dl> 
    1343 * 
    1444 * @author Aivar Grislis 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/process/Bin5x5.java

    r7990 r7992  
     1// 
     2// Bin5x5.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the names of the ImageJDev.org developers nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
     34 
    535package loci.slim.process; 
    636 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/process/Bin7x7.java

    r7990 r7992  
     1// 
     2// Bin7x7.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the names of the ImageJDev.org developers nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
     34 
    535package loci.slim.process; 
    636 
     
    939 * 
    1040 * <dl><dt><b>Source code:</b></dt> 
    11  * <dd><a href="http://dev.loci.wisc.edu/trac/software/browser/trunk/projects/slim-plugin/src/main/java/loci/slim/binning/plugins/Bin3x3.java">Trac</a>, 
    12  * <a href="http://dev.loci.wisc.edu/svn/software/trunk/projects/slim-plugin/src/main/java/loci/slim/binning/plugins/Bin3x3.java">SVN</a></dd></dl> 
     41 * <dd><a href="http://dev.loci.wisc.edu/trac/software/browser/trunk/projects/slim-plugin/src/main/java/loci/slim/process/Bin3x3.java">Trac</a>, 
     42 * <a href="http://dev.loci.wisc.edu/svn/software/trunk/projects/slim-plugin/src/main/java/loci/slim/process/Bin3x3.java">SVN</a></dd></dl> 
    1343 * 
    14  * @author Aivar Grislis 
     44 * @author Aivar Grislis grislis at wisc dot edu 
    1545 */ 
    1646@SLIMBinner("7 x 7") 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/process/IProcessor.java

    r7889 r7992  
     1// 
     2// IProcessor.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the names of the ImageJDev.org developers nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
     34 
    535package loci.slim.process; 
    636 
    737/** 
     38 * Interface for an input processor. 
    839 * 
    9  * @author aivar 
     40 * @author Aivar Grislis grislis at wisc dot edu 
    1041 */ 
    1142public interface IProcessor { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/process/ISLIMBinner.java

    r7990 r7992  
     1// 
     2// ISLIMBinner.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6ImageJ software for multidimensional image processing and analysis. 
     7 
     8Copyright (c) 2011, ImageJDev.org. 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the names of the ImageJDev.org developers nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
     34 
    535package loci.slim.process; 
    636 
    737/** 
    8  * 
    9  * @author aivar 
     38 * Interface for an input processor that does binning. 
     39 *  
     40 * @author Aivar Grislis grislis at wisc dot edu 
    1041 */ 
    1142public interface ISLIMBinner extends IProcessor { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/process/SLIMBinner.java

    r7990 r7992  
    4343 
    4444/** 
    45  * Used to name ISLIMBinner implementations.  These names appear 
     45 * Annotation used to name ISLIMBinner implementations.  These names appear 
    4646 * in the dropdown list in the UI. 
    4747 * 
     
    5050 * 
    5151 * <dl><dt><b>Source code:</b></dt> 
    52  * <dd><a href="http://dev.loci.wisc.edu/trac/software/browser/trunk/projects/slim-plugin/src/main/java/loci/slim/binning/SLIMBinner.java">Trac</a>, 
    53  * <a href="http://dev.loci.wisc.edu/svn/software/trunk/projects/slim-plugin/src/main/java/loci/slim/binning/SLIMBinner.java">SVN</a></dd></dl> 
     52 * <dd><a href="http://dev.loci.wisc.edu/trac/software/browser/trunk/projects/slim-plugin/src/main/java/loci/slim/process/SLIMBinner.java">Trac</a>, 
     53 * <a href="http://dev.loci.wisc.edu/svn/software/trunk/projects/slim-plugin/src/main/java/loci/slim/process/SLIMBinner.java">SVN</a></dd></dl> 
    5454 * 
    55  * @author Aivar Grislis 
     55 * @author Aivar Grislis grislis at wisc dot edu 
    5656 */ 
    5757@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD}) 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/process/SLIMBinning.java

    r7990 r7992  
    4040import java.util.List; 
    4141 
    42 import mpicbg.imglib.image.Image; 
    43 import mpicbg.imglib.type.numeric.RealType; 
    44  
    4542import net.java.sezpoz.Index; 
    4643import net.java.sezpoz.IndexItem; 
     
    5047 * 
    5148 * <dl><dt><b>Source code:</b></dt> 
    52  * <dd><a href="http://dev.loci.wisc.edu/trac/software/browser/trunk/projects/slim-plugin/src/main/java/loci/slim/binning/SLIMBinning.java">Trac</a>, 
    53  * <a href="http://dev.loci.wisc.edu/svn/software/trunk/projects/slim-plugin/src/main/java/loci/slim/binning/SLIMBinning.java">SVN</a></dd></dl> 
     49 * <dd><a href="http://dev.loci.wisc.edu/trac/software/browser/trunk/projects/slim-plugin/src/main/java/loci/slim/process/SLIMBinning.java">Trac</a>, 
     50 * <a href="http://dev.loci.wisc.edu/svn/software/trunk/projects/slim-plugin/src/main/java/loci/slim/process/SLIMBinning.java">SVN</a></dd></dl> 
    5451 * 
    55  * @author Aivar Grislis 
     52 * @author Aivar Grislis grislis at wisc dot edu 
    5653 */ 
    5754public class SLIMBinning { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/process/SquareBinner.java

    r7990 r7992  
     1// 
     2// SquareBinner.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the name of the UW-Madison LOCI nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
     34 
    535package loci.slim.process; 
    636 
     
    838 * This class bins the image. 
    939 *  
    10  * @author aivar 
     40 * @author Aivar Grislis grislis at wisc dot edu 
    1141 */ 
    1242public class SquareBinner implements IProcessor { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/process/Threshold.java

    r7889 r7992  
     1// 
     2// Threshold.java 
     3// 
     4 
    15/* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     6SLIMPlugin for combined spectral-lifetime image analysis. 
     7 
     8Copyright (c) 2010, UW-Madison LOCI 
     9All rights reserved. 
     10 
     11Redistribution and use in source and binary forms, with or without 
     12modification, are permitted provided that the following conditions are met: 
     13    * Redistributions of source code must retain the above copyright 
     14      notice, this list of conditions and the following disclaimer. 
     15    * Redistributions in binary form must reproduce the above copyright 
     16      notice, this list of conditions and the following disclaimer in the 
     17      documentation and/or other materials provided with the distribution. 
     18    * Neither the name of the UW-Madison LOCI nor the 
     19      names of its contributors may be used to endorse or promote products 
     20      derived from this software without specific prior written permission. 
     21 
     22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
     25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 
     26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
     27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
     28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
     29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
     30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
     31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     32POSSIBILITY OF SUCH DAMAGE. 
     33*/ 
     34 
    535package loci.slim.process; 
    636 
     
    838 * This class thresholds the image to a given photon count. 
    939 *  
    10  * @author aivar 
     40 * @author Aivar Grislis grislis at wisc dot edu 
    1141 */ 
    1242public class Threshold implements IProcessor { 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/ui/DecayGraph.java

    r7978 r7992  
     1// 
     2// DecayGraph.java 
     3// 
     4 
     5 
    16/* 
    27Combined spectral-lifetime image analysis plugin. 
     
    6873 * It also has a user interface to set the start and stop of the fit. 
    6974 * 
    70  * @author Aivar Grislis 
     75 * @author Aivar Grislis grislis at wisc dot edu 
    7176 */ 
    7277public class DecayGraph implements IDecayGraph, IStartStopProportionListener { 
     
    277282 
    278283        // create empty chart data sets 
    279         _decayDataset = new XYSeriesCollection();; 
    280         _residualDataset = new XYSeriesCollection();; 
     284        _decayDataset = new XYSeriesCollection(); 
     285        _residualDataset = new XYSeriesCollection(); 
    281286 
    282287        // make a common horizontal axis for both sub-plots 
     
    518523         * @param layer 
    519524         */ 
     525        @Override 
    520526        protected void processMouseMotionEvent 
    521527                (MouseEvent event, JXLayer<? extends V> layer) 
     
    541547                            else { 
    542548                                _dataStartMarkerProportion = _transStopMarkerProportion; 
    543                             }; 
     549                            } 
    544550                        } 
    545551                        else { 
     
    593599         * @param l 
    594600         */ 
     601        @Override 
    595602        protected void processMouseEvent(MouseEvent e, JXLayer<? extends V> l) { 
    596603            super.processMouseEvent(e, l); 
     
    662669                    SwingUtilities.invokeLater( 
    663670                            new Runnable() { 
     671                                @Override 
    664672                                public void run() { 
    665673                                    if (null != _listener) { 
     
    700708     
    701709    private class FittingCursorListener implements IFittingCursorListener { 
     710        @Override 
    702711        public void cursorChanged(FittingCursor cursor) { 
    703712            double transStart = cursor.getTransientStartValue(); 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/ui/ExcitationGraph.java

    r7986 r7992  
    4040import java.awt.Graphics2D; 
    4141import java.awt.event.MouseEvent; 
    42 import java.awt.geom.Ellipse2D; 
    4342import java.awt.geom.Rectangle2D; 
    4443 
    4544import javax.swing.JComponent; 
    46 import javax.swing.JFrame; 
    47 import javax.swing.JPanel; 
    4845import javax.swing.SwingUtilities; 
    4946 
     
    5552import org.jfree.chart.axis.LogarithmicAxis; 
    5653import org.jfree.chart.axis.NumberAxis; 
    57 import org.jfree.chart.plot.CombinedDomainXYPlot; 
    5854import org.jfree.chart.plot.XYPlot; 
    5955import org.jfree.chart.renderer.xy.XYSplineRenderer; 
     
    6662 
    6763/** 
    68  * TODO 
     64 * Graph that displays the excitation or prompt. 
    6965 * 
    7066 * <dl><dt><b>Source code:</b></dt> 
     
    7268 * <a href="http://dev.loci.wisc.edu/svn/software/trunk/projects/slim-plugin/src/main/java/loci/slim/ui/ExcitationGraph.java">SVN</a></dd></dl> 
    7369 * 
    74  * @author Aivar Grislis 
     70 * @author Aivar Grislis grislis at wisc dot edu 
    7571 */ 
    7672public class ExcitationGraph implements IStartStopBaseProportionListener { 
     
    144140        _layer.setUI(_startStopBaseDraggingUI); 
    145141 
    146      System.out.println("ExcitationGraph start " + start + " stop " + stop + " base " + base); 
     142     //System.out.println("ExcitationGraph start " + start + " stop " + stop + " base " + base); 
    147143        // initialize the vertical bars that show start and stop time bins and 
    148144        // the horizontal bar with the base count. 
     
    158154        return _layer; 
    159155    } 
    160      
     156 
     157    /** 
     158     * Sets the fitting cursor. 
     159     *  
     160     * @param fittingCursor  
     161     */ 
    161162    public void setFittingCursor(FittingCursor fittingCursor) { 
    162163        if (null == _fittingCursor) { 
     
    377378         * @param l 
    378379         */ 
     380        @Override 
    379381        protected void processMouseMotionEvent(MouseEvent e, JXLayer<? extends V> l) { 
    380382            super.processMouseMotionEvent(e, l); 
     
    507509                    SwingUtilities.invokeLater( 
    508510                            new Runnable() { 
     511                                @Override 
    509512                                public void run() { 
    510513                                    _listener.setStartStopBaseProportion( 
     
    553556     
    554557    private class FittingCursorListener implements IFittingCursorListener { 
     558        @Override 
    555559        public void cursorChanged(FittingCursor cursor) { 
    556560            double promptStart    = cursor.getPromptStartValue(); 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/ui/ExcitationPanel.java

    r7936 r7992  
    3636 
    3737import java.awt.BorderLayout; 
    38 import java.awt.CardLayout; 
    39 import java.awt.Dimension; 
    40 import java.awt.event.ActionEvent; 
    41 import java.awt.event.ActionListener; 
    42 import java.awt.event.ComponentAdapter; 
    43 import java.awt.event.ComponentEvent; 
    44 import java.awt.event.ItemEvent; 
    45 import java.awt.event.ItemListener; 
    4638 
    47 import javax.swing.border.Border; 
    48 import javax.swing.BorderFactory; 
    49 import javax.swing.Box; 
    50 import javax.swing.BoxLayout; 
    51 import javax.swing.JButton; 
    52 import javax.swing.JCheckBox; 
    53 import javax.swing.JComboBox; 
    5439import javax.swing.JFrame; 
    5540import javax.swing.JLabel; 
    5641import javax.swing.JPanel; 
    57 import javax.swing.JTextField; 
    58 import javax.swing.SpringLayout; 
    59 import javax.swing.SwingConstants; 
    60 import javax.swing.border.EmptyBorder; 
    6142 
    6243import loci.slim.Excitation; 
     
    6445 
    6546/** 
    66  * TODO 
     47 * Panel that holds the excitation graph. 
    6748 * 
    6849 * <dl><dt><b>Source code:</b></dt> 
     
    7051 * <a href="http://dev.loci.wisc.edu/svn/software/trunk/projects/slim-plugin/src/main/java/loci/slim/ui/ExcitationPanel.java">SVN</a></dd></dl> 
    7152 * 
    72  * @author Aivar Grislis 
     53 * @author Aivar Grislis grislis at wisc dot edu 
    7354 */ 
    7455public class ExcitationPanel extends JFrame { 
     56    private static final String TITLE = "Instrument Response Function"; 
    7557    private Excitation _excitation; 
    7658    private int _bins; 
     
    8163        _excitation = excitation; 
    8264 
    83         this.setTitle("Instrument Response Function"); 
     65        this.setTitle(TITLE); 
    8466         
    8567        double start = fittingCursor.getPromptStartValue(); 
Note: See TracChangeset for help on using the changeset viewer.