Package mgui.io.foreign.caret
Class CaretSurfaceWriter
java.lang.Object
mgui.io.FileWriter
mgui.io.domestic.shapes.SurfaceFileWriter
mgui.io.foreign.caret.CaretSurfaceWriter
- All Implemented Interfaces:
InterfaceIO
,IconObject
public class CaretSurfaceWriter extends SurfaceFileWriter
Writes a mesh to Caret format (two files, topo and coord)
See http://brainmap.wustl.edu/caret/caret_help/file_formats/file_formats.html
- Author:
- Andrew Reid
-
Field Summary
Fields Modifier and Type Field Description java.io.File
coordFile
java.net.URL
coordURL
int
format
static int
FORMAT_ASCII
static int
FORMAT_BINARY
Fields inherited from class mgui.io.domestic.shapes.SurfaceFileWriter
number_format
Fields inherited from class mgui.io.FileWriter
dataFile, dataURL, failure_message, success_message
-
Constructor Summary
Constructors Constructor Description CaretSurfaceWriter()
CaretSurfaceWriter(java.io.File file)
CaretSurfaceWriter(java.io.File topoFile, java.io.File coordFile)
CaretSurfaceWriter(CaretSurfaceOutOptions options)
-
Method Summary
Modifier and Type Method Description protected CaretSurfaceOutOptions
getDefaultOptions()
void
setCoordFile(java.io.File file)
void
setOptions(CaretSurfaceOutOptions options)
void
setTopoFile(java.io.File file)
boolean
write(InterfaceIOOptions options, ProgressUpdater progress_bar)
Writes this object according to the givenoptions
.protected boolean
writeBinarySurface(Mesh3DInt mesh3d, ProgressUpdater progress_bar)
boolean
writeSurface(Mesh3DInt mesh, InterfaceIOOptions options, ProgressUpdater progress_bar)
Writemesh
with thisFileWriter
.Methods inherited from class mgui.io.domestic.shapes.SurfaceFileWriter
getFailureMessage, getObjectIcon, getSuccessMessage, getSupportedObjects, getTitle, setFormat, writeSurface, writeSurfaces, writeSurfaces
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
-
FORMAT_BINARY
public static final int FORMAT_BINARY- See Also:
- Constant Field Values
-
FORMAT_ASCII
public static final int FORMAT_ASCII- See Also:
- Constant Field Values
-
coordFile
public java.io.File coordFile -
coordURL
public java.net.URL coordURL -
format
public int format
-
-
Constructor Details
-
CaretSurfaceWriter
public CaretSurfaceWriter() -
CaretSurfaceWriter
public CaretSurfaceWriter(java.io.File file) -
CaretSurfaceWriter
public CaretSurfaceWriter(java.io.File topoFile, java.io.File coordFile) -
CaretSurfaceWriter
-
-
Method Details
-
setOptions
-
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.- Overrides:
write
in classSurfaceFileWriter
- Returns:
-
setTopoFile
public void setTopoFile(java.io.File file) -
setCoordFile
public void setCoordFile(java.io.File file) -
writeSurface
public boolean writeSurface(Mesh3DInt mesh, InterfaceIOOptions options, ProgressUpdater progress_bar)Description copied from class:SurfaceFileWriter
Writemesh
with thisFileWriter
.- Specified by:
writeSurface
in classSurfaceFileWriter
- Returns:
-
writeBinarySurface
protected boolean writeBinarySurface(Mesh3DInt mesh3d, ProgressUpdater progress_bar) throws java.io.IOException- Throws:
java.io.IOException
-
getDefaultOptions
-