Ignore:
Timestamp:
12/13/11 00:58:58 (8 years ago)
Author:
aivar
Message:

Shows fitted images. Needs work & buggy.

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

Legend:

Unmodified
Added
Removed
  • trunk/projects/slim-plugin/src/main/java/imagej/slim/fitting/AbstractBaseFittedImage.java

    r7830 r7832  
    66package imagej.slim.fitting; 
    77 
    8 import ij.process.MyFloatProcessor; //TODO IJ hack; update to IJ2 ImgLib 
     8//import ij.process.MyFloatProcessor; //TODO IJ hack; update to IJ2 ImgLib 
    99import ij.ImagePlus; 
     10import ij.process.FloatProcessor; 
    1011 
    1112import imagej.slim.histogram.HistogramData; 
     
    2021    private double _values[][]; 
    2122    private HistogramData _histogramData; 
    22     private MyFloatProcessor _image; 
     23    private FloatProcessor _image; 
    2324    private ImagePlus _imagePlus; 
    2425     
     
    2829        int y = dimension[1]; 
    2930        _values = new double[x][y]; 
     31        //TODO need to handle multiple channels: 
     32        // _values c/b slice being drawn only; refer to Image for other slices 
    3033        HistogramDataChannel histogramDataChannel = new HistogramDataChannel(_values); 
    3134        HistogramDataChannel[] histogramDataChannels = new HistogramDataChannel[] { histogramDataChannel }; 
    3235        _histogramData = new HistogramData(title, histogramDataChannels); 
    33         _image = new MyFloatProcessor(x, y); 
     36        _image = new FloatProcessor(x, y); 
    3437        _imagePlus = new ImagePlus(title, _image); 
    3538        _imagePlus.show(); 
     
    8083     */ 
    8184    public void recalcHistogram() { 
    82         double[] minMax = _histogramData.getMinMax(); //TODO how about HistogramData.recalculate? 
     85        _histogramData.setAuto(true); //TODO KLUDGE!!! NOT HERE!!! WHERE DOES AUTO GET SET? 
     86        double[] minMax = _histogramData.getMinMax(); 
     87 
     88        if (null != minMax) { 
     89            // update palette bounds 
     90            _image.setMinAndMax(minMax[0], minMax[1]); 
     91        } 
    8392//        System.out.println("min max " + minMax[0] + " " + minMax[1]); 
    8493        // etc. 
  • trunk/projects/slim-plugin/src/main/java/imagej/slim/fitting/FittedImage.java

    r7829 r7832  
    66 
    77/** 
     8 * Simple image that just displays one of the input parameters. 
    89 * 
    9  * @author aivar 
     10 * @author Aivar Grislis 
    1011 */ 
    1112public class FittedImage extends AbstractBaseFittedImage { 
    1213    private int _parameterIndex; 
    13      
     14 
     15    /** 
     16     * Constructor, giving index of input parameter to display 
     17     * 
     18     * @param title 
     19     * @param dimension 
     20     * @param parameterIndex 
     21     */ 
    1422    public FittedImage(String title, int[] dimension, int parameterIndex) { 
    1523        super(title, dimension); 
  • trunk/projects/slim-plugin/src/main/java/imagej/slim/fitting/FractionalContributionImage.java

    r7829 r7832  
    88 * This class builds a fitted image that shows the fractional contribution. 
    99 *  
    10  * Fractional Intensity fi = Ai*Ti / sum of all Aj*Tj. 
     10 * Fractional Contribution fi = Ai*Ti / sum of all Aj*Tj. 
    1111 * 
    1212 * @author Aivar Grislis 
  • trunk/projects/slim-plugin/src/main/java/imagej/slim/fitting/config/Configuration.java

    r7811 r7832  
    4848 * Handles configuration specific to the SLIM Plugin. 
    4949 *  
    50  * A singleton so only one configuration per SLIM Plugin. 
     50 * A singleton so only one configuration for the SLIMPlugin.//TODO 
    5151 *  
    5252 * @author Aivar Grislis 
  • trunk/projects/slim-plugin/src/main/java/imagej/slim/histogram/HistogramTool.java

    r7828 r7832  
    3434 */ 
    3535public class HistogramTool { 
    36     private final static String HARDCODED_LUT =  "/Applications/ImageJ/luts/smart.lut"; //aivar6.lut"; // aivar6 is my five color blue/cyan/green/yellow/red spectral palette 
     36    private final static String HARDCODED_LUT =  "/Applications/ImageJ/luts/aivar6.lut"; // aivar6 is my five color blue/cyan/green/yellow/red spectral palette 
    3737    JFrame _frame; 
    3838    HistogramPanel _histogram; 
Note: See TracChangeset for help on using the changeset viewer.