Changeset 7807 for trunk


Ignore:
Timestamp:
11/11/11 18:37:43 (8 years ago)
Author:
aivar
Message:

Work in progress, refactoring fit process

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

Legend:

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

    r7805 r7807  
    3838import imagej.slim.fitting.params.IGlobalFitParams; 
    3939import imagej.slim.fitting.params.ILocalFitResults; 
     40import loci.curvefitter.ICurveFitter; 
     41 
    4042import java.util.concurrent.Callable; 
    4143 
     
    4648public interface IFittingEngineCallable extends Callable<ILocalFitResults> { 
    4749     
    48     public void setup(IGlobalFitParams params, ILocalFitParams data); 
     50    public void setup(ICurveFitter curveFitter, 
     51            IGlobalFitParams params, ILocalFitParams data); 
    4952     
    5053    public ILocalFitResults call(); 
  • trunk/projects/slim-plugin/src/main/java/imagej/slim/fitting/callable/SLIMCurveCallable.java

    r7806 r7807  
    5454 */ 
    5555public class SLIMCurveCallable implements IFittingEngineCallable { 
     56    private ICurveFitter _curveFitter; 
    5657    private IGlobalFitParams _globalParams; 
    5758    private ILocalFitParams _localParams; 
    5859    private ILocalFitResults _result; 
    59     private ICurveFitter _curveFitter; 
    60      
    61     public void setup(final IGlobalFitParams globalParams, final ILocalFitParams localParams) { 
     60 
     61    @Override 
     62    public void setup(final ICurveFitter curveFitter, 
     63            final IGlobalFitParams globalParams, 
     64            final ILocalFitParams localParams) { 
     65        _curveFitter = curveFitter; 
    6266        _globalParams = globalParams; 
    6367        _localParams = localParams; 
    6468    } 
    65      
     69  
     70    @Override 
    6671    public ILocalFitResults call() { 
    6772        System.out.println(">>> " + _localParams.getId() + "-" + Thread.currentThread().getName()); 
  • trunk/projects/slim-plugin/src/main/java/imagej/slim/fitting/engine/ThreadedFittingEngine.java

    r7805 r7807  
    8888        IFittingEngineCallable callable 
    8989                = Configuration.getInstance().newFittingEngineCallable(); 
    90         callable.setup(params, data); 
     90        callable.setup(null, params, data); //TODO ARG pass in an ICurveFitter 
    9191        return callable.call(); 
    9292    } 
     
    108108            IFittingEngineCallable callable 
    109109                    = Configuration.getInstance().newFittingEngineCallable(); 
    110             callable.setup(params, data); 
     110            callable.setup(null, params, data); //TODO ARG pass in an ICurveFitter 
    111111            callableList.add(callable); 
    112112        } 
Note: See TracChangeset for help on using the changeset viewer.