edu.jhu.ece.iacl.algorithms.dti
Class GradientTable

java.lang.Object
  extended by edu.jhu.ece.iacl.algorithms.dti.GradientTable

public class GradientTable
extends java.lang.Object

The GradientTable class represents a GradientTable used for DWMRI as a 2D double array. It provides functionality for reading and writing String representations of gradient tables in various common formats.

Author:
John Bogovic

Constructor Summary
GradientTable()
          Default constructor.
GradientTable(double[][] table)
          Constructor that accepts a double array representation.
 
Method Summary
 GradientTable append(GradientTable appendme)
          Appends an input Gradient Table to this object.
 double[][] getTable()
          This get method returns this object's gradient table.
 java.lang.String getTableType()
          This get method returns this object's table type.
 double[][] readTable(java.io.File f)
          Reads a Gradient table from a text file.
 java.lang.String toArrayTxt()
          Writes the Gradient Table simply to a text file.
 java.lang.String toCaminoTable(java.lang.String bval)
          Writes the Gradient Table to a text file in Camino's expected format.
 java.lang.String toDtisTable()
          Writes the Gradient Table to a text file in DTIStudio's expected format.
 java.lang.String toFslTable()
          Writes the Gradient Table to a text file in FSL's expected format.
 java.lang.String toMedINRIATable()
          Writes the Gradient Table to a text file in MedINRIA's expected format.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GradientTable

public GradientTable()
Default constructor.


GradientTable

public GradientTable(double[][] table)
Constructor that accepts a double array representation.

Method Detail

getTable

public double[][] getTable()
This get method returns this object's gradient table.

Returns:
This objects double array

getTableType

public java.lang.String getTableType()
This get method returns this object's table type.

Returns:
This objects double array

toArrayTxt

public java.lang.String toArrayTxt()
Writes the Gradient Table simply to a text file.

Returns:
A String representation of the Gradient Table.

toDtisTable

public java.lang.String toDtisTable()
Writes the Gradient Table to a text file in DTIStudio's expected format.

Returns:
A String representation of the Gradient Table.

toFslTable

public java.lang.String toFslTable()
Writes the Gradient Table to a text file in FSL's expected format.

Returns:
A String representation of the Gradient Table.

toCaminoTable

public java.lang.String toCaminoTable(java.lang.String bval)
Writes the Gradient Table to a text file in Camino's expected format.

Returns:
A String representation of the Gradient Table.

toMedINRIATable

public java.lang.String toMedINRIATable()
Writes the Gradient Table to a text file in MedINRIA's expected format.

Returns:
A String representation of the Gradient Table.

readTable

public double[][] readTable(java.io.File f)
Reads a Gradient table from a text file. Detects the format on the fly.

Parameters:
The - file (ASCII) to be read.
Returns:
A double array representation of the Gradient Table.

append

public GradientTable append(GradientTable appendme)
Appends an input Gradient Table to this object.

Parameters:
The - Gradient Table to be appended.
Returns:
The result of appending the input Gradient Table to this Gradient Table.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object