Mercurial > hg > minc-tools
changeset 599:f8dd52072e18
Made some changes to better handle multiple echos.
author | neelin <neelin> |
---|---|
date | Mon, 19 Sep 1994 10:48:30 +0000 |
parents | 2d6b502ad559 |
children | b0cd110dc9e5 |
files | conversion/mri_to_minc/mri_to_minc.pl |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/conversion/mri_to_minc/mri_to_minc.pl +++ b/conversion/mri_to_minc/mri_to_minc.pl @@ -281,7 +281,7 @@ $| = 1; open(MINC, "|-") || exec ("rawtominc", $mincfile, $nslices, $nrows, $ncols, "-noclobber", - "-scan_range", "-short", "-obyte", $orientation, + "-scan_range", "-short", "-range", "0", "4095", $orientation, "-xstep", $xstep, "-ystep", $ystep, "-zstep", $zstep, "-xstart", $xstart, "-ystart", $ystart, "-zstart", $zstart, "-mri", @@ -433,6 +433,9 @@ # Loop through echos @echos = sort(numeric_order keys(%echo_list)); + if (scalar(@echos) > $mincinfo{'numechos'}) { + $mincinfo{'numechos'} = scalar(@echos); + } foreach $echo (@echos) { # Create minc file @@ -441,7 +444,7 @@ $patient_name =~ tr/A-Z/a-z/; $mincfile = "$outputdir/".$patient_name."_". $mincinfo{'exam'}."_".$mincinfo{'series'}; - if (scalar(@echos) > 1) { + if ($mincinfo{'numechos'} > 1) { $mincfile .= "_e$echo"; } $mincfile .= "_mri.mnc";