App-AFNI-SiemensPhysio
view release on metacpan or search on metacpan
lib/App/AFNI/SiemensPhysio.pm view on Meta::CPAN
say $matlabwrap if $runtype !~ /matlab|McRetroTs/i;
# eg
# matlab -nodisplay -r "try; Opts.Cardfile='rest_164627.359000.puls.dat'; Opts.VolTR=1.5; Opts.Nslices=29; Opts.SliceOrder='alt+z'; Opts.PhysFS=50.0074711455304; Opts.Respfile='rest_164627.359000.resp.dat'; rts = RetroTS(Opts); catch; exit(666); end...
# with either command, the original output name will be "oba.slibase.1D"
# change that to our basename (assume resp and puls have same basename, use one from resp)
my $outputname = $self->{dat}->{resp};
$outputname =~ s/.resp.dat$/.slibase.1D/;
# or rename to specified input
#my $outputname=shift if $#_;
my $runcmd="";
if($runtype =~ /matlab/i){
$runcmd=$matlabwrap
}elsif($runtype =~ /McRetroTs/i){
$runcmd=$mccmd;
}
system($runcmd) if $runcmd;
if( $runcmd && ! -e "oba.slibase.1D" ){
croak "failed to run $runcmd";
} else {
# move file to output name if told to
rename "oba.slibase.1D", $outputname if $outputname;
}
}
#################
#### helpers ####
#################
( run in 0.218 second using v1.01-cache-2.11-cpan-b888b73be4d )