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
  • 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: SurfaceFileWriter
      Write mesh with this FileWriter.
      Specified by:
      writeSurface in class SurfaceFileWriter
      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.IOException
      Write 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.IOException
      Write vertex data as ASCII data to an XML writer; formats to decimals decimal 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.IOException
      Write 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.IOException
      Write coordinates as ASCII data to an XML writer; formats to decimals decimal 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.IOException
      Write coordinates as ASCII data to an XML writer; formats to decimals decimal 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.IOException
      Write faces as ASCII data to an XML writer; formats to decimals decimal places. Wraps line when it exceeds 76 characters.
      Parameters:
      mesh -
      encoding -
      Throws:
      java.io.IOException
    • getLoaderComplement

      public InterfaceIOType getLoaderComplement()
      Description copied from class: FileWriter
      Returns the InterfaceIOType of a FileLoader which 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 null if no complement is defined.

      Overrides:
      getLoaderComplement in class FileWriter
      Returns: