Class MLDetectionsManager

java.lang.Object
export.MLExport.MLDetectionsManager
All Implemented Interfaces:
PamDataUnitExporter

public class MLDetectionsManager extends Object implements PamDataUnitExporter
Handles the conversion of data units into MATLAB structures.
Author:
Jamie Macaulay
  • Field Details

  • Constructor Details

    • MLDetectionsManager

      public MLDetectionsManager()
  • Method Details

    • hasCompatibleUnits

      public boolean hasCompatibleUnits(Class dataUnitType)
      Description copied from interface: PamDataUnitExporter
      Check whether a particular data unit class is compatible
      Specified by:
      hasCompatibleUnits in interface PamDataUnitExporter
      Parameters:
      dataUnitType - - the data unit type to test.
      Returns:
      true if it can be exported.
    • exportData

      public boolean exportData(File fileName, List<PamDataUnit> dataUnits, boolean append)
      Description copied from interface: PamDataUnitExporter
      Export the data to a folder.
      Specified by:
      exportData in interface PamDataUnitExporter
      Parameters:
      fileName - - the file to export to
      dataUnits - - the data units to export.
      Returns:
      true if exported successfully.
    • hasCompatibleUnits

      public boolean hasCompatibleUnits(List<PamDataUnit> dataUnits)
      Check whether there are compatible data units to be exported.
      Parameters:
      dataUnits - - the data unit list
      Returns:
      true if MATLAB export is possible for the current data units.
    • dataUnits2MAT

      public us.hebi.matlab.mat.types.Struct dataUnits2MAT(List<PamDataUnit> dataUnits)
      Sort a list of data units into lists of the same type of units. Convert to a list of structures.
      Parameters:
      dataUnits - - a list of data units to convert to matlab structures.
      Returns:
      list of list of MATLAB strucutures ready for saving to .mat file.
    • getFileExtension

      public String getFileExtension()
      Description copied from interface: PamDataUnitExporter
      Get the extension for the output file type
      Specified by:
      getFileExtension in interface PamDataUnitExporter
      Returns:
      the extension for the file type e.g. "mat"
    • getIconString

      public String getIconString()
      Description copied from interface: PamDataUnitExporter
      Get the ikonli icon string for the exporter.
      Specified by:
      getIconString in interface PamDataUnitExporter
      Returns:
      the ikon string.
    • getName

      public String getName()
      Description copied from interface: PamDataUnitExporter
      Get the name of the exporter.
      Specified by:
      getName in interface PamDataUnitExporter
      Returns:
      the name of the exporter.
    • main

      public static void main(String[] args)
    • close

      public void close()
      Description copied from interface: PamDataUnitExporter
      Close the exporter.
      Specified by:
      close in interface PamDataUnitExporter
    • isNeedsNewFile

      public boolean isNeedsNewFile()
      Description copied from interface: PamDataUnitExporter
      Check whether and exporter needs a new file
      Specified by:
      isNeedsNewFile in interface PamDataUnitExporter
      Returns:
      true if we need a new file.
    • getOptionsPanel

      public Component getOptionsPanel()
      Description copied from interface: PamDataUnitExporter
      An optional panel that displays additional options for the user.
      Specified by:
      getOptionsPanel in interface PamDataUnitExporter
      Returns:
      additional options panel - can be null.
    • getOptionsPane

      public javafx.scene.layout.Pane getOptionsPane()
      Description copied from interface: PamDataUnitExporter
      An optional JavaFX pane that displays additional options for the user.
      Specified by:
      getOptionsPane in interface PamDataUnitExporter
      Returns:
      pane with additonal options - can be null.
    • prepareExport

      public void prepareExport()
      Description copied from interface: PamDataUnitExporter
      Called whenever a new export run is prepared.
      Specified by:
      prepareExport in interface PamDataUnitExporter