com.xinapse.multisliceimage.Analyze
Enum SliceOrder

java.lang.Object
  extended by java.lang.Enum<SliceOrder>
      extended by com.xinapse.multisliceimage.Analyze.SliceOrder
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SliceOrder>

public enum SliceOrder
extends java.lang.Enum<SliceOrder>

This class represents the timing pattern of the slice acquisition.


Enum Constant Summary
ALT_DEC
          Interleaved slice aquisition, decreasing time with slice number.
ALT_INC
          Interleaved slice aquisition, increasing time with slice number.
SEQ_DEC
          Sequential slice aquisition, decreasing time with slice number.
SEQ_INC
          Sequential slice aquisition, increasing time with slice number.
UNSET
          Unset timing pattern.
 
Method Summary
static SliceOrder getInstance(java.lang.String s)
          Returns an SliceOrder corresponding to String value.
 float getTimeShift(float TR, int slice, int nSlices)
          Calculates the time difference (in seconds) between the acquisition of the first slice and the given slice, for this SliceOrder.
static void main(java.lang.String[] args)
          Run a self-test on the SliceOrder class.
 java.lang.String toString()
          Returns a string describing this SliceOrder.
static SliceOrder valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SliceOrder[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNSET

public static final SliceOrder UNSET
Unset timing pattern.


SEQ_INC

public static final SliceOrder SEQ_INC
Sequential slice aquisition, increasing time with slice number.


SEQ_DEC

public static final SliceOrder SEQ_DEC
Sequential slice aquisition, decreasing time with slice number.


ALT_INC

public static final SliceOrder ALT_INC
Interleaved slice aquisition, increasing time with slice number.


ALT_DEC

public static final SliceOrder ALT_DEC
Interleaved slice aquisition, decreasing time with slice number.

Method Detail

values

public static SliceOrder[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SliceOrder c : SliceOrder.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SliceOrder valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getInstance

public static SliceOrder getInstance(java.lang.String s)
                              throws com.xinapse.util.InvalidArgumentException
Returns an SliceOrder corresponding to String value.

Parameters:
s - the String from which the slice order code will be interpreted.
Returns:
an SliceOrder corresponding to the supplied String.
Throws:
com.xinapse.util.InvalidArgumentException - if the supplied String does not convert to a SliceOrder.

toString

public java.lang.String toString()
Returns a string describing this SliceOrder.

Overrides:
toString in class java.lang.Enum<SliceOrder>
Returns:
a string describing this SliceOrder.

getTimeShift

public float getTimeShift(float TR,
                          int slice,
                          int nSlices)
Calculates the time difference (in seconds) between the acquisition of the first slice and the given slice, for this SliceOrder. The slice zero is assumed to be the first slice in the block.

Parameters:
TR - the scan repetition time, in seconds.
slice - the slice number in the block.
nSlices - the number of slices in the block.

main

public static void main(java.lang.String[] args)
Run a self-test on the SliceOrder class.

Parameters:
args - ignored.


Copyright 2006-2011 Xinapse Systems Limited. All Rights Reserved.