edu.ucla.stat.SOCR.analyses.command.volume
Class Volume_1Sample_T_test

java.lang.Object
  extended by edu.ucla.stat.SOCR.analyses.command.volume.Volume_1Sample_T_test

public class Volume_1Sample_T_test
extends java.lang.Object


Constructor Summary
Volume_1Sample_T_test()
           
 
Method Summary
static double[] getNextInputDataBuffer(int data_type, int xLength, int flush)
          This method READS IN a bufferSize chunk of all input volumes and returns it as a double[]
static void main(java.lang.String[] args)
           
static void putNextOutputDataBuffer()
          This method WRITES OUT bufferSize chunks of background (trivial) values for all output volumes
static void putNextOutputDataBuffer(float tStat, float pValue)
          This method WRITES OUT bufferSize chunks of t-stats and p-values for all output volumes
static void setByteOrder(javax.imageio.stream.MemoryCacheImageInputStream dis, java.lang.String byteorder)
          This method sets the Bite-Order for a MemoryCacheImageInputStream
static void setByteOrder(javax.imageio.stream.MemoryCacheImageOutputStream dos, java.lang.String byteorder)
          This method sets the Bite-Order for a MemoryCacheImageOutputStream
static void skipNextInputDataBuffer(int data_type, int xLength)
          This method SKIPS in reading data from the bufferSize chunk of all input volumes
static double swap(double value)
          Byte swap a single DOUBLE value.
static float swap(float value)
          Byte swap a single FLOAT value.
static int swap(int value)
          Byte swap a single INTEGER value.
static long swap(long value)
          Byte swap a single LONG INTEGER value.
static short swap(short value)
          Byte swap a single SHORT INT value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Volume_1Sample_T_test

public Volume_1Sample_T_test()
Method Detail

main

public static void main(java.lang.String[] args)

setByteOrder

public static void setByteOrder(javax.imageio.stream.MemoryCacheImageInputStream dis,
                                java.lang.String byteorder)
This method sets the Bite-Order for a MemoryCacheImageInputStream

Parameters:
dis - - MemoryCacheImageInputStream
byteorder - - String representation of byteorder. Options are big (java.nio.ByteOrder.BIG_ENDIAN) little (java.nio.ByteOrder.LITTLE_ENDIAN) system (default system byteorder, java.nio.ByteOrder.nativeOrder())

setByteOrder

public static void setByteOrder(javax.imageio.stream.MemoryCacheImageOutputStream dos,
                                java.lang.String byteorder)
This method sets the Bite-Order for a MemoryCacheImageOutputStream

Parameters:
dis - - MemoryCacheImageOutputStream
byteorder - - String representation of byteorder. Options are big (java.nio.ByteOrder.BIG_ENDIAN) little (java.nio.ByteOrder.LITTLE_ENDIAN) system (default system byteorder, java.nio.ByteOrder.nativeOrder())

getNextInputDataBuffer

public static double[] getNextInputDataBuffer(int data_type,
                                              int xLength,
                                              int flush)
This method READS IN a bufferSize chunk of all input volumes and returns it as a double[]

Parameters:
data_type - - type of the input data
xLength - - number of volumes/subjects in the second-column (file-names) in the Design-matrix
flush - - variable indicating whether the buffer should be flushed as the stream keeps in memory all the data it has read from disk. This will free up memory, but too frequent calls (flush==true) will slow down the process!

putNextOutputDataBuffer

public static void putNextOutputDataBuffer(float tStat,
                                           float pValue)
This method WRITES OUT bufferSize chunks of t-stats and p-values for all output volumes

Parameters:
tStat - t-statistics
pValue - - p-value

putNextOutputDataBuffer

public static void putNextOutputDataBuffer()
This method WRITES OUT bufferSize chunks of background (trivial) values for all output volumes


skipNextInputDataBuffer

public static void skipNextInputDataBuffer(int data_type,
                                           int xLength)
This method SKIPS in reading data from the bufferSize chunk of all input volumes

Parameters:
data_type - - type of the input data
xLength - - number of volumes/subjects in the second-column (file-names) in the Design-matrix

swap

public static short swap(short value)
Byte swap a single SHORT INT value.

Parameters:
value - Value to byte swap.
Returns:
Byte swapped representation.

swap

public static int swap(int value)
Byte swap a single INTEGER value.

Parameters:
value - Value to byte swap.
Returns:
Byte swapped representation.

swap

public static long swap(long value)
Byte swap a single LONG INTEGER value.

Parameters:
value - Value to byte swap.
Returns:
Byte swapped representation.

swap

public static float swap(float value)
Byte swap a single FLOAT value.

Parameters:
value - Value to byte swap.
Returns:
Byte swapped representation.

swap

public static double swap(double value)
Byte swap a single DOUBLE value.

Parameters:
value - Value to byte swap.
Returns:
Byte swapped representation.