nifreeze.model.pet module

Models for nuclear imaging.

nifreeze.model.pet.DEFAULT_TIMEFRAME_MIDPOINT_TOL = 0.01

Time frame tolerance in seconds.

class nifreeze.model.pet.PETModel(self, timepoints=None, xlim=None, n_ctrl=None, order=3, **kwargs)[source]

Bases: BaseModel

A PET imaging realignment model based on B-Spline approximation.

Create the B-Spline interpolating matrix.

Parameters:

timepointslist

The timing (in sec) of each PET volume. E.g., [15.,   45.,   75.,  105.,  135.,  165.,  210.,  270.,  330., 420.,  540.,  750., 1050., 1350., 1650., 1950., 2250., 2550.]

n_ctrlint

Number of B-Spline control points. If None, then one control point every six timepoints will be used. The less control points, the smoother is the model.

fit(data, **kwargs)[source]

Fit the model.

property is_fitted
predict(index=None, **kwargs)[source]

Return the corrected volume using B-spline interpolation.