% load a VOI object xvoi = xff('*.voi'); % potentially edit it, e.g. remove voxels that are not medial enough xvoi.VOI.Voxels(abs(xvoi.VOI.Voxels(:, 1)) > 10, :) = []; xvoi.VOI.NrOfVoxels = size(xvoi.VOI.Voxels, 1); % maybe rename the VOI for later use xvoi.VOI.Name = 'dmPFC_E_vs_P'; % and save again xvoi.Save;