RCBF Analysis using MATLAB and EMMAEdit
Two-compartment regional cerebral blood flow (RCBF) analysis is very easy to perform using MATLAB and the EMMA toolkit. The rcbfanalysis function allows the specification of the MINC file containing the study to analyze, the name of the MINC file to write the K1 images to, the name of the MINC file to write the V0 image to, and the slices to analyze. Warning: if the K1 file or V0 file already exist, they will be overwritten, destroying any data that they may contain. Therefore, to analyze the dynamic PET data stored in the file /local/matlab/toolbox/emma/examples/yates_19445.mnc, and produce both a K1 image and a V0 image for all 15 slices, we would specify:
rcbfanalysis('/local/matlab/toolbox/emma/examples/yates_19445.mnc',... 'yates_K1.mnc', 'yates_V0.mnc', 1:15);
The resulting files yates_K1.mnc and yates_V0.mnc will be written in the current directory.
If only a K1 image is desired, we can specify an empty matrix for the name of the V0 file:
rcbfanalysis('/local/matlab/toolbox/emma/examples/yates_19445.mnc',... 'yates_K1.mnc', , 1:15);
The same is true if we only want a V0 image file produced:
rcbfanalysis('/local/matlab/toolbox/emma/examples/yates_19445.mnc',... , 'yates_V0.mnc', 1:15);
Layers of the OnionEdit
The rcbfanalysis function performs its analysis by calling the EMMA rcbf2 function. This function may also be called by the user, if it is more convenient to get the K1, k2, or V0 images without having to produce MINC files for them. The rcbf2 function is very easy to use. Simply specify the name of the MINC file containing the study to analyze, and the slice numbers to analyze. The function returns the K1, k2, and V0 images, as well as the blood delay correction for each slice analyzed:
[K1,k2,V0,delta] = rcbf2(... '/local/matlab/toolbox/emma/examples/yates_19445.mnc',8);
This call to rcbf2 will analyze slice eight of the yates_19445 study, producing K1, k2, and V0 images, as well as the calculated delta for this slice. The images returned are stored as EMMA standard vector images, and may be manipulated in the same way as any EMMA image.
One final point to consider. The study being analyzed must contain the blood data as well as the PET images. There are several programs that are capable of doing this, the most important of which is scxtominc, which creates MINC files from the Scanditronix format files produced by the PET scanner. This program has a -bloodfile option which allows the specification of a blood file whose data should be included in the final MINC file. The blood file specified must be in BNC (Blood netCDF) format, and is produced by the blood lab computer and written to $PC_BLOOD. A BNC file may also be created from a CNT file using the bloodtonc program. Assuming that we wish to create a MINC file from the raw images and the BNC file, we might specify a command line to scxtominc that looks like:
scxtominc -bloodfile $PC_BLOOD/soos_034157.bnc $PC_IMAGE/pcsoos______-dynamic___034157*.ima soos_34157.mnc
This creates a MINC file called soos_34157.mnc from the raw images and the BNC file.
It is also possible to include blood data in an existing MINC file using the includeblood program. Simply specify the name of the MINC file, and the name of the BNC file to include within it.