nifreeze.data.pet module

PET data representation.

class nifreeze.data.pet.PET(self, dataobj=None, affine=None, brainmask=None, frame_time=None, total_duration=None, em_affines=None, filepath=NOTHING) None[source]

Bases: object

Data representation structure for PET data.

Method generated by attrs for class PET.

__len__()[source]

Obtain the number of high-b orientations.

affine

Best affine for RAS-to-voxel conversion of coordinates (NIfTI header).

brainmask

A boolean ndarray object containing a corresponding brainmask.

dataobj

A numpy ndarray object for the data array, without b=0 volumes.

em_affines

List of nitransforms.linear.Affine objects that bring PET timepoints into alignment.

frame_time

A 1D numpy array with the midpoint timing of each sample.

classmethod from_filename(filename)[source]

Read an HDF5 file from disk.

set_transform(index, affine, order=3)[source]

Set an affine, and update data object and gradients.

to_filename(filename, compression=None, compression_opts=None)[source]

Write an HDF5 file to disk.

to_nifti(filename, *_)[source]

Write a NIfTI 1.0 file to disk.

total_duration

A float number representing the total duration of acquisition.

nifreeze.data.pet.load(filename, brainmask_file=None, frame_time=None, frame_duration=None)[source]

Load PET data.