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 Details

  • Constructor Details

    • FreesurferVertexDataLoader

      public FreesurferVertexDataLoader()
    • FreesurferVertexDataLoader

      public FreesurferVertexDataLoader​(java.io.File file)
    • FreesurferVertexDataLoader

      public FreesurferVertexDataLoader​(java.io.File file, FreesurferVertexDataInOptions options)
  • 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 SurfaceDataFileLoader
      progress_bar - An optional progress updater. Can be null.
      Returns:
    • loadObject

      public java.lang.Object loadObject​(ProgressUpdater progress_bar) throws java.io.IOException
      Description copied from class: FileLoader
      Loads data into an instance of the object corresponding to this loader. If loaded object is of type PersistentObject, this method should also set the file loader and reference URL for the object. TODO: make generic?
      Overrides:
      loadObject in class FileLoader
      Parameters:
      progress_bar - An optional progress updater. Can be null.
      Returns:
      Throws:
      java.io.IOException
    • loadValues

      public java.util.ArrayList<MguiNumber> loadValues​(ProgressUpdater progress_bar)
      Specified by:
      loadValues in class SurfaceDataFileLoader
    • loadValuesDense1

      protected java.util.ArrayList<MguiNumber> loadValuesDense1​(ProgressUpdater progress_bar)
    • loadValuesDense2

      protected java.util.ArrayList<MguiNumber> loadValuesDense2​(ProgressUpdater progress_bar)
    • loadValuesAnnotation

      protected java.util.ArrayList<MguiNumber> loadValuesAnnotation​(ProgressUpdater progress_bar)
    • getAnnotRGB

      protected int[] getAnnotRGB​(int value)
    • loadValuesLabel

      protected java.util.ArrayList<MguiNumber> loadValuesLabel​(ProgressUpdater progress_bar)
    • loadValuesSparse

      protected java.util.ArrayList<MguiNumber> loadValuesSparse​(ProgressUpdater progress_bar)
    • loadValuesAscii

      protected java.util.ArrayList<MguiNumber> loadValuesAscii​(ProgressUpdater progress_bar)