9#include "tpcclibConfig.h"
29static char *info[] = {
30 "Computation of parametric image of binding potential (BPnd) from",
31 "dynamic PET images in ECAT, NIfTI, or Analyze format applying simplified",
32 "reference tissue model (SRTM) [1]. The model is solved using the basis",
33 "function approach [2], similar to the RPM program.",
34 "Note that default limits for theta3 are suitable for [C-11]raclopride;",
35 "for other tracers the limits need to be set using command-line options."
37 "Dynamic PET image and reference region TAC must be corrected for decay.",
39 "Fit is always weighted (unless specific weighting options are used), either",
40 "based on the counts in SIF provided by user, or if SIF is not provided,",
41 "then weights are estimated based on the mean radioactivity concentration",
42 "in the dynamic image.",
44 "Usage: @P [Options] imgfile rtacfile bpfile [sif]",
48 " Programs computes also an R1 image.",
50 " Programs computes also a k2 image.",
51 " -min=<value (1/min)>",
52 " Set minimum value for theta3; it must be >= k2min/(1+BPmax)+lambda.",
53 " Default is 0.06 min-1. Lambda for F-18 is 0.0063 and for C-11 0.034.",
54 " -max=<value (1/min)>",
55 " Set maximum value for theta3; it must be <= k2max+lambda.",
56 " Default is 0.60 min-1.",
58 " Set number of basis functions; default is 500, minimum 100.",
60 " Basis function curves are written in specified file.",
62 " Weighted sum-of-squares are written in specified image file.",
64 " Pixels with their theta3 in its min or max value are written",
65 " in the specified imagefile with values 1 and 2, respectively,",
66 " others with value 0.",
68 " Pixels with AUC less than (threshold/100 x ref AUC) are set to zero;",
71 " Instead of BP, program saves the DVR (=BP+1) values.",
73 " Pixels with negative BP values are set to zero.",
74 " -end=<Fit end time (min)>",
75 " Use data from 0 to end time; by default, model is fitted to all frames.",
76 " -savesif=<filename>",
77 " If weights are created based on image data, then created SIF can be",
78 " saved with this option.",
80 " Weights are based only on frame length (-wf), or set to 1.0 (-w1).",
84 " @P ua2918dy1.v ua2918cer.dft ua2918bp.v",
87 "1. Lammertsma AA, Hume SP. Simplified reference tissue model for PET",
88 " receptor studies. NeuroImage 1996;4:153-158.",
89 "2. Gunn RN, Lammertsma AA, Hume SP, Cunningham VJ. Parametric imaging of",
90 " ligand-receptor binding in PET using a simplified reference region",
91 " model. NeuroImage 1997;6:279-287.",
93 "See also: imgunit, eframe, imgweigh, tacweigh, imgdecay, imgsrtm, bfmsrtm",
95 "Keywords: image, modelling, binding potential, SRTM, reference input",
114int main(
int argc,
char **argv)
116 int ai, help=0, version=0, verbose=1;
118 char inpfile[FILENAME_MAX], petfile[FILENAME_MAX], bpfile[FILENAME_MAX];
119 char r1file[FILENAME_MAX], k2file[FILENAME_MAX], wssfile[FILENAME_MAX];
120 char errfile[FILENAME_MAX], siffile[FILENAME_MAX], bffile[FILENAME_MAX];
121 char newsiffile[FILENAME_MAX], tmp[FILENAME_MAX+1], *cptr;
122 int bfNr=500, bp_plus_one=0, *bf_opt_nr;
123 float threshold, calcThreshold=0.0;
124 double fittime=-1.0, f;
125 double t3min=0.06, t3max=0.6, lambda;
126 double BP, k2, wss, p1, p2, p3, rnorm_min;
128 int ret, fi, pi, xi, yi, bi, bi_min;
129 int nosolution_nr=0, thresholded_nr=0;
130 int nonnegativity_constraint=0;
131 double WCORR_LIMIT = 100.0;
132 clock_t fitStart, fitFinish;
137 IMG img, bpimg, r1img, k2img, wssimg, errimg;
140 double **mem, **A, *B, X[MAX_N], *tau, *residual, RNORM, *chain;
141 double *qrweight, **wws, *ws, *wwschain, *ct, *cti;
148 if(argc==1) {
tpcPrintUsage(argv[0], info, stderr);
return(1);}
149 inpfile[0]=petfile[0]=bpfile[0]=r1file[0]=k2file[0]=wssfile[0]=(char)0;
150 errfile[0]=siffile[0]=newsiffile[0]=bffile[0]=(char)0;
152 for(ai=1; ai<argc; ai++)
if(*argv[ai]==
'-') {
154 cptr=argv[ai]+1;
if(*cptr==
'-') cptr++;
if(cptr==NULL)
continue;
155 if(strcasecmp(cptr,
"DVR")==0 || strcasecmp(cptr,
"BP+1")==0) {
156 bp_plus_one=1;
continue;
157 }
else if(strncasecmp(cptr,
"R1=", 3)==0) {
158 strlcpy(r1file, cptr+3, FILENAME_MAX);
continue;
159 }
else if(strncasecmp(cptr,
"k2=", 3)==0) {
160 strlcpy(k2file, cptr+3, FILENAME_MAX);
continue;
161 }
else if(strncasecmp(cptr,
"NR=", 3)==0) {
162 bfNr=atoi(cptr+3);
if(bfNr>5E+04) bfNr=5E+04;
163 if(bfNr>=100)
continue;
164 }
else if(strncasecmp(cptr,
"MIN=", 4)==0) {
165 t3min=
atof_dpi(cptr+4);
if(t3min>0.0)
continue;
166 }
else if(strncasecmp(cptr,
"MAX=", 4)==0) {
167 t3max=
atof_dpi(cptr+4);
if(t3max>0.0)
continue;
168 }
else if(strncasecmp(cptr,
"BF=", 3)==0) {
169 strlcpy(bffile, cptr+3, FILENAME_MAX);
continue;
170 }
else if(strncasecmp(cptr,
"WSS=", 4)==0) {
171 strlcpy(wssfile, cptr+4, FILENAME_MAX);
continue;
172 }
else if(strncasecmp(cptr,
"ERR=", 4)==0) {
173 strlcpy(errfile, cptr+4, FILENAME_MAX);
continue;
174 }
else if(strncasecmp(cptr,
"THR=", 4)==0) {
176 if(!ret && v>=0.0 && v<200.0) {calcThreshold=(float)(0.01*v);
continue;}
177 }
else if(strncasecmp(cptr,
"END=", 4)==0) {
178 fittime=60.0*
atof_dpi(cptr+4);
if(fittime>0.0)
continue;
179 }
else if(strncasecmp(cptr,
"NONEG", 3)==0) {
180 nonnegativity_constraint=1;
continue;
181 }
else if(strncasecmp(cptr,
"SAVESIF=", 8)==0) {
182 strlcpy(newsiffile, cptr+8, FILENAME_MAX);
continue;
183 }
else if(strcasecmp(cptr,
"W1")==0) {
184 weight_method=1;
continue;
185 }
else if(strcasecmp(cptr,
"WF")==0) {
186 weight_method=2;
continue;
188 fprintf(stderr,
"Error: invalid option '%s'.\n", argv[ai]);
193 if(help==2) {
tpcHtmlUsage(argv[0], info,
"");
return(0);}
198 if(ai<argc)
strlcpy(petfile, argv[ai++], FILENAME_MAX);
199 if(ai<argc)
strlcpy(inpfile, argv[ai++], FILENAME_MAX);
200 if(ai<argc)
strlcpy(bpfile, argv[ai++], FILENAME_MAX);
201 if(ai<argc)
strlcpy(siffile, argv[ai++], FILENAME_MAX);
203 fprintf(stderr,
"Error: invalid argument '%s'.\n", argv[ai]);
208 fprintf(stderr,
"Error: missing command-line argument; use option --help\n");
212 fprintf(stderr,
"Error: invalid theta3 bounds.\n");
return(1);}
216 cptr=strrchr(bpfile,
'.');
217 if(cptr!=NULL && strcasecmp(cptr,
".SIF")==0) {
218 fprintf(stderr,
"Error: missing command-line argument; use option --help\n");
223 if(weight_method!=0 && newsiffile[0]) {
224 fprintf(stderr,
"Warning: SIF will not be saved with options -w1 and -wf.\n");
229 printf(
"petfile := %s\n", petfile);
230 printf(
"inpfile := %s\n", inpfile);
231 printf(
"bpfile := %s\n", bpfile);
232 printf(
"siffile := %s\n", siffile);
233 if(r1file[0]) printf(
"r1file := %s\n", r1file);
234 if(k2file[0]) printf(
"k2file := %s\n", k2file);
235 if(wssfile[0]) printf(
"wssfile := %s\n", wssfile);
236 if(errfile[0]) printf(
"errfile := %s\n", errfile);
237 if(newsiffile[0]) printf(
"newsiffile := %s\n", newsiffile);
238 printf(
"bp_plus_one := %d\n", bp_plus_one);
239 printf(
"t3min := %g\n", t3min);
240 printf(
"t3max := %g\n", t3max);
241 printf(
"bfNr := %d\n", bfNr);
242 printf(
"calcThreshold := %g\n", calcThreshold);
243 printf(
"nonnegativity_constraint := %d\n", nonnegativity_constraint);
244 if(fittime>0.0) printf(
"required_fittime := %g min\n", fittime/60.0);
245 printf(
"weight_method := %d\n", weight_method);
258 petfile, siffile, inpfile, NULL, NULL, &fittime, &fitdimt, &img,
259 NULL, &tac, 1, stdout, verbose-2, tmp);
261 fprintf(stderr,
"Error: %s.\n", tmp);
262 if(verbose>1) printf(
" ret := %d\n", ret);
267 if(verbose>0) fprintf(stderr,
"Warning: missing pixel values.\n");
270 fprintf(stderr,
"Error: image does not contain isotope halflife.\n");
278 if(verbose>1) fprintf(stdout,
"lambda := %g min-1\n", lambda);
282 fprintf(stderr,
"Warning: image decay correction is removed.\n");
286 if(verbose>1) fprintf(stdout,
"Removing decay correction from image\n");
289 fprintf(stderr,
"Error: cannot remove decay correction from image.\n");
292 }
else if(verbose>0) {
293 fprintf(stderr,
"Note: image is supposed to have no decay correction.\n");
298 fprintf(stderr,
"Warning: decay correction in reference TAC is removed.\n");
303 fprintf(stdout,
"Removing decay correction from reference TAC\n");
308 "Error: cannot remove decay correction from reference TAC.\n");
309 fprintf(stderr,
"Error: %s.\n", tmp);
312 }
else if(verbose>0) {
314 "Note: reference TAC is supposed to have no decay correction.\n");
321 fprintf(stderr,
"Error (%d) in allocating memory.\n", ret);
328 printf(
"fittimeFinal := %g min\n", fittime/60.0);
329 printf(
"fitdimt := %d\n", fitdimt);
335 if(verbose>2) printf(
"ref_AUC[%g] := %g\n",
336 tac.
x2[fitdimt-1], tac.
voi[0].
y2[fitdimt-1]);
337 threshold=calcThreshold*tac.
voi[0].
y2[fitdimt-1];
338 if(verbose>1) printf(
"threshold_AUC = %g\n", threshold);
344 if(verbose>1) printf(
"setting weights\n");
346 if(weight_method==0 && siffile[0]) {
348 if(verbose>1) printf(
"reading %s\n", siffile);
351 fprintf(stderr,
"Error in reading '%s': %s\n", siffile,
siferrmsg);
356 fprintf(stderr,
"Error: different frame number in SIF and image.\n");
362 if(verbose>3) printf(
"compute the SIF weights.\n");
369 fprintf(stderr,
"Warning: SIF does not contain valid prompts data for weighting.\n");
375 if(weight_method==0 && !siffile[0]) {
377 if(verbose>0) fprintf(stdout,
"calculating weights for the fit.\n");
381 fprintf(stderr,
"Error: out of memory.\n");
385 printf(
"Memory for SIF allocated (sif.frameNr=%d).\n", sif.
frameNr);
388 for(fi=0; fi<fitdimt; fi++) {
392 if(verbose>3) printf(
"calculate image average curve.\n");
394 for(fi=0; fi<fitdimt; fi++) sif.
trues[fi]=img.
weight[fi];
397 if(verbose>3) printf(
"Convert concentrations into count related scale.\n");
398 for(fi=0; fi<sif.
frameNr; fi++) {
399 f=sif.
x2[fi]-sif.
x1[fi];
if(f<=1.0e-20) f=1.0;
403 for(fi=0; fi<sif.
frameNr; fi++) {
407 if(verbose>2) printf(
"compute the SIF weights.\n");
413 if(ret==0 && verbose>0)
414 printf(
"%s was created based on the applied weights.\n", newsiffile);
422 if(weight_method==1) {
423 if(verbose>0) fprintf(stdout,
"setting weights to 1.0 (no weights).\n");
427 if(weight_method==2) {
428 if(verbose>0) fprintf(stdout,
"setting weights based on frame lengths.\n");
431 fprintf(stderr,
"Error: cannot weight based on frame durations.\n");
439 printf(
"\nFrame weights:\n");
440 for(fi=0; fi<tac.
frameNr; fi++)
441 printf(
"%g %g %g\n", tac.
x1[fi], tac.
x2[fi], tac.
w[fi]);
448 if(verbose>1) fprintf(stdout,
"calculating basis functions\n");
452 fprintf(stderr,
"Error: cannot calculate basis functions (%d).\n", ret);
460 if(verbose>1) fprintf(stdout,
"allocating memory for parametric images\n");
462 printf(
"dimz := %d\n", img.
dimz);
463 printf(
"dimy := %d\n", img.
dimy);
464 printf(
"dimx := %d\n", img.
dimx);
469 if(ret==0 && k2file[0])
471 if(ret==0 && r1file[0])
473 if(ret==0 && wssfile[0])
475 if(ret==0 && errfile[0])
478 fprintf(stderr,
"Error: out of memory.\n");
485 bpimg.
start[0]=0.0; bpimg.
end[0]=fittime;
486 bpimg.
unit=IMGUNIT_UNITLESS;
487 if(k2file[0]) k2img.
unit=IMGUNIT_PER_MIN;
488 if(r1file[0]) r1img.
unit=IMGUNIT_UNITLESS;
489 if(wssfile[0]) wssimg.
unit=IMGUNIT_UNITLESS;
490 if(errfile[0]) errimg.
unit=IMGUNIT_UNITLESS;
496 if(verbose>1) fprintf(stdout,
"allocating memory for QR\n");
499 chain=(
double*)malloc((M+1)*N*bf.
voiNr *
sizeof(
double));
500 mem=(
double**)malloc(bf.
voiNr *
sizeof(
double*));
501 A=(
double**)malloc(M *
sizeof(
double*));
502 B=(
double*)malloc(M*
sizeof(
double));
503 residual=(
double*)malloc(M*
sizeof(
double));
504 qrweight=(
double*)malloc(M*
sizeof(
double));
505 wwschain=(
double*)malloc((M*N+2*M)*
sizeof(
double));
506 wws=(
double**)malloc(M *
sizeof(
double*));
507 if(chain==NULL || B==NULL || A==NULL || residual==NULL
508 || qrweight==NULL || wwschain==NULL || wws==NULL)
510 fprintf(stderr,
"Error: out of memory.\n");
516 for(bi=0; bi<bf.
voiNr; bi++) mem[bi]=chain+bi*(M+1)*N;
517 for(m=0; m<M; m++) wws[m]=wwschain+m*N;
522 if(tac.
w[m]<=1.0e-20) qrweight[m]=0.0;
523 else qrweight[m]=sqrt(tac.
w[m]);
528 if(verbose>1) fprintf(stdout,
"calculating QR decomposition\n");
529 for(bi=0; bi<bf.
voiNr; bi++) {
532 for(m=0; m<M; m++) A[m]=mem[bi]+m*N;
537 A[m][0]=tac.
voi[0].
y[m];
538 A[m][1]=bf.
voi[bi].
y[m];
542 for(m=0; m<M; m++)
for(n=0; n<N; n++) A[m][n]*=qrweight[m];
548 free(chain); free(B); free(residual);
549 free(A); free(wwschain); free(wws); free(qrweight);
560 if(verbose>0) fprintf(stdout,
"computing QR pixel-by-pixel\n");
561 thresholded_nr=0; ct=tac.
voi[1].
y; cti=tac.
voi[1].
y2; nosolution_nr=0;
564 bf_opt_nr=(
int*)malloc(bfNr*
sizeof(
int));
565 for(bi=0; bi<bf.
voiNr; bi++) bf_opt_nr[bi]=0.0;
567 for(pi=0; pi<img.
dimz; pi++) {
568 if(verbose>2) printf(
"computing plane %d\n", img.
planeNumber[pi]);
569 else if(img.
dimz>1 && verbose>0) {fprintf(stdout,
"."); fflush(stdout);}
570 for(yi=0; yi<img.
dimy; yi++) {
571 if(verbose>5 && yi==4*img.
dimy/10) printf(
" computing row %d\n", yi+1);
572 for(xi=0; xi<img.
dimx; xi++) {
573 if(verbose>5 && yi==4*img.
dimy/10 && xi==4*img.
dimx/10)
574 printf(
" computing column %d\n", xi+1);
578 for(m=0; m<tac.
frameNr; m++) {ct[m]=img.
m[pi][yi][xi][m];}
580 if(verbose>6 && yi==4*img.
dimy/10 && xi==4*img.
dimx/10)
581 printf(
"Pixel (%d,%d,%d), int= %f, threshold= %g\n",
582 pi, yi, xi, cti[M-1], threshold);
583 if(cti[M-1]<threshold) {
584 bpimg.
m[pi][yi][xi][0]=0.0;
585 if(k2file[0]) k2img.
m[pi][yi][xi][0]=0.0;
586 if(r1file[0]) r1img.
m[pi][yi][xi][0]=0.0;
587 if(wssfile[0]) wssimg.
m[pi][yi][xi][0]=0.0;
588 if(errfile[0]) errimg.
m[pi][yi][xi][0]=0.0;
593 bi_min=-1; rnorm_min=+1.0E80; p1=p2=p3=0.0;
594 for(bi=0; bi<bf.
voiNr; bi++) {
597 for(m=0; m<M; m++) {A[m]=mem[bi]+ m*N;}
602 B[m]=img.
m[pi][yi][xi][m];
608 ret=
qr_solve(A, M, N, tau, B, X, residual, &RNORM, wws, ws);
610 for(n=0; n<N; n++) X[n]=0.0;
615 if(RNORM<rnorm_min && bf.
voi[bi].
size!=lambda) {
616 rnorm_min=RNORM; bi_min=bi;
617 p1=X[0]; p2=X[1]; p3=bf.
voi[bi_min].
size;
620 if(bi_min<0 || rnorm_min>=1.0E50) {
621 bpimg.
m[pi][yi][xi][0]=0.0;
622 if(k2file[0]) k2img.
m[pi][yi][xi][0]=0.0;
623 if(r1file[0]) r1img.
m[pi][yi][xi][0]=0.0;
624 if(wssfile[0]) wssimg.
m[pi][yi][xi][0]=0.0;
625 if(errfile[0]) errimg.
m[pi][yi][xi][0]=0.0;
628 }
else bf_opt_nr[bi_min]+=1;
631 k2=p1*(p3-lambda)+p2; BP=k2/(p3-lambda) - 1.0;
632 if(verbose>6 && yi==4*img.
dimy/10 && xi==4*img.
dimx/10) {
633 printf(
"Pixel (%d,%d,%d), p1=%g p2=%g p3=%g\n",
634 pi, yi, xi, p1, p2, p3);
639 for(m=0, wss=0.0; m<M; m++) {
640 f=p1*tac.
voi[0].
y[m] + p2*bf.
voi[bi_min].
y[m];
641 f-=img.
m[pi][yi][xi][m]; wss+=tac.
w[m]*f*f;
644 bpimg.
m[pi][yi][xi][0]=BP;
645 if(bp_plus_one!=0) bpimg.
m[pi][yi][xi][0]+=1.0;
646 if(k2file[0]) k2img.
m[pi][yi][xi][0]=k2;
647 if(r1file[0]) r1img.
m[pi][yi][xi][0]=p1;
648 if(wssfile[0]) wssimg.
m[pi][yi][xi][0]=wss;
650 if(bi_min==0) ret=1;
else if(bi_min==bf.
voiNr-1) ret=2;
else ret=0;
651 errimg.
m[pi][yi][xi][0]=(float)ret;
657 if(verbose>0) fprintf(stdout,
"done.\n");
658 if(verbose>1 || thresholded_nr>0)
659 fprintf(stdout,
"%d pixels were not fitted due to threshold.\n",
661 if(verbose>1 || nosolution_nr>0)
662 fprintf(stdout,
"no QR solution for %d pixels.\n", nosolution_nr);
667 free(chain); free(B); free(residual); free(A); free(wwschain);
668 free(wws); free(qrweight); free(mem);
676 for(bi=0; bi<bf.
voiNr; bi++)
677 sprintf(bf.
voi[bi].
place,
"%d", bf_opt_nr[bi]);
679 fprintf(stderr,
"Error in writing %s: %s\n", bffile,
dfterrmsg);
682 free(bf_opt_nr);
return(11);
684 if(verbose>0) fprintf(stdout,
"basis functions were written in %s\n", bffile);
693 if(nonnegativity_constraint!=0) {
694 if(verbose>1) printf(
"setting negative BP values to zero\n");
703 if(ret) fprintf(stderr,
"Error: %s\n", bpimg.
statmsg);
705 if(bp_plus_one==0) fprintf(stdout,
"BP image %s saved.\n", bpfile);
706 else fprintf(stdout,
"DVR image %s saved.\n", bpfile);
708 if(ret==0 && r1file[0]) {
710 if(ret) fprintf(stderr,
"Error: %s\n", r1img.
statmsg);
711 else if(verbose>0) fprintf(stdout,
"R1 image %s saved.\n", r1file);
713 if(ret==0 && k2file[0]) {
715 if(ret) fprintf(stderr,
"Error: %s\n", k2img.
statmsg);
716 else if(verbose>0) fprintf(stdout,
"k2 image %s saved.\n", k2file);
718 if(ret==0 && wssfile[0]) {
720 if(ret) fprintf(stderr,
"Error: %s\n", wssimg.
statmsg);
721 else if(verbose>0) fprintf(stdout,
"WSS image %s saved.\n", wssfile);
723 if(ret==0 && errfile[0]) {
725 if(ret) fprintf(stderr,
"Error: %s\n", errimg.
statmsg);
726 else if(verbose>0) fprintf(stdout,
"Error image %s saved.\n", errfile);
733 if(verbose>1) fprintf(stdout,
"parameter estimation time := %.1f [s]\n",
734 (
double)(fitFinish-fitStart) / CLOCKS_PER_SEC );
int bf_srtm(double *t, double *cr, int n, int bfNr, double t3min, double t3max, DFT *bf)
int atof_with_check(char *double_as_string, double *result_value)
double atof_dpi(char *str)
int dftAddmem(DFT *dft, int voiNr)
int dftDecayCorrection(DFT *dft, double hl, int mode, int y, int y2, int y3, char *status, int verbose)
int dftWrite(DFT *data, char *filename)
int dftTimeunitConversion(DFT *dft, int tunit)
double hl2lambda(double halflife)
unsigned long long imgNaNs(IMG *img, int fix)
int imgAllocateWithHeader(IMG *image, int planes, int rows, int columns, int frames, IMG *image_from)
void imgEmpty(IMG *image)
int imgDecayCorrection(IMG *image, int mode)
int imgAverageTAC(IMG *img, float *tac)
int imgWrite(const char *fname, IMG *img)
void imgCutoff(IMG *image, float cutoff, int mode)
int petintegral(double *x1, double *x2, double *y, int nr, double *ie, double *iie)
Integrate PET TAC data to frame mid times.
Header file for libtpccurveio.
#define DFT_DECAY_UNKNOWN
#define DFT_DECAY_CORRECTED
Header file for libtpcimgio.
void sifModerateTrues(SIF *sif, double limit)
int sifWrite(SIF *data, char *filename)
int sifExistentCounts(SIF *sif)
void sifWeight(SIF *data, double halflife)
Calculate weights for frames in SIF data based on true counts. Weights are normalized to have an aver...
int sifSetmem(SIF *data, int frameNr)
int sifRead(char *filename, SIF *data)
Header file for libtpcimgp.
Header file for libtpcmisc.
int tpcProcessStdOptions(const char *s, int *print_usage, int *print_version, int *verbose_level)
size_t strlcpy(char *dst, const char *src, size_t dstsize)
int tpcHtmlUsage(const char *program, char *text[], const char *path)
void tpcPrintBuild(const char *program, FILE *fp)
void tpcPrintUsage(const char *program, char *text[], FILE *fp)
Header file for libtpcmodel.
int qr_solve(double **QR, int M, int N, double *tau, double *b, double *x, double *residual, double *resNorm, double **cchain, double *chain)
int qr_decomp(double **a, int M, int N, double *tau, double **cchain, double *chain)
Header file for libtpcmodext.
int dftWeightByFreq(DFT *dft)
char voiname[MAX_REGIONSUBNAME_LEN+1]
char place[MAX_REGIONSUBNAME_LEN+1]