Package mgui.io.standard.gifti
Class GiftiSurfaceWriter
java.lang.Object
mgui.io.FileWriter
mgui.io.domestic.shapes.SurfaceFileWriter
mgui.io.standard.gifti.GiftiSurfaceWriter
- All Implemented Interfaces:
InterfaceIO,IconObject
public class GiftiSurfaceWriter extends SurfaceFileWriter
Writes a surface to Gifti format. See
http://www.nitrc.org/projects/gifti/ for details and specification.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Field Summary
Fields inherited from class mgui.io.domestic.shapes.SurfaceFileWriter
number_formatFields inherited from class mgui.io.FileWriter
dataFile, dataURL, failure_message, options, success_message -
Constructor Summary
Constructors Constructor Description GiftiSurfaceWriter()GiftiSurfaceWriter(java.io.File file) -
Method Summary
Modifier and Type Method Description InterfaceIOTypegetLoaderComplement()Returns theInterfaceIOTypeof aFileLoaderwhich is the complement of this writer; i.e., reads what this writer writes with identical encoding.protected voidwriteAsciiArray(java.io.BufferedWriter writer, java.util.ArrayList<MguiNumber> data, int decimals)Write vertex data as ASCII data to an XML writer; formats todecimalsdecimal places.protected voidwriteAsciiColours(java.io.BufferedWriter writer, VertexDataColumn column, int decimals, boolean has_alpha)Write coordinates as ASCII data to an XML writer; formats todecimalsdecimal places.protected voidwriteAsciiCoords(java.io.BufferedWriter writer, Mesh3D mesh, int decimals)Write coordinates as ASCII data to an XML writer; formats todecimalsdecimal places.protected voidwriteAsciiFaces(java.io.BufferedWriter writer, Mesh3D mesh)Write faces as ASCII data to an XML writer; formats todecimalsdecimal places.protected voidwriteBinaryArray(java.io.BufferedWriter writer, java.util.ArrayList<MguiNumber> array, boolean compress, java.nio.ByteOrder b_order)protected voidwriteBinaryColours(java.io.BufferedWriter writer, VertexDataColumn column, boolean compress, java.nio.ByteOrder b_order, boolean has_alpha)protected voidwriteBinaryCoords(java.io.BufferedWriter writer, Mesh3D mesh, boolean compress, java.nio.ByteOrder b_order)Write mesh coordinates as Base64 encoded binary data to an XML writer, in row major order.protected voidwriteBinaryFaces(java.io.BufferedWriter writer, Mesh3D mesh, boolean compress, java.nio.ByteOrder b_order)Write mesh faces as Base64 encoded binary data to an XML writer, in row major order.booleanwriteSurface(Mesh3DInt mesh_int, InterfaceIOOptions options, ProgressUpdater progress_bar)Writemeshwith thisFileWriter.protected voidwriteVertexColours(java.io.BufferedWriter writer, VertexDataColumn this_column, GiftiOutputOptions _options, boolean has_alpha)protected voidwriteVertexData(java.io.BufferedWriter writer, VertexDataColumn this_column, GiftiOutputOptions _options)Methods inherited from class mgui.io.domestic.shapes.SurfaceFileWriter
getFailureMessage, getObjectIcon, getSuccessMessage, getSupportedObjects, getTitle, setFormat, write, writeSurface, writeSurfaces, writeSurfacesMethods inherited from class mgui.io.FileWriter
getComplementIOType, getFile, getIOType, 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
-
Constructor Details
-
GiftiSurfaceWriter
public GiftiSurfaceWriter() -
GiftiSurfaceWriter
public GiftiSurfaceWriter(java.io.File file)
-
-
Method Details
-
writeSurface
public boolean writeSurface(Mesh3DInt mesh_int, InterfaceIOOptions options, ProgressUpdater progress_bar)Description copied from class:SurfaceFileWriterWritemeshwith thisFileWriter.- Specified by:
writeSurfacein classSurfaceFileWriter- Returns:
-
writeVertexData
protected void writeVertexData(java.io.BufferedWriter writer, VertexDataColumn this_column, GiftiOutputOptions _options) throws java.io.IOException- Throws:
java.io.IOException
-
writeVertexColours
protected void writeVertexColours(java.io.BufferedWriter writer, VertexDataColumn this_column, GiftiOutputOptions _options, boolean has_alpha) throws java.io.IOException- Throws:
java.io.IOException
-
writeBinaryCoords
protected void writeBinaryCoords(java.io.BufferedWriter writer, Mesh3D mesh, boolean compress, java.nio.ByteOrder b_order) throws java.io.IOExceptionWrite mesh coordinates as Base64 encoded binary data to an XML writer, in row major order.- Parameters:
mesh-encoding-- Throws:
java.io.IOException
-
writeBinaryArray
protected void writeBinaryArray(java.io.BufferedWriter writer, java.util.ArrayList<MguiNumber> array, boolean compress, java.nio.ByteOrder b_order) throws java.io.IOException- Throws:
java.io.IOException
-
writeBinaryColours
protected void writeBinaryColours(java.io.BufferedWriter writer, VertexDataColumn column, boolean compress, java.nio.ByteOrder b_order, boolean has_alpha) throws java.io.IOException- Throws:
java.io.IOException
-
writeAsciiArray
protected void writeAsciiArray(java.io.BufferedWriter writer, java.util.ArrayList<MguiNumber> data, int decimals) throws java.io.IOExceptionWrite vertex data as ASCII data to an XML writer; formats todecimalsdecimal places. Wraps line when it exceeds 76 characters.- Parameters:
mesh-encoding-- Throws:
java.io.IOException
-
writeBinaryFaces
protected void writeBinaryFaces(java.io.BufferedWriter writer, Mesh3D mesh, boolean compress, java.nio.ByteOrder b_order) throws java.io.IOExceptionWrite mesh faces as Base64 encoded binary data to an XML writer, in row major order.- Parameters:
mesh-encoding-- Throws:
java.io.IOException
-
writeAsciiCoords
protected void writeAsciiCoords(java.io.BufferedWriter writer, Mesh3D mesh, int decimals) throws java.io.IOExceptionWrite coordinates as ASCII data to an XML writer; formats todecimalsdecimal places. Wraps line when it exceeds 76 characters.- Parameters:
mesh-encoding-- Throws:
java.io.IOException
-
writeAsciiColours
protected void writeAsciiColours(java.io.BufferedWriter writer, VertexDataColumn column, int decimals, boolean has_alpha) throws java.io.IOExceptionWrite coordinates as ASCII data to an XML writer; formats todecimalsdecimal places. Wraps line when it exceeds 76 characters.- Parameters:
mesh-encoding-- Throws:
java.io.IOException
-
writeAsciiFaces
protected void writeAsciiFaces(java.io.BufferedWriter writer, Mesh3D mesh) throws java.io.IOExceptionWrite faces as ASCII data to an XML writer; formats todecimalsdecimal places. Wraps line when it exceeds 76 characters.- Parameters:
mesh-encoding-- Throws:
java.io.IOException
-
getLoaderComplement
Description copied from class:FileWriterReturns theInterfaceIOTypeof aFileLoaderwhich is the complement of this writer; i.e., reads what this writer writes with identical encoding. Transfer between loader and writer should be lossless.Returns
nullif no complement is defined.- Overrides:
getLoaderComplementin classFileWriter- Returns:
-