Package mgui.io.foreign.freesurfer
Class FreesurferVertexDataLoader
java.lang.Object
mgui.io.FileLoader
mgui.io.domestic.shapes.SurfaceDataFileLoader
mgui.io.foreign.freesurfer.FreesurferVertexDataLoader
- All Implemented Interfaces:
InterfaceIO
,IconObject
public class FreesurferVertexDataLoader extends SurfaceDataFileLoader
Loads a Freesurfer surface data file. Format can be dense or sparse (i.e., old or new
"curv" format), which is specified by the "type" option of FreesurferVertexDataLoaderOptions.
See: http://www.grahamwideman.com/gw/brain/fs/surfacefileformats.htm.
See: http://surfer.nmr.mgh.harvard.edu/fswiki/LabelsClutsAnnotationFiles.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Field Summary
Fields Modifier and Type Field Description ColourMap
colour_map
Fields inherited from class mgui.io.FileLoader
dataFile, dataURL
-
Constructor Summary
Constructors Constructor Description FreesurferVertexDataLoader()
FreesurferVertexDataLoader(java.io.File file)
FreesurferVertexDataLoader(java.io.File file, FreesurferVertexDataInOptions options)
-
Method Summary
Modifier and Type Method Description protected int[]
getAnnotRGB(int value)
boolean
load(InterfaceIOOptions _options, ProgressUpdater progress_bar)
Loads data from the set of files or URLs specified byoptions
.java.lang.Object
loadObject(ProgressUpdater progress_bar)
Loads data into an instance of the object corresponding to this loader.java.util.ArrayList<MguiNumber>
loadValues(ProgressUpdater progress_bar)
protected java.util.ArrayList<MguiNumber>
loadValuesAnnotation(ProgressUpdater progress_bar)
protected java.util.ArrayList<MguiNumber>
loadValuesAscii(ProgressUpdater progress_bar)
protected java.util.ArrayList<MguiNumber>
loadValuesDense1(ProgressUpdater progress_bar)
protected java.util.ArrayList<MguiNumber>
loadValuesDense2(ProgressUpdater progress_bar)
protected java.util.ArrayList<MguiNumber>
loadValuesLabel(ProgressUpdater progress_bar)
protected java.util.ArrayList<MguiNumber>
loadValuesSparse(ProgressUpdater progress_bar)
Methods inherited from class mgui.io.domestic.shapes.SurfaceDataFileLoader
getFailureMessage, getObjectIcon, getSuccessMessage, getSupportedObjects, getTitle, loadObject, loadValues
Methods inherited from class mgui.io.FileLoader
getComplementIOType, getFile, getIOType, getOptions, getProgressMessage, getWriterComplement, load, load, loadObject, loadObject, setFile, setOptions, setURL, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
colour_map
-
-
Constructor Details
-
FreesurferVertexDataLoader
public FreesurferVertexDataLoader() -
FreesurferVertexDataLoader
public FreesurferVertexDataLoader(java.io.File file) -
FreesurferVertexDataLoader
-
-
Method Details
-
load
Description copied from class:FileLoader
Loads 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:
load
in classSurfaceDataFileLoader
progress_bar
- An optional progress updater. Can benull
.- Returns:
-
loadObject
Description copied from class:FileLoader
Loads data into an instance of the object corresponding to this loader. If loaded object is of typePersistentObject
, this method should also set the file loader and reference URL for the object. TODO: make generic?- Overrides:
loadObject
in classFileLoader
- Parameters:
progress_bar
- An optional progress updater. Can benull
.- Returns:
- Throws:
java.io.IOException
-
loadValues
- Specified by:
loadValues
in classSurfaceDataFileLoader
-
loadValuesDense1
-
loadValuesDense2
-
loadValuesAnnotation
-
getAnnotRGB
protected int[] getAnnotRGB(int value) -
loadValuesLabel
-
loadValuesSparse
-
loadValuesAscii
-