Home | Trees | Indices | Help |
|
---|
|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
filetypes =
Typecodes of all supported NIfTI image formats. |
|||
N2nifti_dtype_map =
Mapping of NumPy datatypes to NIfTI datatypes. |
|||
nifti2numpy_dtype_map =
Mapping of NIfTI to NumPy datatypes (necessary for handling memory mapped array with proper byte-order handling. |
|||
nifti_xform_map =
|
Imports: N, nifticlib
|
Translates a time 't' into a volume number. By default function returns the volume number that is closest in time. Volumes are assumed to be recorded exactly (and completely) after tr/2, e.g. if 'tr' is 2 secs the first volume is recorded at exactly one second. 't' might be a single value, a sequence or an array. The repetition 'tr' might be specified directly, but can also be a NiftiImage object. In the latter case the value of 'tr' is determined from the 'rtime' property of the NiftiImage object. 't' and 'tr' can be given in an arbitrary unit (but both have to be in the same unit). The 'lag' argument can be used to shift the times by constant offset. Please note that numpy.round() is used to round to interger value (rounds to even numbers). The 'decimals' argument will be passed to numpy.round(). |
Apply a function on selected volumes of a timeseries. 'ts' is a 4d timeseries. It can be a NiftiImage or a ndarray. In case of a ndarray one has to make sure that the time is on the first axis. 'ts' can actually be of any dimensionality, but datasets aka volumes are assumed to be along the first axis. 'vols' is either a sequence of sequences or a 2d array indicating which volumes fx should be applied to. Each row defines a set of volumes. 'fx' is a callable function to get an array of the selected volumes as argument. Additonal arguments may be specified as keyword arguments and are passed to 'fx'. The output will be a 4d array with one computed volume per row in the 'vols' array. |
Returns 4d array with peristimulus timeseries. Parameters: ts - source 4d timeseries onsetvols - sequence of onsetvolumes to be averaged over nvols - length of the peristimulus timeseries in volumes (starting from onsetvol) fx - function to be applied to the list of corresponding volumes. Typically this will be mean(), so it is default, but it could also be var() or something different. The supplied function is to be able to handle an 'axis=0' argument similiar to NumPy's mean(), var(), ... |
Convert a NIfTI header struct into a python dictionary. While most elements of the header struct will be translated 1:1 some (e.g. sform matrix) are converted into more convenient datatypes (i.e. 4x4 matrix instead of 16 separate values).
Parameters: nhdr: nifti_1_header |
Update a NIfTI header struct with data from a dictionary. The supplied dictionary might contain additonal data elements that do not match any nifti header element. These are silently ignored. Several checks are performed to ensure validity of the resulting nifti header struct. If any check fails a ValueError exception will be thrown. However, some tests are still missing.
|
|
|
filetypesTypecodes of all supported NIfTI image formats.
|
N2nifti_dtype_mapMapping of NumPy datatypes to NIfTI datatypes.
|
nifti2numpy_dtype_mapMapping of NIfTI to NumPy datatypes (necessary for handling memory mapped array with proper byte-order handling.
|
nifti_xform_map
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Oct 17 15:19:35 2008 | http://epydoc.sourceforge.net |