Package boofcv.gui

Class SelectAlgorithmAndInputPanel

All Implemented Interfaces:
VisualizeApp, ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible
Direct Known Subclasses:

public abstract class SelectAlgorithmAndInputPanel extends JPanel implements ActionListener, VisualizeApp
Provides pull a menubar for selecting the input source and which algorithm to use
See Also:
  • Field Details

  • Constructor Details

    • SelectAlgorithmAndInputPanel

      protected SelectAlgorithmAndInputPanel(int numAlgFamilies)
  • Method Details

    • loadInputData

      public void loadInputData(String fileName)
      Loads a standardized file for input references
      Specified by:
      loadInputData in interface VisualizeApp
      fileName - path to config file
    • setBaseDirectory

      public void setBaseDirectory(String baseDirectory)
      Sets the directory that relative references are relative too
    • addToToolbar

      public void addToToolbar(JComponent comp)
      Adds a new component into the toolbar.
      comp - The component being added
    • removeFromToolbar

      public void removeFromToolbar(JComponent comp)
    • setMainGUI

      public void setMainGUI(Component gui)
      Used to add the main GUI to this panel. Must use this function. Algorithm change events will not be posted until this function has been set.
      gui - The main GUI being displayed.
    • setInputImage

      public void setInputImage(BufferedImage image)
      Specifies an image which contains the original input image. After this has been called the view input image widget is activated and when selected this image will be displayed instead of the main GUI. This functionality is optional.
      image - Original input image.
    • setInputList

      public void setInputList(List<PathLabel> inputRefs)
      Specifies a list of images to use as input and loads them
      inputRefs - Name of input and where to get it
    • addAlgorithm

      public void addAlgorithm(int indexFamily, String name, Object cookie)
    • doRefreshAll

      public void doRefreshAll()
      Grabs the currently selected algorithm, passes information to GUI for updating, toggles GUI being active/not. refreshAll() is called in a new thread.
    • getAlgorithmCookie

      protected <T> T getAlgorithmCookie(int indexFamily)
      Returns the cookie associated with the specified algorithm family.
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • setMediaManager

      public void setMediaManager(MediaManager manager)
      Specified by:
      setMediaManager in interface VisualizeApp
    • refreshAll

      public abstract void refreshAll(Object[] cookies)
      Provides the current state of all selected algorithms.
      cookies - state of each selected algorithm.
    • setActiveAlgorithm

      public abstract void setActiveAlgorithm(int indexFamily, String name, Object cookie)
      A request has been made to change the processing algorithm. NOT called from a GUI thread.
      name - Display name of the algorithm.
      cookie - Reference to user defined data.
    • changeInput

      public abstract void changeInput(String name, int index)
      A request to change the input image has been made. The input image's label and its index in the manager are returned.
      name - Display name of the image.
      index - Which image in the list.