Rick
That was a good suggestion, but it did not help. I have the debug statement:
fprintf (stdout, "RT_sub_brick_id is [%d, %d], data set has %d briks \n",
RT_sub_brick_id[0], RT_sub_brick_id[1],
rtin->dset[cc]->dblk->nvals);
in my code, and I get the output:
RT_sub_brick_id is [1, 4], data set has 5 briks
RT: update with 5 bricks in channel 01 to AFNI[A]
RT_sub_brick_id is [1, 5], data set has 6 briks
RT: update with 6 bricks in channel 01 to AFNI[A]
RT_sub_brick_id is [1, 6], data set has 7 briks
RT: update with 7 bricks in channel 01 to AFNI[A]
RT_sub_brick_id is [1, 7], data set has 8 briks
RT: update with 8 bricks in channel 01 to AFNI[A]
It looks like I am keeping within the bounds of the acquired data for this dataset, but still nothing is hitting the disk. I even put in an ISVALID_3DIM_DATASET to check the copied sub-brick, and it seems to be valid (i.e. the ISVALID.... check does not throw an error).
After the data set is copied, I edit the prefix and label1 with EDIT_dset_items, before I call DSET_overwrite to dump it to disk. Is something missing in between there ?
thanks again for all your help with this ...
cheers
vinai