Skip to content
Snippets Groups Projects
Commit 0aece25e authored by Stephen Smith's avatar Stephen Smith
Browse files

Checked in prior to CVS conversion

parent eb2a5683
No related branches found
No related tags found
No related merge requests found
#include <math.h>
#include <iostream> #include <iostream>
#include <string> #include <string>
#include "newimageall.h" #include "newimageall.h"
...@@ -76,13 +77,14 @@ int main(int argc, char *argv[]) ...@@ -76,13 +77,14 @@ int main(int argc, char *argv[])
int ival1 = (int) *(cptr+1); int ival1 = (int) *(cptr+1);
int ival2 = (int) *(cptr+2); int ival2 = (int) *(cptr+2);
int ival3 = (int) *(cptr+3); int ival3 = (int) *(cptr+3);
if ( (ival3==0) && ( (ival0!=0) || (ival1!=0) || (ival2!=0) ) )
if ( ( (ival3==0) && ( (ival0!=0) || (ival1!=0) || (ival2!=0) ) ) ||
(ival3<-125) )
{ {
badcount++; badcount++;
if (verbose) { if (verbose) {
cerr << "BAD VALUE DETECTED - fixing it" << endl; cerr << "BAD VALUE DETECTED - fixing it" << endl;
dump_float((float *) cptr); cerr << endl; dump_float((float *) cptr); cerr << endl;
// cerr << " value = " << vol1(x,y,z,t) << endl;
} }
*(cptr+0) = 0; *(cptr+0) = 0;
*(cptr+1) = 0; *(cptr+1) = 0;
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
/* avwmerge.c - concatenate AVW files into a single output /* avwmerge.c - concatenate AVW files into a single output
Steve Smith and David Flitney, FMRIB Image Analysis Group Steve Smith, David Flitney and Stuart Clare, FMRIB Image Analysis Group
Copyright (C) 2000-2001 University of Oxford */ Copyright (C) 2000-2002 University of Oxford */
/* CCOPYRIGHT */ /* CCOPYRIGHT */
...@@ -29,6 +29,7 @@ void usage() ...@@ -29,6 +29,7 @@ void usage()
printf("-x : concatenate images in the x direction\n"); printf("-x : concatenate images in the x direction\n");
printf("-y : concatenate images in the y direction\n"); printf("-y : concatenate images in the y direction\n");
printf("-z : concatenate images in the z direction\n\n"); printf("-z : concatenate images in the z direction\n\n");
printf("-a : auto-choose: single slices -> volume, volumes -> 4D (time series)\n\n");
exit(1); exit(1);
} }
...@@ -88,7 +89,7 @@ for(i = 0; i < argc-3; i++) ...@@ -88,7 +89,7 @@ for(i = 0; i < argc-3; i++)
bpp = AvwGetDataType(src, &t) / 8; bpp = AvwGetDataType(src, &t) / 8;
V=v[0]; X=x[0]; Y=y[0]; Z=z[0]; V=v[0]; X=x[0]; Y=y[0]; Z=z[0];
if(direction==4){ if(direction==4){
if((z[0]==0)&&(v[0]==0))direction=3; if((z[0]<2)&&(v[0]<2))direction=3;
else direction=0; else direction=0;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment