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.String
number_format
Fields 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.String
getFailureMessage()
javax.swing.Icon
getObjectIcon()
Returns theIcon
associated with this object.java.lang.String
getSuccessMessage()
java.util.ArrayList<java.lang.Class<?>>
getSupportedObjects()
Returns a list of classes for objects which are supported by this I/O interfacejava.lang.String
getTitle()
void
setFormat(java.lang.String number_format)
boolean
write(InterfaceIOOptions options, ProgressUpdater progress_bar)
Writes this object according to the givenoptions
.boolean
writeSurface(Mesh3DInt mesh)
Writemesh
with thisFileWriter
.abstract boolean
writeSurface(Mesh3DInt mesh, InterfaceIOOptions options, ProgressUpdater progress_bar)
Writemesh
with thisFileWriter
.boolean
writeSurfaces(java.util.ArrayList<Mesh3DInt> meshes)
Writemeshes
with thisFileWriter
.boolean
writeSurfaces(java.util.ArrayList<Mesh3DInt> meshes, InterfaceIOOptions options, ProgressUpdater progress_bar)
Writemeshes
with thisFileWriter
.Methods inherited from class mgui.io.FileWriter
getComplementIOType, getFile, getIOType, getLoaderComplement, getOptions, getProgressMessage, getURL, setFile, setOptions, setURL, toString, write, write
Methods 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:FileWriter
Writes 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:
write
in classFileWriter
- Returns:
-
writeSurface
Writemesh
with thisFileWriter
.- Parameters:
mesh
-- Returns:
-
writeSurfaces
Writemeshes
with thisFileWriter
.- Parameters:
mesh
-- Returns:
-
writeSurface
public abstract boolean writeSurface(Mesh3DInt mesh, InterfaceIOOptions options, ProgressUpdater progress_bar)Writemesh
with thisFileWriter
.- Parameters:
mesh
-- Returns:
-
writeSurfaces
public boolean writeSurfaces(java.util.ArrayList<Mesh3DInt> meshes, InterfaceIOOptions options, ProgressUpdater progress_bar)Writemeshes
with 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:
getSuccessMessage
in interfaceInterfaceIO
- Overrides:
getSuccessMessage
in classFileWriter
-
getFailureMessage
public java.lang.String getFailureMessage()- Overrides:
getFailureMessage
in classFileWriter
-
getTitle
public java.lang.String getTitle()- Specified by:
getTitle
in interfaceInterfaceIO
- Overrides:
getTitle
in classFileWriter
-
getObjectIcon
public javax.swing.Icon getObjectIcon()Description copied from interface:IconObject
Returns theIcon
associated with this object.- Specified by:
getObjectIcon
in interfaceIconObject
- Overrides:
getObjectIcon
in classFileWriter
- 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 interfaceInterfaceIO
- Overrides:
getSupportedObjects
in classFileWriter
- Returns:
-