|
From: <kin...@us...> - 2004-03-07 01:04:48
|
Update of /cvsroot/teem/teem/src/ten In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17843 Modified Files: epireg.c Log Message: changed tweaking heuristic in automatic threshold detection Index: epireg.c =================================================================== RCS file: /cvsroot/teem/teem/src/ten/epireg.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** epireg.c 27 Feb 2004 10:23:56 -0000 1.25 --- epireg.c 7 Mar 2004 00:49:06 -0000 1.26 *************** *** 191,195 **** int ! _tenEpiRegFindThresh(float *DWthrP, Nrrd **nin, int ninLen) { char me[]="_tenEpiRegFindThresh", err[AIR_STRLEN_MED]; Nrrd *nhist, *ntmp; --- 191,195 ---- int ! _tenEpiRegFindThresh(float *DWthrP, Nrrd **nin, int ninLen, int save) { char me[]="_tenEpiRegFindThresh", err[AIR_STRLEN_MED]; Nrrd *nhist, *ntmp; *************** *** 232,236 **** } } ! if (_tenFindValley(DWthrP, nhist, 0.85)) { sprintf(err, "%s: problem finding DWI histogram valley", me); biffAdd(TEN, err); airMopError(mop); return 1; --- 232,239 ---- } } ! if (save) { ! nrrdSave("regtmp-dwihist.nrrd", nhist, NULL); ! } ! if (_tenFindValley(DWthrP, nhist, 0.65, save)) { sprintf(err, "%s: problem finding DWI histogram valley", me); biffAdd(TEN, err); airMopError(mop); return 1; *************** *** 244,248 **** int _tenEpiRegThreshold(Nrrd **nthresh, Nrrd **nblur, int ninLen, ! float DWthr, int verb) { char me[]="_tenEpiRegThreshold", err[AIR_STRLEN_MED]; airArray *mop; --- 247,251 ---- int _tenEpiRegThreshold(Nrrd **nthresh, Nrrd **nblur, int ninLen, ! float DWthr, int verb, int progress) { char me[]="_tenEpiRegThreshold", err[AIR_STRLEN_MED]; airArray *mop; *************** *** 252,256 **** if (!( AIR_EXISTS(DWthr) )) { ! if (_tenEpiRegFindThresh(&DWthr, nblur, ninLen)) { sprintf(err, "%s: trouble with automatic threshold determination", me); biffAdd(TEN, err); return 1; --- 255,259 ---- if (!( AIR_EXISTS(DWthr) )) { ! if (_tenEpiRegFindThresh(&DWthr, nblur, ninLen, progress)) { sprintf(err, "%s: trouble with automatic threshold determination", me); biffAdd(TEN, err); return 1; *************** *** 932,936 **** /* ------ threshold */ if (_tenEpiRegThreshold(nbuffB, nbuffA, ninLen, ! DWthr, verbose)) { sprintf(err, "%s: trouble thresholding", me); biffAdd(TEN, err); airMopError(mop); return 1; --- 935,939 ---- /* ------ threshold */ if (_tenEpiRegThreshold(nbuffB, nbuffA, ninLen, ! DWthr, verbose, progress)) { sprintf(err, "%s: trouble thresholding", me); biffAdd(TEN, err); airMopError(mop); return 1; |