Enum Class SliceOrder
- All Implemented Interfaces:
Serializable
,Comparable<SliceOrder>
,Constable
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 ConstantDescriptionInterleaved 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 TypeMethodDescriptionstatic 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 thisSliceOrder
.static void
Run a self-test on the SliceOrder class.toString()
Returns a string describing this SliceOrder.static SliceOrder
Returns the enum constant of this class with the specified name.static SliceOrder[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNSET
Unset timing pattern. -
SEQ_INC
Sequential slice aquisition, increasing time with slice number. -
SEQ_DEC
Sequential slice aquisition, decreasing time with slice number. -
ALT_INC
Interleaved slice aquisition, increasing time with slice number. -
ALT_DEC
Interleaved slice aquisition, decreasing time with slice number. -
ALT_INC2
Interleaved slice aquisition, increasing time with slice number. -
ALT_DEC2
Interleaved slice aquisition, decreasing time with slice number.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getInstance
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
Returns a string describing this SliceOrder.- Overrides:
toString
in classEnum<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 thisSliceOrder
. 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
Run a self-test on the SliceOrder class.- Parameters:
args
- ignored.
-