Skip to content

Commit 891089f

Browse files
committed
mris_convert - bug fix
instead of MRIScopyMRI(), MRIcopyMRIS() should be called to copy the data from the given field of an MRI_SURFACE struct into a given frame of an MRI_VOLUME struct
1 parent 3e23f3f commit 891089f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

mris_convert/mris_convert.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -465,13 +465,12 @@ main(int argc, char *argv[])
465465
mris->vg.valid = 0;
466466
}
467467

468-
// ??? should we call MRIcopyMRIS() instead ???
469468
if(MRISfileNameType(out_fname) == MRIS_VOLUME_FILE) {
470469
printf("Saving surface xyz %s as a volume format\n",out_fname);
471470
MRI *vol = MRIallocSequence(mris->nvertices, 1, 1, MRI_FLOAT, 3);
472-
MRIScopyMRI(mris,vol,0,"x");
473-
MRIScopyMRI(mris,vol,1,"y");
474-
MRIScopyMRI(mris,vol,2,"z");
471+
MRIcopyMRIS(vol,mris,0,"x");
472+
MRIcopyMRIS(vol,mris,1,"y");
473+
MRIcopyMRIS(vol,mris,2,"z");
475474
MRIwrite(vol,out_fname);
476475
MRIfree(&vol);
477476
}

0 commit comments

Comments
 (0)