DFT scripts#
- read_dft_0_7_0(filename, mid)#
Reads dft-file TAC curves info data structure
- parameters:
filename full name of dft-file
- mid(midframe) Y/N (The function assumes that frame times in the DFT file are in two columns,
if not so put ‘Y’ option. Be sure of input frame time format!!!)
- returns:
TACs matrix containing TAC curves in its rows times frame times, 1st time is 1st frames start and last time is last frames end time names names of ROIs
volumes volumes of ROIs in voxels
(weights) (if exist) precalculated weight from original DFT file
version 0.2.0,04-05-2005,Harri Merisaari, created version 0.3.0,19-12-2006,Harri Merisaari, included ROI sizes, added file version 0.4.0,19-12-2007,Marco Bucci, included weight and mid frame DFT support version 0.5.0,27-01-2008,Marco Bucci, added tmid frame times output WARNING: The output order has been changed! version 0.5.1,05-09-2008,Marco Bucci, skip point condition (#) corrected version 0.5.2,23-10-2008,Harri Merisaari, fixed reading of 2nd line version 0.6.0,05-11-2008,Marco Bucci, fix error in tmid creation in skip time condition version 0.7.0,18-11-2008,Marco Bucci, fix error with only one frame dft
Copyright (c) 2005,2006 by Turku PET Centre
- tmid_calc_0_2_0(Time)#
Calculate Mid frame time column (Optionally Time frame duration)
- parameters:
- Time Matrix with size (n,2)
n = frame number 2 = start frame time and end frame time (each row)
- returns:
tmid Mid frame time (vector)
(FrameDur) Time frame duration (vector)
version 0.1.0,26-01-2008,Marco Bucci, created version 0.2.0,05-11-2008,Marco Bucci, edited - It handles a discontinuous framing
Ex. (When a comment # is placed in the dft)
Copyright (c) 2007,2008 by Turku PET Centre
- write_dft_0_1_1(TACs, times, names, volumes, filename, petname, uunit, timeunit)#
write_dft_0_1_0(TACs, times, names, volumes, filename, petname[,uunit,timeunit])
Writes dft-file TAC curves info data structure
- parameters:
TACs matrix containing TAC curves in its rows times frame times, 1st time is 1st frames start and last time is last frames end time names names of ROIs
volumes volumes of ROIs in voxels filename full name of dft-file petname name of related PET image uunit unit of the TAC values (kBq/mL or cps or whatever), default == ‘kBq/ml’ timeunit time unit, default == ‘min’
version 0.0.1, 08-01-2007, Harri Merisaari, created version 0.0.2, 23-10-2008, Harri Merisaari, fixed bug with lst end-time writing should now support writing of only single time column version 0.0.3, 24-01-2011, Jarkko Johansson, added units writing version 0.0.4, 21.5.2012, Harri Merisaari, added default unit, fixed help version 0.0.5, 21.5.2012, Harri Merisaari, added time unit option, fixed ‘Time’ if there is only ony time column, fixed typo in help version 0.1.0, 18.3.2014, Marco Bucci and Mueez U Din, now compatible with notepad, now prints “.” on second line if no roi name suffixes. version 0.1.1, 25.5.2015, Jouni Tuisku, now writing negative TAC values (e.g. FBP) correctly. Copyright (c) 2007,2008,2011-2015 by Turku PET Centre