Enum Class SliceOrder

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

public enum SliceOrder extends Enum<SliceOrder>
This class represents the timing pattern of the slice acquisition.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Interleaved slice aquisition, decreasing time with slice number.
    Interleaved slice aquisition, decreasing time with slice number.
    Interleaved slice aquisition, increasing time with slice number.
    Interleaved slice aquisition, increasing time with slice number.
    Sequential slice aquisition, decreasing time with slice number.
    Sequential slice aquisition, increasing time with slice number.
    Unset timing pattern.
  • Method Summary

    Modifier and Type
    Method
    Description
    static SliceOrder
    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(String[] args)
    Run a self-test on the SliceOrder class.
    Returns a string describing this SliceOrder.
    static SliceOrder
    Returns the enum constant of this class with the specified name.
    static SliceOrder[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • 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.
    • ALT_INC2

      public static final SliceOrder ALT_INC2
      Interleaved slice aquisition, increasing time with slice number.
    • ALT_DEC2

      public static final SliceOrder ALT_DEC2
      Interleaved slice aquisition, decreasing time with slice number.
  • Method Details

    • values

      public static SliceOrder[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SliceOrder valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getInstance

      public static SliceOrder getInstance(String s) throws 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:
      InvalidArgumentException - if the supplied String does not convert to a SliceOrder.
    • toString

      public String toString()
      Returns a string describing this SliceOrder.
      Overrides:
      toString in class 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.
      Returns:
      the time difference (in seconds) between the acquisition of the first slice and the given slice.
    • main

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