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.FilecoordFilejava.net.URLcoordURLintformatstatic intFORMAT_ASCIIstatic intFORMAT_BINARYFields inherited from class mgui.io.domestic.shapes.SurfaceFileWriter
number_formatFields 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 CaretSurfaceOutOptionsgetDefaultOptions()voidsetCoordFile(java.io.File file)voidsetOptions(CaretSurfaceOutOptions options)voidsetTopoFile(java.io.File file)booleanwrite(InterfaceIOOptions options, ProgressUpdater progress_bar)Writes this object according to the givenoptions.protected booleanwriteBinarySurface(Mesh3DInt mesh3d, ProgressUpdater progress_bar)booleanwriteSurface(Mesh3DInt mesh, InterfaceIOOptions options, ProgressUpdater progress_bar)Writemeshwith thisFileWriter.Methods inherited from class mgui.io.domestic.shapes.SurfaceFileWriter
getFailureMessage, getObjectIcon, getSuccessMessage, getSupportedObjects, getTitle, setFormat, writeSurface, writeSurfaces, writeSurfacesMethods 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
-
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: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.- Overrides:
writein 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:SurfaceFileWriterWritemeshwith thisFileWriter.- Specified by:
writeSurfacein classSurfaceFileWriter- Returns:
-
writeBinarySurface
protected boolean writeBinarySurface(Mesh3DInt mesh3d, ProgressUpdater progress_bar) throws java.io.IOException- Throws:
java.io.IOException
-
getDefaultOptions
-