First, let us open the MINC file:

Now, we may wish to find out some basic data about the MINC file. Try the following (note that we will need nf, the number of frames, below):handle = openimage ('examples/yates_19445.mnc');

Note that for the study yates_19445, nf will be 21. However, it is a good idea to always use getimageinfo to find the number of frames rather than assuming that it will always stay the same for a particular type of study.ns = getimageinfo (handle, 'NumSlices') nf = getimageinfo (handle, 'NumFrames') getimageinfo (handle, 'ImageSize')

Now, let us read in the frame lengths and mid-frame times:

Note that FrameLengths and MidFTimes are both column vectors. This will be important when performing matrix arithmetic with them.FrameLengths = getimageinfo (handle, 'FrameLengths'); MidFTimes = getimageinfo (handle, 'MidFrameTimes');

Now, we read in all frames for one slice-slice 8 in this case, although you can work with whatever slice you like:

Note thatslice = 8; PET = getimages (handle, slice, 1:nf);

wolforth@pet.mni.mcgill.ca