Package mgui.io.domestic.shapes
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 Summary
Fields Modifier and Type Field Description java.lang.Stringnumber_formatFields inherited from class mgui.io.FileWriter
dataFile, dataURL, failure_message, options, success_message -
Constructor Summary
Constructors Constructor Description SurfaceFileWriter() -
Method Summary
Modifier and Type Method Description java.lang.StringgetFailureMessage()javax.swing.IcongetObjectIcon()Returns theIconassociated with this object.java.lang.StringgetSuccessMessage()java.util.ArrayList<java.lang.Class<?>>getSupportedObjects()Returns a list of classes for objects which are supported by this I/O interfacejava.lang.StringgetTitle()voidsetFormat(java.lang.String number_format)booleanwrite(InterfaceIOOptions options, ProgressUpdater progress_bar)Writes this object according to the givenoptions.booleanwriteSurface(Mesh3DInt mesh)Writemeshwith thisFileWriter.abstract booleanwriteSurface(Mesh3DInt mesh, InterfaceIOOptions options, ProgressUpdater progress_bar)Writemeshwith thisFileWriter.booleanwriteSurfaces(java.util.ArrayList<Mesh3DInt> meshes)Writemesheswith thisFileWriter.booleanwriteSurfaces(java.util.ArrayList<Mesh3DInt> meshes, InterfaceIOOptions options, ProgressUpdater progress_bar)Writemesheswith thisFileWriter.Methods inherited from class mgui.io.FileWriter
getComplementIOType, getFile, getIOType, getLoaderComplement, getOptions, getProgressMessage, getURL, setFile, setOptions, setURL, toString, write, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
number_format
public java.lang.String number_format
-
-
Constructor Details
-
SurfaceFileWriter
public SurfaceFileWriter()
-
-
Method Details
-
write
Description copied from class:FileWriterWrites this object according to the givenoptions. If loaded object is of typePersistentObject, this method should also set the file writer and reference URL for the object.- Specified by:
writein classFileWriter- Returns:
-
writeSurface
Writemeshwith thisFileWriter.- Parameters:
mesh-- Returns:
-
writeSurfaces
Writemesheswith thisFileWriter.- Parameters:
mesh-- Returns:
-
writeSurface
public abstract boolean writeSurface(Mesh3DInt mesh, InterfaceIOOptions options, ProgressUpdater progress_bar)Writemeshwith thisFileWriter.- Parameters:
mesh-- Returns:
-
writeSurfaces
public boolean writeSurfaces(java.util.ArrayList<Mesh3DInt> meshes, InterfaceIOOptions options, ProgressUpdater progress_bar)Writemesheswith thisFileWriter. 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:
getSuccessMessagein interfaceInterfaceIO- Overrides:
getSuccessMessagein classFileWriter
-
getFailureMessage
public java.lang.String getFailureMessage()- Overrides:
getFailureMessagein classFileWriter
-
getTitle
public java.lang.String getTitle()- Specified by:
getTitlein interfaceInterfaceIO- Overrides:
getTitlein classFileWriter
-
getObjectIcon
public javax.swing.Icon getObjectIcon()Description copied from interface:IconObjectReturns theIconassociated with this object.- Specified by:
getObjectIconin interfaceIconObject- Overrides:
getObjectIconin classFileWriter- Returns:
-
getSupportedObjects
public java.util.ArrayList<java.lang.Class<?>> getSupportedObjects()Description copied from interface:InterfaceIOReturns a list of classes for objects which are supported by this I/O interface- Specified by:
getSupportedObjectsin interfaceInterfaceIO- Overrides:
getSupportedObjectsin classFileWriter- Returns:
-