Package mgui.io.domestic.maps
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 Summary
Fields inherited from class mgui.io.FileLoader
dataFile, dataURL, options -
Constructor Summary
Constructors Constructor Description DiscreteColourMapLoader()DiscreteColourMapLoader(java.io.File file) -
Method Summary
Modifier and Type Method Description javax.swing.IcongetObjectIcon()Returns theIconassociated with this object.booleanload(InterfaceIOOptions options, ProgressUpdater progress_bar)Loads data from the set of files or URLs specified byoptions.ContinuousColourMaploadAsContinuousMap(DiscreteColourMapInOptions.Format format, int no_anchors, boolean normalized)Loads this discrete map as a continuous maps withno_anchorsanchors.DiscreteColourMaploadMap()DiscreteColourMaploadMap(DiscreteColourMapInOptions.Format format, boolean normalized)Loads a discrete colour map from the specified format.Methods inherited from class mgui.io.domestic.maps.ColourMapLoader
getSupportedObjects, loadMap, loadObjectMethods inherited from class mgui.io.FileLoader
getComplementIOType, getFailureMessage, getFile, getIOType, getOptions, getProgressMessage, getSuccessMessage, getTitle, getWriterComplement, load, load, loadObject, loadObject, loadObject, setFile, setOptions, setURL, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
map
-
-
Constructor Details
-
DiscreteColourMapLoader
public DiscreteColourMapLoader() -
DiscreteColourMapLoader
public DiscreteColourMapLoader(java.io.File file)
-
-
Method Details
-
load
Description copied from class:FileLoaderLoads data from the set of files or URLs specified byoptions. Loading is controlled by the specifications ofoptions. If loaded object is of typePersistentObject, 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:
loadin classColourMapLoaderprogress_bar- An optional progress updater. Can benull.- Returns:
-
loadMap
- Overrides:
loadMapin classColourMapLoader- Throws:
java.io.IOException
-
loadMap
public DiscreteColourMap loadMap(DiscreteColourMapInOptions.Format format, boolean normalized) throws java.io.IOExceptionLoads 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.IOExceptionLoads this discrete map as a continuous maps withno_anchorsanchors. 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:IconObjectReturns theIconassociated with this object.- Specified by:
getObjectIconin interfaceIconObject- Overrides:
getObjectIconin classFileLoader- Returns:
-