Ignore:
Timestamp:
12/12/11 18:18:57 (8 years ago)
Author:
aivar
Message:

Can now display selection of fitted images; buggy.

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

Legend:

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

    r7829 r7830  
    77 
    88import ij.process.MyFloatProcessor; //TODO IJ hack; update to IJ2 ImgLib 
     9import ij.ImagePlus; 
    910 
    1011import imagej.slim.histogram.HistogramData; 
     
    2021    private HistogramData _histogramData; 
    2122    private MyFloatProcessor _image; 
     23    private ImagePlus _imagePlus; 
    2224     
    2325    public AbstractBaseFittedImage(String title, int[] dimension) { 
     
    3032        _histogramData = new HistogramData(title, histogramDataChannels); 
    3133        _image = new MyFloatProcessor(x, y); 
     34        _imagePlus = new ImagePlus(title, _image); 
     35        _imagePlus.show(); 
    3236    } 
    3337 
     
    6165     */ 
    6266    public void endFit() { 
    63  
     67    } 
     68     
     69    /** 
     70     * Cancels a fit. 
     71     */ 
     72    public void cancelFit() { 
     73       _imagePlus.close(); 
     74       _imagePlus.hide(); 
    6475    } 
    6576 
     
    6980     */ 
    7081    public void recalcHistogram() { 
    71         _histogramData.getMinMax(); //TODO how about HistogramData.recalculate? 
     82        double[] minMax = _histogramData.getMinMax(); //TODO how about HistogramData.recalculate? 
     83//        System.out.println("min max " + minMax[0] + " " + minMax[1]); 
    7284        // etc. 
     85        _imagePlus.setProcessor(_image.duplicate()); 
    7386    } 
    7487     
  • trunk/projects/slim-plugin/src/main/java/imagej/slim/fitting/FLIMFittedImageFactory.java

    r7829 r7830  
    7373                break; 
    7474        } 
    75         return null; 
     75        return fittedImage; 
    7676    } 
    7777} 
  • trunk/projects/slim-plugin/src/main/java/imagej/slim/fitting/FLIMImageFitter.java

    r7829 r7830  
    5757    public void endFit() { 
    5858        for (IFittedImage fittedImage : _fittedImages) { 
    59             fittedImage.beginFit(); 
     59            fittedImage.endFit(); 
    6060        } 
    6161 
     62    } 
     63 
     64    /** 
     65     * Cancels a fit. 
     66     */ 
     67    public void cancelFit() { 
     68        for (IFittedImage fittedImage : _fittedImages) { 
     69            fittedImage.cancelFit(); 
     70        } 
    6271    } 
    6372 
  • trunk/projects/slim-plugin/src/main/java/imagej/slim/fitting/IFittedImage.java

    r7829 r7830  
    2929     */ 
    3030    public void endFit(); 
     31     
     32    /** 
     33     * Cancels a fit 
     34     */ 
     35    public void cancelFit(); 
    3136 
    3237    /** 
Note: See TracChangeset for help on using the changeset viewer.