Interface DynamicModel

All Known Implementing Classes:
AbstractDynamicContrastModel, DCEMRIModel

public interface DynamicModel
An interface implemented by classes that can fit to dynamic signals that vary as a function of time.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    A JPanel that can be used to specify dynamic model parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Signals whether the model computes the root-mean-square (RMS) difference between the model and the data.
    fit(float[] sT, int col, int row, int slice, AutoCorrelationEstimate autoCorrelationEstimate, MonitorWorker worker)
    Calculate the model parameters that best fit the data.
    boolean
    Signals whether the model requires the autocorrelation in the time-series to be estimated when computing significance levels.
    boolean
    Returns true if this DynmicModel does Bonferroni correction; false otherwise.
    float
    Returns the time between data samples.
    Returns a String describing this dynamic model.
    Returns the model name.
    Returns an array of the ColourMappings, in an order that matches the order of the variable names returned by #getVarNames().
    Returns an array of the names of the fitted variables, in an order that matches the order of the variable units returned by getVarUnits().
    Returns an array of the fitted variable units, in an order that matches the order of the variable names returned by #getVarNames().
    void
    setBonferroniN(float nTests)
    Sets the number of independent fits that will be performed by the model.
  • Method Details

    • getModelName

      String getModelName()
      Returns the model name.
      Returns:
      the name of the dynamic model.
    • getModelDescription

      String getModelDescription()
      Returns a String describing this dynamic model.
      Returns:
      a String describing this dynamic model.
    • getVarNames

      String[] getVarNames()
      Returns an array of the names of the fitted variables, in an order that matches the order of the variable units returned by getVarUnits().
      Returns:
      the names of the fitted variables.
    • getVarUnits

      String[] getVarUnits()
      Returns an array of the fitted variable units, in an order that matches the order of the variable names returned by #getVarNames().
      Returns:
      the fitted variable units.
    • getVarColourMappings

      ColourMapping[] getVarColourMappings()
      Returns an array of the ColourMappings, in an order that matches the order of the variable names returned by #getVarNames().
      Returns:
      an array of ColourMappings for the calculated images. A null entry in the array indicates the corresponding variable image does not have a specific ColourMapping.
    • computesRMSDiff

      boolean computesRMSDiff()
      Signals whether the model computes the root-mean-square (RMS) difference between the model and the data.
      Returns:
      true if the model computes the (RMS) difference between the model and the data; false otherwise.
    • getCorrectAutoCorrelation

      boolean getCorrectAutoCorrelation()
      Signals whether the model requires the autocorrelation in the time-series to be estimated when computing significance levels. If autocorrelation is to be estimated, then the DynamicModelWorker uses a two-pass procedure, where the first pass is used only to estimate the residuals from which the autocorrelation is estimated. The second pass is used to calculate the model parameters.
      Returns:
      true if the model requires correction of autocorrelation; false otherwise.
    • getDt

      float getDt() throws IllegalStateException
      Returns the time between data samples.
      Returns:
      the time between data samples.
      Throws:
      IllegalStateException - if the time between data samples hasn't been set.
    • getDoBonferroni

      boolean getDoBonferroni()
      Returns true if this DynmicModel does Bonferroni correction; false otherwise.
      Returns:
      true if this DynmicModel does Bonferroni correction; false otherwise.
    • setBonferroniN

      void setBonferroniN(float nTests) throws InvalidArgumentException
      Sets the number of independent fits that will be performed by the model. May be used for Bonferroni correction of calculated significance levels.
      Parameters:
      nTests - the number of independent fits that will be performed by the model.
      Throws:
      InvalidArgumentException - if the significance level hasn't been set and Bonferroni correction has been turned on for this DynamicModel.
    • fit

      DynamicResult fit(float[] sT, int col, int row, int slice, AutoCorrelationEstimate autoCorrelationEstimate, MonitorWorker worker) throws NumericalException, CancelledException
      Calculate the model parameters that best fit the data.
      Parameters:
      sT - the dynamic signal intensity S(t). sT includes all the time points, including any data which is pre-steady-state.
      col - the image column that is being analyzed.
      row - the image row that is being analyzed.
      slice - the image slice that is being analyzed.
      autoCorrelationEstimate - an estimate of the temporal auto-correlation at each pixel.
      worker - if non-null, the MonitorWorker that may be used to cancel the operation.
      Returns:
      the result of fitting to the data.
      Throws:
      NumericalException - if a numerical error occurs during the fitting.
      CancelledException - if the fitting is cancelled using the MonitorWorker.