The common input parameters of this function are:
- TACsfile: Path to .txt file containing the TACs to be analyzed. This file must be organized as follows. The first row must contain the mid-times of each frame. The following rows are organized in pairs, each pair corresponding to a different PET study. The first row of each pair contains the TACs of the reference region. The second row in the pair contains the TAC of the region of interest of the same PET study.
- TimeTable: Path to a .txt file containing the start and end times for each frame.
- save_path: Path to a directory where the results will be saved. If the path is "d", the current directory will be used.
- model: A string indicating the name of the selected model. Throughout this manual, the new model bo be included will be called "newModel_Name".
- parameters: A vector containing the minimum information required to preprocess the selected model. Its length and values will depend on the model.
Near the end of the script we have written a few code lines and suggestions on the way to implement the new model step by step:
STEP 1: Include your model
STEP 2: Check input parameters
STEP 3: Call your own model function
- data: it contains the TACs loaded from the TACsfile input file.
- num_sim: it is the number of studies to preprocess.
- times: it contains the start and end times of each frame of the studies to preprocess, in a n by 2 matrix (n being the number of frames of the PET studies). It is loaded from the "TimeTable" input parameter.
Furthermore you have to create a new variable to save the results of the preprocess: results_model_matrix. This variable will contain one row for each study to be preprocessed and one column for each parameter the model returns. Two additional columns are required to include the mean square error and the correlation coefficient obtained from the fit.
The implementation of the new model will be included, as previously mentioned, in a new Matlab function QModeling_newModel_Name. Each time a study is preprocessed, the main program will call this function with the following input parameters:
- the target and reference TACs: Ct, Cr. Both of them are column vectors.
- the times: The same times matrix described in the input parameters list for QModeling_preprocessTACs.m
- the input parameters the model needs from the user.
The time of execution will be controlled by the tic-toc commands of Matlab.