annotool.gui.model
Class ModelLoader

java.lang.Object
  extended by annotool.gui.model.ModelLoader
All Implemented Interfaces:
java.lang.Runnable

public class ModelLoader
extends java.lang.Object
implements java.lang.Runnable

This class is responsible for loading saved model and applying model.


Constructor Summary
ModelLoader(ImageReadyPanel pnlImages)
           
 
Method Summary
 void applyModel()
          Iterates through the arraylist of loaded models and applies each one to the current image set
 void clearModels()
          Removes all the models previously loaded
 annotool.Annotation[][] getAnnotations()
           
 java.util.ArrayList<ChainModel> getChainModels()
           
 java.util.HashMap<java.lang.String,java.lang.String> getClassNames()
           
 java.lang.String[] getModelLabels()
           
 boolean[] getSupportsProb()
           
 boolean isBinary()
           
 void load()
           
 boolean loadModel()
          Loads model from a single file.
 boolean loadModels()
          Method: loadModels Loads models from multiple files and directories.
 void run()
           
 void setChainModelsFromArray(ChainModel[] chainModelsArr)
           
 void setFile(java.io.File file)
           
 void setFiles(java.io.File[] files)
           
 boolean validate()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelLoader

public ModelLoader(ImageReadyPanel pnlImages)
Method Detail

clearModels

public void clearModels()
Removes all the models previously loaded


load

public void load()

loadModels

public boolean loadModels()
Method: loadModels Loads models from multiple files and directories. Each selected directory is traversed to locate model files to load. Sub-directories are not traversed. Loaded models are available in chainModels

Returns:
True if model was loaded, false if canceled

loadModel

public boolean loadModel()
Loads model from a single file.

Returns:
True if model was loaded, false if canceled or invalid model

validate

public boolean validate()

run

public void run()
Specified by:
run in interface java.lang.Runnable

applyModel

public void applyModel()
Iterates through the arraylist of loaded models and applies each one to the current image set


getAnnotations

public annotool.Annotation[][] getAnnotations()

getClassNames

public java.util.HashMap<java.lang.String,java.lang.String> getClassNames()

getModelLabels

public java.lang.String[] getModelLabels()

getSupportsProb

public boolean[] getSupportsProb()

isBinary

public boolean isBinary()

setChainModelsFromArray

public void setChainModelsFromArray(ChainModel[] chainModelsArr)

getChainModels

public java.util.ArrayList<ChainModel> getChainModels()

setFiles

public void setFiles(java.io.File[] files)

setFile

public void setFile(java.io.File file)