From 8a0f28d73ea96fa55620111d758a4713be1d698e Mon Sep 17 00:00:00 2001 From: Douglas Greve Date: Wed, 21 Apr 2021 13:44:44 -0400 Subject: [PATCH] mri_coreg.cpp. #NF. Now the subject in the LTA output from --par2mat can be set with --s --- mri_coreg/mri_coreg.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mri_coreg/mri_coreg.cpp b/mri_coreg/mri_coreg.cpp index fe93ee76053..60b399eaa47 100644 --- a/mri_coreg/mri_coreg.cpp +++ b/mri_coreg/mri_coreg.cpp @@ -729,6 +729,8 @@ static int parse_commandline(int argc, char **argv) { MATRIX *T = TranformAffineParams2Matrix(par, NULL); MatrixInverse(T,T); LTA *lta = LTAcreate(mrisrc, mritarg, T, LINEAR_RAS_TO_RAS); + if(cmdargs->subject) strncpy(lta->subject,cmdargs->subject,sizeof(lta->subject)-1); + else strncpy(lta->subject,"unknown", sizeof(lta->subject)-1); int err = LTAwrite(lta,pargv[14]); MRIfree(&mrisrc); MRIfree(&mritarg); @@ -917,6 +919,7 @@ static void print_usage(void) { printf(" --mat2par reg.lta : extract parameters out of registration\n"); printf(" --mat2rot reg.lta rotreg.lta: convert registration to a pure rotation\n"); printf(" --par2mat par1-par12 srcvol trgvol reg.lta : convert parameters to a registration\n"); + printf(" the subject in the output reg.lta can be set with --s before --par2mat\n"); printf(" --rms radius filename reg1 reg2 : compute RMS diff between two registrations using MJ's method (rad ~= 50mm)\n"); printf(" The rms will be written to filename; if filename == nofile, then no file is created\n"); printf(" --movout movout volume : save the mov after all preprocessing\n");