Ignore:
Timestamp:
01/27/12 19:47:49 (8 years ago)
Author:
aivar
Message:

Continued refactoring. Fitted image working better now.

Location:
trunk/projects/slim-plugin/src/main/java/loci/slim/analysis
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/projects/slim-plugin/src/main/java/loci/slim/analysis/ISLIMAnalyzer.java

    r7864 r7875  
    3535package loci.slim.analysis; 
    3636 
    37 import imagej.slim.fitting.FitInfo.FitFunction; 
    38 import imagej.slim.fitting.FitInfo.FitRegion; 
     37import loci.curvefitter.ICurveFitter.FitFunction; 
     38import loci.curvefitter.ICurveFitter.FitRegion; 
    3939 
    4040import mpicbg.imglib.image.Image; 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/analysis/SLIMAnalysis.java

    r7864 r7875  
    4141import java.util.List; 
    4242 
    43 import imagej.slim.fitting.FitInfo.FitFunction; 
    44 import imagej.slim.fitting.FitInfo.FitRegion; 
     43import loci.curvefitter.ICurveFitter.FitFunction; 
     44import loci.curvefitter.ICurveFitter.FitRegion; 
    4545 
    4646import mpicbg.imglib.image.Image; 
     
    5151 
    5252/** 
    53  * TODO 
     53 * This class runs post-fit analysis on the fitted image. 
    5454 * 
    5555 * <dl><dt><b>Source code:</b></dt> 
     
    6060 */ 
    6161public class SLIMAnalysis { 
    62     IndexItem<SLIMAnalyzer, ISLIMAnalyzer> m_plugins[]; 
    63     String m_names[]; 
     62    IndexItem<SLIMAnalyzer, ISLIMAnalyzer> _plugins[]; 
     63    String _names[]; 
    6464 
     65    /** 
     66     * Constructor, gets list of potential analysis plugins. 
     67     *  
     68     */ 
    6569    public SLIMAnalysis() { 
    6670        // get list of plugins and their names 
     
    7478            names.add(item.annotation().name()); 
    7579        } 
    76         m_plugins = plugins.toArray(new IndexItem[0]); 
    77         m_names = names.toArray(new String[0]); 
     80        _plugins = plugins.toArray(new IndexItem[0]); 
     81        _names = names.toArray(new String[0]); 
    7882    } 
    7983 
     84    /** 
     85     * Returns list of potential analysis plugin names. 
     86     *  
     87     * @return  
     88     */ 
    8089    public String[] getChoices() { 
    81         return m_names; 
     90        return _names; 
    8291    } 
    8392 
     93    /** 
     94     * Does image analysis. 
     95     *  
     96     * @param name 
     97     * @param image 
     98     * @param region 
     99     * @param function  
     100     */ 
    84101    public void doAnalysis(String name, Image<DoubleType> image, FitRegion region, FitFunction function) { 
     102         
     103        // find selected plugin 
    85104        IndexItem<SLIMAnalyzer, ISLIMAnalyzer> selectedPlugin = null; 
    86         for (int i = 0; i < m_names.length; ++i) { 
    87             if (name.equals(m_names[i])) { 
    88                 selectedPlugin = m_plugins[i]; 
     105        for (int i = 0; i < _names.length; ++i) { 
     106            if (name.equals(_names[i])) { 
     107                selectedPlugin = _plugins[i]; 
    89108            } 
    90109        } 
     
    105124            } 
    106125        } 
    107         else { 
    108             // default behavior 
    109             System.out.println("Default behavior"); 
    110         } 
    111126    } 
    112127} 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/analysis/plugins/Display.java

    r7864 r7875  
    5252import loci.slim.colorizer.FiveColorColorize; 
    5353import loci.slim.colorizer.IColorize; 
    54 import imagej.slim.fitting.FitInfo.FitFunction; 
    55 import imagej.slim.fitting.FitInfo.FitRegion; 
     54import loci.curvefitter.ICurveFitter.FitFunction; 
     55import loci.curvefitter.ICurveFitter.FitRegion; 
    5656 
    5757import mpicbg.imglib.cursor.LocalizableByDimCursor; 
     
    223223        // look at image dimensions 
    224224        int dimensions[] = image.getDimensions(); 
     225        if (4 != dimensions.length) { 
     226            System.out.println("Display.analyze can't handle " + dimensions.length + "-dimensional image."); 
     227            return; 
     228        } 
    225229        int width    = dimensions[X_INDEX]; 
    226230        int height   = dimensions[Y_INDEX]; 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/analysis/plugins/ExportToText.java

    r7864 r7875  
    4949import loci.slim.analysis.ISLIMAnalyzer; 
    5050import loci.slim.analysis.SLIMAnalyzer; 
    51 import imagej.slim.fitting.FitInfo.FitFunction; 
    52 import imagej.slim.fitting.FitInfo.FitRegion; 
     51import loci.curvefitter.ICurveFitter.FitFunction; 
     52import loci.curvefitter.ICurveFitter.FitRegion; 
    5353 
    5454import mpicbg.imglib.cursor.LocalizableByDimCursor; 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/analysis/plugins/VisADAnalysisPlugin.java

    r7864 r7875  
    3838import ij.ImagePlus; 
    3939 
    40 import imagej.slim.fitting.FitInfo.FitFunction; 
    41 import imagej.slim.fitting.FitInfo.FitRegion; 
     40import loci.curvefitter.ICurveFitter.FitFunction; 
     41import loci.curvefitter.ICurveFitter.FitRegion; 
    4242import loci.slim.analysis.ISLIMAnalyzer; 
    4343import loci.slim.analysis.SLIMAnalyzer; 
Note: See TracChangeset for help on using the changeset viewer.