Class SurfaceFileWriter

java.lang.Object
mgui.io.FileWriter
mgui.io.domestic.shapes.SurfaceFileWriter
All Implemented Interfaces:
InterfaceIO, IconObject
Direct Known Subclasses:
CaretSurfaceWriter, FreesurferSurfaceWriter, GiftiSurfaceWriter, Mesh3DWriter, MincSurfaceWriter, StlWriter, WavefrontSurfaceWriter

public abstract class SurfaceFileWriter
extends FileWriter
Represents an abstract surface file writer object. All FileWriter objects that write surface meshes should extend this class.
Since:
1.0.0
Author:
Andrew Reid
  • Field Details

    • number_format

      public java.lang.String number_format
  • Constructor Details

    • SurfaceFileWriter

      public SurfaceFileWriter()
  • Method Details

    • write

      public boolean write​(InterfaceIOOptions options, ProgressUpdater progress_bar)
      Description copied from class: FileWriter
      Writes this object according to the given options. If loaded object is of type PersistentObject, this method should also set the file writer and reference URL for the object.
      Specified by:
      write in class FileWriter
      Returns:
    • writeSurface

      public boolean writeSurface​(Mesh3DInt mesh)
      Write mesh with this FileWriter.
      Parameters:
      mesh -
      Returns:
    • writeSurfaces

      public boolean writeSurfaces​(java.util.ArrayList<Mesh3DInt> meshes)
      Write meshes with this FileWriter.
      Parameters:
      mesh -
      Returns:
    • writeSurface

      public abstract boolean writeSurface​(Mesh3DInt mesh, InterfaceIOOptions options, ProgressUpdater progress_bar)
      Write mesh with this FileWriter.
      Parameters:
      mesh -
      Returns:
    • writeSurfaces

      public boolean writeSurfaces​(java.util.ArrayList<Mesh3DInt> meshes, InterfaceIOOptions options, ProgressUpdater progress_bar)
      Write meshes with this FileWriter. TODO: this should throw an IOException
      Parameters:
      mesh -
      Returns:
    • setFormat

      public void setFormat​(java.lang.String number_format)
    • getSuccessMessage

      public java.lang.String getSuccessMessage()
      Specified by:
      getSuccessMessage in interface InterfaceIO
      Overrides:
      getSuccessMessage in class FileWriter
    • getFailureMessage

      public java.lang.String getFailureMessage()
      Overrides:
      getFailureMessage in class FileWriter
    • getTitle

      public java.lang.String getTitle()
      Specified by:
      getTitle in interface InterfaceIO
      Overrides:
      getTitle in class FileWriter
    • 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 FileWriter
      Returns:
    • getSupportedObjects

      public java.util.ArrayList<java.lang.Class<?>> getSupportedObjects()
      Description copied from interface: InterfaceIO
      Returns a list of classes for objects which are supported by this I/O interface
      Specified by:
      getSupportedObjects in interface InterfaceIO
      Overrides:
      getSupportedObjects in class FileWriter
      Returns: