Class DiscreteColourMapLoader

java.lang.Object
mgui.io.FileLoader
mgui.io.domestic.maps.ColourMapLoader
mgui.io.domestic.maps.DiscreteColourMapLoader
All Implemented Interfaces:
InterfaceIO, IconObject
Direct Known Subclasses:
CaretAreaColourLoader, MricroLutLoader

public class DiscreteColourMapLoader
extends ColourMapLoader
Loads a discrete colour map from either delimited ASCII or XML.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Field Details

  • Constructor Details

    • DiscreteColourMapLoader

      public DiscreteColourMapLoader()
    • DiscreteColourMapLoader

      public DiscreteColourMapLoader​(java.io.File file)
  • Method Details

    • load

      public boolean load​(InterfaceIOOptions options, ProgressUpdater progress_bar)
      Description copied from class: FileLoader
      Loads data from the set of files or URLs specified by options. Loading is controlled by the specifications of options. If loaded object is of type PersistentObject, this method should also set the file loader and reference URL for the object.

      This method should also set the URL reference and writer and loader attributes to match this one and its complement.

      Overrides:
      load in class ColourMapLoader
      progress_bar - An optional progress updater. Can be null.
      Returns:
    • loadMap

      public DiscreteColourMap loadMap() throws java.io.IOException
      Overrides:
      loadMap in class ColourMapLoader
      Throws:
      java.io.IOException
    • loadMap

      public DiscreteColourMap loadMap​(DiscreteColourMapInOptions.Format format, boolean normalized) throws java.io.IOException
      Loads a discrete colour map from the specified format.
      Parameters:
      format -
      Returns:
      the map
      Throws:
      java.io.IOException
    • loadAsContinuousMap

      public ContinuousColourMap loadAsContinuousMap​(DiscreteColourMapInOptions.Format format, int no_anchors, boolean normalized) throws java.io.IOException
      Loads this discrete map as a continuous maps with no_anchors anchors. This is useful for converting discrete look-up tables (LUTs) which are meant to be continuous.
      Parameters:
      no_anchors -
      Returns:
      the continuous version of this discrete map
      Throws:
      java.io.IOException
    • getObjectIcon

      public javax.swing.Icon getObjectIcon()
      Description copied from interface: IconObject
      Returns the Icon associated with this object.
      Specified by:
      getObjectIcon in interface IconObject
      Overrides:
      getObjectIcon in class FileLoader
      Returns: