Brain-derived plasma p-tau217 shows enhanced dynamic range for Alzheimer's disease neuropathological change.
The 1 match
- [1] § METHODS › Tau‐PET imaging ↔ src/RSF.c, lines 395–464 · score 0.52 · FreeSurfer defined, ROIs, PET, fields
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
C · 793 lines · 26 KB · BSD-3-Clause · 1 match
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <stdbool.h>
- #include <math.h>
- #include <time.h>
- #include <endianio.h>
- #include <Getifh.h>
- #include <rec.h>
- #include <librms.h>
- #include <nrutil.h>
- #include <RSF.h>
- IMAGE_4dfp *read_image_4dfp(char *filespc, IMAGE_4dfp *image)
- {
- int n, m1, m2, isbig;
- char imgroot[MAXL], imgfile[MAXL];
- FILE *imgfp=NULL;
- if (!image) {
- image=(IMAGE_4dfp *)malloc((size_t)sizeof(IMAGE_4dfp));
- if (!image) errm("read_image_4dfp");
- getroot(filespc, imgroot);
- sprintf (imgfile, "%s.4dfp.img", imgroot);
- Getifh(imgfile, &(image->ifh));
- m2=image->ifh.number_of_bytes_per_pixel*image->ifh.matrix_size[0]*image->ifh.matrix_size[1]*image->ifh.matrix_size[2]*image->ifh.matrix_size[3];
- } else {
- m1=image->ifh.number_of_bytes_per_pixel*image->ifh.matrix_size[0]*image->ifh.matrix_size[1]*image->ifh.matrix_size[2]*image->ifh.matrix_size[3];
- getroot(filespc, imgroot);
- sprintf (imgfile, "%s.4dfp.img", imgroot);
- Getifh(imgfile, &(image->ifh));
- m2=image->ifh.number_of_bytes_per_pixel*image->ifh.matrix_size[0]*image->ifh.matrix_size[1]*image->ifh.matrix_size[2]*image->ifh.matrix_size[3];
- if (m1!=m2) { /*free old memory if the image size does not match*/
- free((void *) image->image);
- }
- }
- isbig = strcmp (image->ifh.imagedata_byte_order, "littleendian");
- if (!(imgfp = fopen (imgfile, "rb"))) errr ("read_image_4dfp", imgfile);
- m2=m2/image->ifh.number_of_bytes_per_pixel;
- image->image=(float *)malloc((size_t)(m2*sizeof(float))); /*Allocate memory for reading the image*/
- if (!image->image) errm("read_image_4dfp");
- if (eread(image->image, m2, isbig, imgfp)) errr("read_image_4dfp", imgfile);
- fclose(imgfp);
- return image;
- }
- int write_image_4dfp(char *filespc, IMAGE_4dfp *image)
- {
- int isbig, vdim, status = 0;
- char imgroot[MAXL], imgfile[MAXL], command[MAXL];
- FILE *imgfp;
- char control = '\0';
- isbig = strcmp (image->ifh.imagedata_byte_order, "littleendian");
- if (!control) control = (isbig) ? 'b' : 'l';
- vdim=image->ifh.matrix_size[0]*image->ifh.matrix_size[1]*image->ifh.matrix_size[2]*image->ifh.matrix_size[3];
- getroot(filespc, imgroot);
- sprintf(imgfile, "%s.4dfp.img", imgroot);
- if (!(imgfp = fopen (imgfile, "wb"))) errw("write_image_4dfp", imgfile);
- if (ewrite(image->image, vdim, control, imgfp)) errw("write_image_4dfp", imgfile);
- /* ifh hdr rec */
- if (fclose(imgfp)) errw("write_image_4dfp", imgfile);
- if (Writeifh("write_image_4dfp", imgfile, &image->ifh, control)) errw("write_image_4dfp", imgroot);
- sprintf(command, "ifh2hdr %s", imgroot);
- status |= system (command);
- return status;
- }
- float getroimean_4dfp(IMAGE_4dfp *in_image, IMAGE_4dfp *Mask, int val)
- {
- float *fptr1, *fptr2, roimean, lo, hi;
- int i, n, nv;
- /*need to implement a input checking mechanism*/
- roimean=0;
- n=0;
- fptr1 = in_image->image;
- fptr2 = Mask->image;
- lo=(float)val - 0.5;
- hi=(float)val + 0.5;
- nv = in_image->ifh.matrix_size[0]*in_image->ifh.matrix_size[1]*in_image->ifh.matrix_size[2]*in_image->ifh.matrix_size[3];
- for (i=0; i<nv; i++)
- {
- if (*fptr2<hi && *fptr2>lo) {
- n++;
- roimean+=*fptr1;
- }
- fptr1++;
- fptr2++;
- }
- if (n>0) {
- roimean=roimean/(float)n;
- } else {
- printf("Warning: ROI has no voxels\n");
- }
- return roimean;
- }
- IMAGE_4dfp *copy_image_4dfp(IMAGE_4dfp *in_image, IMAGE_4dfp *out_image)
- {
- int i, m1, m2;
- float *fptr1, *fptr2;
- m2=in_image->ifh.number_of_bytes_per_pixel*in_image->ifh.matrix_size[0]*in_image->ifh.matrix_size[1]*in_image->ifh.matrix_size[2]*in_image->ifh.matrix_size[3];
- if (!out_image) {
- out_image=(IMAGE_4dfp *)malloc((size_t)sizeof(IMAGE_4dfp));
- if (!out_image) errm("copy_image_4dfp");
- out_image->image=(float *)malloc((size_t)m2);
- if (!out_image->image) errm("copy_image_4dfp");
- } else {
- m1=out_image->ifh.number_of_bytes_per_pixel*out_image->ifh.matrix_size[0]*out_image->ifh.matrix_size[1]*out_image->ifh.matrix_size[2]*out_image->ifh.matrix_size[3];
- if (m1!=m2) {
- free((void *) out_image->image);
- out_image->image=(float *)malloc((size_t)m2);
- if (!out_image->image) errm("copy_image_4dfp");
- }
- }
- strcpy(out_image->ifh.interfile, in_image->ifh.interfile);
- strcpy(out_image->ifh.version_of_keys, in_image->ifh.version_of_keys);
- strcpy(out_image->ifh.conversion_program, in_image->ifh.conversion_program);
- strcpy(out_image->ifh.name_of_data_file, in_image->ifh.name_of_data_file);
- /* needs to modify out_image->name_of_data_file to avoid duplication of file names*/
- strcpy(out_image->ifh.number_format, in_image->ifh.number_format);
- strcpy(out_image->ifh.imagedata_byte_order, in_image->ifh.imagedata_byte_order);
- out_image->ifh.number_of_bytes_per_pixel=in_image->ifh.number_of_bytes_per_pixel;
- out_image->ifh.number_of_dimensions=in_image->ifh.number_of_dimensions;
- for (i=0; i<3; i++)
- {
- out_image->ifh.matrix_size[i]=in_image->ifh.matrix_size[i];
- out_image->ifh.scaling_factor[i]=in_image->ifh.scaling_factor[i];
- out_image->ifh.mmppix[i]=in_image->ifh.mmppix[i];
- out_image->ifh.center[i]=in_image->ifh.center[i];
- }
- out_image->ifh.matrix_size[3]=in_image->ifh.matrix_size[3];
- out_image->ifh.scaling_factor[3]=in_image->ifh.scaling_factor[3];
- out_image->ifh.orientation=in_image->ifh.orientation;
- m2=m2/in_image->ifh.number_of_bytes_per_pixel;
- fptr1=in_image->image;
- fptr2=out_image->image;
- for (i=0; i<m2; i++)
- {
- *fptr2=*fptr1;
- fptr1++;
- fptr2++;
- }
- return out_image;
- }
- IMAGE_4dfp *extract_roi_4dfp(IMAGE_4dfp *image, int MaskVal, IMAGE_4dfp *roimask)
- {
- int i, m1, m2;
- float *fptr1, *fptr2, lo, hi;
- m2=image->ifh.number_of_bytes_per_pixel*image->ifh.matrix_size[0]*image->ifh.matrix_size[1]*image->ifh.matrix_size[2]*image->ifh.matrix_size[3];
- if (!roimask) {
- roimask=(IMAGE_4dfp *)malloc((size_t)sizeof(IMAGE_4dfp));
- if (!roimask) errm("extract_roi_4dfp");
- roimask->image=(float *)malloc((size_t)m2);
- if (!roimask->image) errm("extract_roi_4dfp");
- } else {
- m1=roimask->ifh.number_of_bytes_per_pixel*roimask->ifh.matrix_size[0]*roimask->ifh.matrix_size[1]*roimask->ifh.matrix_size[2]*roimask->ifh.matrix_size[3];
- if (m1!=m2) {
- free((void *) roimask->image);
- roimask->image=(float *)malloc((size_t)m2);
- if (!roimask->image) errm("extract_roi_4dfp");
- }
- }
- strcpy(roimask->ifh.interfile, image->ifh.interfile);
- strcpy(roimask->ifh.version_of_keys, image->ifh.version_of_keys);
- strcpy(roimask->ifh.conversion_program, image->ifh.conversion_program);
- strcpy(roimask->ifh.name_of_data_file, image->ifh.name_of_data_file);
- /* needs to modify roimask->name_of_data_file to avoid duplication of file names*/
- strcpy(roimask->ifh.number_format, image->ifh.number_format);
- strcpy(roimask->ifh.imagedata_byte_order, image->ifh.imagedata_byte_order);
- roimask->ifh.number_of_bytes_per_pixel=image->ifh.number_of_bytes_per_pixel;
- roimask->ifh.number_of_dimensions=image->ifh.number_of_dimensions;
- for (i=0; i<3; i++)
- {
- roimask->ifh.matrix_size[i]=image->ifh.matrix_size[i];
- roimask->ifh.scaling_factor[i]=image->ifh.scaling_factor[i];
- roimask->ifh.mmppix[i]=image->ifh.mmppix[i];
- roimask->ifh.center[i]=image->ifh.center[i];
- }
- roimask->ifh.matrix_size[3]=image->ifh.matrix_size[3];
- roimask->ifh.scaling_factor[3]=image->ifh.scaling_factor[3];
- roimask->ifh.orientation=image->ifh.orientation;
- fptr1=image->image;
- fptr2=roimask->image;
- m2=m2/image->ifh.number_of_bytes_per_pixel;
- lo = (float)MaskVal - 0.5;
- hi = (float)MaskVal + 0.5;
- for (i=0; i<m2; i++)
- {
- if (*fptr1<hi && *fptr1>lo) {
- *fptr2=1;
- } else {
- *fptr2=0;
- }
- fptr1++;
- fptr2++;
- }
- return roimask;
- }
- void getroismean_4dfp(IMAGE_4dfp *in_image, IMAGE_4dfp *Mask, int n, float *a)
- {
- float *fptr1, *fptr2, *p;
- int i, nv, idx;
- p=vector(1,n);
- for (i=1; i<=n; i++) {a[i]=0.0; p[i]=0.;}
- nv = in_image->ifh.matrix_size[0]*in_image->ifh.matrix_size[1]*in_image->ifh.matrix_size[2]*in_image->ifh.matrix_size[3];
- fptr1=in_image->image;
- fptr2=Mask->image;
- for (i=0; i<nv; i++) {
- idx=(int)rint((double)(*fptr2))+1;
- a[idx]+=*fptr1;
- p[idx]+=1.;
- if (idx>n) printf("something is wrong.\n");
- fptr1++;
- fptr2++;
- }
- for (i=1; i<=n; i++) {a[i]=a[i]/p[i];}
- }
- void getroismean2_4dfp(IMAGE_4dfp *in_image, IMAGE_4dfp *Mask, IMAGE_4dfp *PETMask, int n, float *a, float *p)
- {
- float *fptr1, *fptr2, *fptr3, m;
- int i, nv, idx, nm;
- for (i=1; i<=n; i++) {a[i]=0.0; p[i]=0.;}
- nv = in_image->ifh.matrix_size[0]*in_image->ifh.matrix_size[1]*in_image->ifh.matrix_size[2]*in_image->ifh.matrix_size[3];
- fptr1=in_image->image;
- fptr2=Mask->image;
- fptr3=PETMask->image;
- nm=0;
- m=0;
- for (i=0; i<nv; i++) {
- if (*fptr3>0){
- idx=(int)rint((double)(*fptr2))+1; /*belong to ROI # idx*/
- a[idx]+=*fptr1; /*sum for ROI #idx + voxel value*/
- p[idx]+=1.; /* voxel number for ROI #idx increase by 1 */
- if (idx>n) printf("something is wrong.\n");
- if (*fptr2 >0 ){
- nm++;
- m+=*fptr1;
- }
- }
- fptr1++;
- fptr2++;
- fptr3++;
- }
- m=m/(float)nm*.8;
- for (i=1; i<=n; i++) {
- if (p[i]>0) {
- a[i]=a[i]/p[i];
- /*printf("%f\t%f\n",p[i], a[i]);*/
- } else { /* to protect cases that ROI #i is completely out of PET field of view */
- a[i]=m; /* in such case, the ROI mean is replaced with mean value of all non-unknown regions multiplied by 0.8 */
- }
- }
- }
- void getroismean3_4dfp(IMAGE_4dfp *in_image, IMAGE_4dfp *Mask, IMAGE_4dfp *PETMask, int n, float *a, float *p)
- {
- /* get roimean excluding non-valid voxels */
- float *fptr1, *fptr2, *fptr3, m;
- int i, nv, idx, nm;
- for (i=1; i<=n; i++) {a[i]=0.0; p[i]=0.;}
- nv = in_image->ifh.matrix_size[0]*in_image->ifh.matrix_size[1]*in_image->ifh.matrix_size[2]*in_image->ifh.matrix_size[3];
- fptr1=in_image->image;
- fptr2=Mask->image;
- fptr3=PETMask->image;
- nm=0;
- m=0;
- for (i=0; i<nv; i++) {
- if (*fptr3>0 && isnormal (*fptr1) && *fptr1 != (float) 1.e-37 && *fptr1 !=0){
- idx=(int)rint((double)(*fptr2))+1; /*belong to ROI # idx*/
- a[idx]+=*fptr1; /*sum for ROI #idx + voxel value*/
- p[idx]+=1.; /* voxel number for ROI #idx increase by 1 */
- if (idx>n) printf("something is wrong.\n");
- if (*fptr2 >0 ){
- nm++;
- m+=*fptr1;
- }
- }
- fptr1++;
- fptr2++;
- fptr3++;
- }
- m=m/(float)nm*.8;
- for (i=1; i<=n; i++) {
- if (p[i]>0) {
- a[i]=a[i]/p[i];
- /*printf("%f\t%f\n",p[i], a[i]);*/
- } else { /* to protect cases that ROI #i is completely out of PET field of view */
- a[i]=0; /* in such case, the ROI mean is replaced with mean value of all non-unknown regions multiplied by 0.8 */
- }
- }
- }
- RSFMat *calrsfmat(IMAGE_4dfp *image, ROIList *rois, float fhalf)
- {
- RSFMat *rsfmat = NULL;
- IMAGE_4dfp *tmp_img=NULL;
- int val, nx, ny, nz, i, j, nv;
- float cmppix[3], *fptr, l;
- IFH tmp_ifh;
- clock_t start, end;
- rsfmat = (RSFMat *) malloc((size_t)sizeof(RSFMat));
- if (!rsfmat) errm("calrsfmat");
- rsfmat->n = rois->NumberOfRegions;
- rsfmat->mat = matrix(1,rsfmat->n,1,rsfmat->n);
- nx = image->ifh.matrix_size[0];
- ny = image->ifh.matrix_size[1];
- nz = image->ifh.matrix_size[2];
- cmppix[0]=image->ifh.scaling_factor[0]/10.;
- cmppix[1]=image->ifh.scaling_factor[1]/10.;
- cmppix[2]=image->ifh.scaling_factor[2]/10.;
- /* Converting roi values to consecutive numbers*/
- start = clock();
- nv = image->ifh.matrix_size[0]*image->ifh.matrix_size[1]*image->ifh.matrix_size[2]*image->ifh.matrix_size[3];
- for (j=0; j<rois->NumberOfRegions; j++) {
- val = rois->List[j].MaskVal;
- fptr = image->image;
- for (i=0; i<nv; i++) {
- if (fabs(*fptr-(float)val)<1e-4) {
- *fptr=(float)j;
- }
- fptr++;
- }
- }
- fptr=image->image;
- l=(float)(rois->NumberOfRegions-.5);
- for (i=0; i<nv; i++) {
- if (*fptr>l) *fptr=0;
- fptr++;
- }
- end = clock();
- printf("CPU TIME USED for roi preprocessing is %f\n",((double) (end - start)) / CLOCKS_PER_SEC);
- /* Calculate RSF Matrix */
- for (i=1;i<=rsfmat->n;i++) {
- printf("%s\n", rois->List[i-1].Name);
- tmp_img=extract_roi_4dfp(image, i-1, tmp_img);
- start = clock();
- gauss3d(tmp_img->image, &nx, &ny, &nz, cmppix, &fhalf);
- end = clock();
- printf("CPU TIME USED for gauss3d is %f\n",((double) (end - start)) / CLOCKS_PER_SEC);
- start = clock();
- getroismean_4dfp(tmp_img, image, rsfmat->n, rsfmat->mat[i]);
- /*for (j=1; j<=rsfmat->n; j++) {
- printf("%e\n",rsfmat->mat[i][j]);
- }*/
- end = clock();
- printf("CPU TIME USED for getroimeans is %f\n",((double) (end - start)) / CLOCKS_PER_SEC);
- }
- /*
- for (i=1;i<=rsfmat->n;i++) {
- printf("%s\n", rois->List[i-1].Name);
- val = rois->List[i-1].MaskVal;
- tmp_img=extract_roi_4dfp(image, val, tmp_img);
- start = clock();
- gauss3d(tmp_img->image, &nx, &ny, &nz, cmppix, &fhalf);
- end = clock();
- printf("CPU TIME USED for gauss3d is %f\n",((double) (end - start)) / CLOCKS_PER_SEC);
- start = clock();
- for (j=1; j<=rsfmat->n; j++) {
- rsfmat->mat[i][j]=getroimean_4dfp(tmp_img, image, rois->List[j-1].MaskVal);
- printf("%e\n",rsfmat->mat[i][j]);
- }
- end = clock();
- printf("CPU TIME USED for getroimean is %f\n",((double) (end - start)) / CLOCKS_PER_SEC);
- }
- */
- return rsfmat;
- }
- RSFROIS *Preprocess_RSF(IMAGE_4dfp *FS_Mask, IMAGE_4dfp *Head_Mask, IMAGE_4dfp *PET_Mask, RSFROIS *rsfrois, char *FSLUT)
- /*
- Combine Freesurfer defined masks, MR based head mask, and PET field of view based mask into a RSF Mask. It makes
- sure that meaningful ROIs are only defined on those area within PET field of view.
- */
- {
- int i, j, k, nv, tmp, xb, yb, zb, x, y, z, FSVal[16384], nfsroi, nroi, fsflag[16384], oflag[64], fsidx, val, maxfsval;
- float *fptr1, *fptr2, *fptr3, *fptr4, l;
- char **FSRegions = NULL;
- char line[512], otherstr[256];
- FILE *fp = NULL;
- printf("0\n");
- /* allocate memory and initiate rsfrois */
- nv=FS_Mask->ifh.number_of_bytes_per_pixel*FS_Mask->ifh.matrix_size[0]*FS_Mask->ifh.matrix_size[1]*FS_Mask->ifh.matrix_size[2]*FS_Mask->ifh.matrix_size[3];
- if (!rsfrois) {
- rsfrois=(RSFROIS *)malloc((size_t)sizeof(RSFROIS));
- if (!rsfrois) errm("Preprocess_RSF");
- rsfrois->RSFMask=(IMAGE_4dfp *)malloc((size_t)sizeof(IMAGE_4dfp));
- if (!rsfrois->RSFMask) errm("Preprocess_RSF");
- rsfrois->RSFMask->image=(float *)malloc((size_t)nv);
- if (!rsfrois->RSFMask->image) errm("Preprocess_RSF");
- rsfrois->rois=(ROIList *)malloc((size_t)sizeof(ROIList));
- if (!rsfrois->rois) errm("Preprocess_RSF");
- } else {
- nrerror("rsfrois should be a NULL pointer passing to Preprocess_RSF");
- }
- nv = nv/FS_Mask->ifh.number_of_bytes_per_pixel;
- strcpy(rsfrois->RSFMask->ifh.interfile, FS_Mask->ifh.interfile);
- strcpy(rsfrois->RSFMask->ifh.version_of_keys, FS_Mask->ifh.version_of_keys);
- strcpy(rsfrois->RSFMask->ifh.conversion_program, FS_Mask->ifh.conversion_program);
- strcpy(rsfrois->RSFMask->ifh.name_of_data_file, "RSFMask");
- strcpy(rsfrois->RSFMask->ifh.number_format, FS_Mask->ifh.number_format);
- strcpy(rsfrois->RSFMask->ifh.imagedata_byte_order, FS_Mask->ifh.imagedata_byte_order);
- rsfrois->RSFMask->ifh.number_of_bytes_per_pixel=FS_Mask->ifh.number_of_bytes_per_pixel;
- rsfrois->RSFMask->ifh.number_of_dimensions=FS_Mask->ifh.number_of_dimensions;
- for (i=0; i<3; i++)
- {
- rsfrois->RSFMask->ifh.matrix_size[i]=FS_Mask->ifh.matrix_size[i];
- rsfrois->RSFMask->ifh.scaling_factor[i]=FS_Mask->ifh.scaling_factor[i];
- rsfrois->RSFMask->ifh.mmppix[i]=FS_Mask->ifh.mmppix[i];
- rsfrois->RSFMask->ifh.center[i]=FS_Mask->ifh.center[i];
- }
- rsfrois->RSFMask->ifh.matrix_size[3]=FS_Mask->ifh.matrix_size[3];
- rsfrois->RSFMask->ifh.scaling_factor[3]=FS_Mask->ifh.scaling_factor[3];
- rsfrois->RSFMask->ifh.orientation=FS_Mask->ifh.orientation;
- printf("1\n");
- /* load in freesurfer region definition*/
- FSRegions = (char **)malloc((size_t)(16384*sizeof(char *)));
- if (!FSRegions) errm("Preprocess_RSF");
- fp = fopen(FSLUT,"r");
- if (!fp) errr("Preprocess_RSF",FSLUT);
- maxfsval=0;
- for (i=0; i<16384; i++) fsflag[i]=0;
- while (fgets(line, 512, fp)){
- if (line[0]>='0'&&line[0]<='9') {
- sscanf(line, "%d%s%*s", &maxfsval, otherstr);
- FSRegions[maxfsval]=(char *)malloc((size_t)(256*sizeof(char)));
- if (!FSRegions[maxfsval]) errm("Preprocess_RSF");
- strcpy(FSRegions[maxfsval], otherstr);
- fsflag[maxfsval]=1;
- printf("%s\t%d\n",FSRegions[maxfsval],maxfsval);
- /*nfsroi++;*/
- }
- }
- fclose(fp);
- printf("maxfsval=%d\n",maxfsval);
- /* combine FS_Mask, Head_Mask and PET_Mask to form RSFMask*/
- xb=FS_Mask->ifh.matrix_size[0]/4;
- yb=FS_Mask->ifh.matrix_size[1]/4;
- zb=FS_Mask->ifh.matrix_size[2]/4;
- fptr1=FS_Mask->image;
- fptr2=Head_Mask->image;
- fptr3=rsfrois->RSFMask->image;
- fptr4=PET_Mask->image;
- l=0;
- for (i=0; i<64; i++) oflag[i]=0; /*set all "other region" flags to be 0, no "other region" is defined at this point*/
- for (z=0;z<FS_Mask->ifh.matrix_size[2];z++) {
- for (y=0; y<FS_Mask->ifh.matrix_size[1]; y++) {
- for (x=0; x<FS_Mask->ifh.matrix_size[0]; x++) {
- tmp=x/xb+y/yb*4+z/zb*16;
- if (*fptr1>0 && *fptr4>0) { /*for voxels defined in FS_Mask and within PET field of view*/
- if (l<*fptr1) l=*fptr1;
- *fptr3=*fptr1;
- fsidx=(int)rint((double)*fptr1);
- if (fsflag[fsidx]<=0) { /*the fs region is undefined*/
- if (*fptr2>0) { /*within Head Mask*/
- *fptr3=(float)(tmp+16384);
- oflag[tmp]=1;
- } else {/*outside of Head Mask*/
- *fptr3=0;
- fsflag[0]=2;
- }
- } else { /* fs region is defined */
- fsflag[fsidx]=2;
- }
- } else if (*fptr1<=0&&*fptr2>0&&*fptr4>0) { /*outside of fs defined region, within Head Mask*/
- *fptr3=(float)(tmp+16384);
- oflag[tmp]=1;
- } else {
- *fptr3=0;
- fsflag[0]=2;
- }
- fptr1++;
- fptr2++;
- fptr3++;
- fptr4++;
- }
- }
- }
- nroi=0;
- maxfsval=(int)rint((double)l);
- printf("maxfsval=%d\n",maxfsval);
- printf("fsflag[%d]=%d\n",1999,fsflag[1999]);
- for (i=0; i<=maxfsval; i++) {
- if (fsflag[i]>1) {nroi++; printf("%s\t%d\n",FSRegions[i], i);}
- }
- printf("nroi=%d\n",nroi);
- for (i=0; i<64; i++) {
- if (oflag[i]>0) nroi++;
- }
- rsfrois->rois->NumberOfRegions=nroi;
- rsfrois->rois->List=(ROI_Info *)malloc((size_t)(nroi*sizeof(ROI_Info)));
- if (!rsfrois->rois->List) errm("Preprocess_RSF");
- k=0;
- for (i=0; i<=maxfsval; i++) {
- if (fsflag[i]>1) {
- strcpy(rsfrois->rois->List[k].Name, FSRegions[i]);
- rsfrois->rois->List[k].MaskVal=i;
- k++;
- }
- }
- for (i=0; i<64; i++) {
- if (oflag[i]>0) {
- sprintf(otherstr,"other%d",i+16384);
- strcpy(rsfrois->rois->List[k].Name, otherstr);
- rsfrois->rois->List[k].MaskVal=i+16384;
- k++;
- }
- }
- printf("%d\n",rsfrois->rois->NumberOfRegions);
- for (j=0; j<rsfrois->rois->NumberOfRegions; j++) {
- val = rsfrois->rois->List[j].MaskVal;
- fptr3 = rsfrois->RSFMask->image;
- for (i=0; i<nv; i++) {
- if (fabs(*fptr3-(float)val)<1e-4) {
- *fptr3=(float)j;
- }
- fptr3++;
- }
- }
- fptr3=rsfrois->RSFMask->image;
- l=(float)(rsfrois->rois->NumberOfRegions)-.5;
- for (i=0; i<nv; i++) {
- if (*fptr3>l) *fptr3=0;
- fptr3++;
- }
- for (i=0; i<nroi; i++) {rsfrois->rois->List[i].MaskVal=i; rsfrois->rois->List[i].NVoxels=0;}
- fptr3=rsfrois->RSFMask->image;
- for (i=0; i<nv; i++) {
- val=(int)rint((double)*fptr3);
- rsfrois->rois->List[val].NVoxels++;
- fptr3++;
- }
- return rsfrois;
- }
- RSFROIS *Preprocess_RSF2(IMAGE_4dfp *FS_Mask, IMAGE_4dfp *Head_Mask, RSFROIS *rsfrois, char *FSLUT)
- /*
- Combine Freesurfer defined masks, MR based head maskinto a RSF Mask.
- */
- {
- int i, j, k, nv, tmp, xb, yb, zb, x, y, z, FSVal[16384], nfsroi, nroi, fsflag[16384], oflag[64], fsidx, val, maxfsval;
- float *fptr1, *fptr2, *fptr3, l;
- char **FSRegions = NULL;
- char line[512], otherstr[256];
- FILE *fp = NULL;
- /* allocate memory and initiate rsfrois */
- nv=FS_Mask->ifh.number_of_bytes_per_pixel*FS_Mask->ifh.matrix_size[0]*FS_Mask->ifh.matrix_size[1]*FS_Mask->ifh.matrix_size[2]*FS_Mask->ifh.matrix_size[3];
- if (!rsfrois) {
- rsfrois=(RSFROIS *)malloc((size_t)sizeof(RSFROIS));
- if (!rsfrois) errm("Preprocess_RSF");
- rsfrois->RSFMask=(IMAGE_4dfp *)malloc((size_t)sizeof(IMAGE_4dfp));
- if (!rsfrois->RSFMask) errm("Preprocess_RSF");
- rsfrois->RSFMask->image=(float *)malloc((size_t)nv);
- if (!rsfrois->RSFMask->image) errm("Preprocess_RSF");
- rsfrois->rois=(ROIList *)malloc((size_t)sizeof(ROIList));
- if (!rsfrois->rois) errm("Preprocess_RSF");
- } else {
- nrerror("rsfrois should be a NULL pointer passing to Preprocess_RSF");
- }
- nv = nv/FS_Mask->ifh.number_of_bytes_per_pixel;
- strcpy(rsfrois->RSFMask->ifh.interfile, FS_Mask->ifh.interfile);
- strcpy(rsfrois->RSFMask->ifh.version_of_keys, FS_Mask->ifh.version_of_keys);
- strcpy(rsfrois->RSFMask->ifh.conversion_program, FS_Mask->ifh.conversion_program);
- strcpy(rsfrois->RSFMask->ifh.name_of_data_file, "RSFMask");
- strcpy(rsfrois->RSFMask->ifh.number_format, FS_Mask->ifh.number_format);
- strcpy(rsfrois->RSFMask->ifh.imagedata_byte_order, FS_Mask->ifh.imagedata_byte_order);
- rsfrois->RSFMask->ifh.number_of_bytes_per_pixel=FS_Mask->ifh.number_of_bytes_per_pixel;
- rsfrois->RSFMask->ifh.number_of_dimensions=FS_Mask->ifh.number_of_dimensions;
- for (i=0; i<3; i++)
- {
- rsfrois->RSFMask->ifh.matrix_size[i]=FS_Mask->ifh.matrix_size[i];
- rsfrois->RSFMask->ifh.scaling_factor[i]=FS_Mask->ifh.scaling_factor[i];
- rsfrois->RSFMask->ifh.mmppix[i]=FS_Mask->ifh.mmppix[i];
- rsfrois->RSFMask->ifh.center[i]=FS_Mask->ifh.center[i];
- }
- rsfrois->RSFMask->ifh.matrix_size[3]=FS_Mask->ifh.matrix_size[3];
- rsfrois->RSFMask->ifh.scaling_factor[3]=FS_Mask->ifh.scaling_factor[3];
- rsfrois->RSFMask->ifh.orientation=FS_Mask->ifh.orientation;
- /* load in freesurfer region definition*/
- FSRegions = (char **)malloc((size_t)(16384*sizeof(char *)));
- if (!FSRegions) errm("Preprocess_RSF");
- fp = fopen(FSLUT,"r");
- if (!fp) errr("Preprocess_RSF",FSLUT);
- maxfsval=0;
- for (i=0; i<16384; i++) fsflag[i]=0;
- while (fgets(line, 512, fp)){
- if (line[0]>='0'&&line[0]<='9') {
- sscanf(line, "%d%s%*s", &maxfsval, otherstr);
- FSRegions[maxfsval]=(char *)malloc((size_t)(256*sizeof(char)));
- if (!FSRegions[maxfsval]) errm("Preprocess_RSF");
- strcpy(FSRegions[maxfsval], otherstr);
- fsflag[maxfsval]=1;
- /*printf("%s\t%d\n",FSRegions[maxfsval],maxfsval);*/
- /*nfsroi++;*/
- }
- }
- fclose(fp);
- printf("maxfsval=%d\n",maxfsval);
- /* combine FS_Mask, Head_Mask to form RSFMask*/
- xb=FS_Mask->ifh.matrix_size[0]/4;
- yb=FS_Mask->ifh.matrix_size[1]/4;
- zb=FS_Mask->ifh.matrix_size[2]/4;
- fptr1=FS_Mask->image;
- fptr2=Head_Mask->image;
- fptr3=rsfrois->RSFMask->image;
- l=0;
- for (i=0; i<64; i++) oflag[i]=0; /*set all "other region" flags to be 0, no "other region" is defined at this point*/
- for (z=0;z<FS_Mask->ifh.matrix_size[2];z++) {
- for (y=0; y<FS_Mask->ifh.matrix_size[1]; y++) {
- for (x=0; x<FS_Mask->ifh.matrix_size[0]; x++) {
- tmp=x/xb+y/yb*4+z/zb*16;
- if (*fptr1>0 ) { /*for voxels defined in FS_Mask*/
- if (l<*fptr1) l=*fptr1;
- *fptr3=*fptr1;
- fsidx=(int)rint((double)*fptr1);
- if (fsflag[fsidx]<=0) { /*the fs region is undefined*/
- if (*fptr2>0) { /*within Head Mask*/
- *fptr3=(float)(tmp+16384);
- oflag[tmp]=1;
- } else {/*outside of Head Mask*/
- *fptr3=0;
- fsflag[0]=2;
- }
- } else { /* fs region is defined */
- fsflag[fsidx]=2;
- }
- } else if (*fptr1<=0&&*fptr2>0) { /*outside of fs defined region, within Head Mask*/
- *fptr3=(float)(tmp+16384);
- oflag[tmp]=1;
- } else {
- *fptr3=0;
- fsflag[0]=2;
- }
- fptr1++;
- fptr2++;
- fptr3++;
- }
- }
- }
- nroi=0;
- maxfsval=(int)rint((double)l);
- printf("maxfsval=%d\n",maxfsval);
- printf("fsflag[%d]=%d\n",1999,fsflag[1999]);
- for (i=0; i<=maxfsval; i++) {
- if (fsflag[i]>1) {nroi++; printf("%s\t%d\n",FSRegions[i], i);}
- }
- printf("nroi=%d\n",nroi);
- for (i=0; i<64; i++) {
- if (oflag[i]>0) nroi++;
- }
- rsfrois->rois->NumberOfRegions=nroi;
- rsfrois->rois->List=(ROI_Info *)malloc((size_t)(nroi*sizeof(ROI_Info)));
- if (!rsfrois->rois->List) errm("Preprocess_RSF");
- k=0;
- for (i=0; i<=maxfsval; i++) {
- if (fsflag[i]>1) {
- strcpy(rsfrois->rois->List[k].Name, FSRegions[i]);
- rsfrois->rois->List[k].MaskVal=i;
- k++;
- }
- }
- for (i=0; i<64; i++) {
- if (oflag[i]>0) {
- sprintf(otherstr,"other%d",i+16384);
- strcpy(rsfrois->rois->List[k].Name, otherstr);
- rsfrois->rois->List[k].MaskVal=i+16384;
- k++;
- }
- }
- printf("%d\n",rsfrois->rois->NumberOfRegions);
- for (j=0; j<rsfrois->rois->NumberOfRegions; j++) {
- val = rsfrois->rois->List[j].MaskVal;
- fptr3 = rsfrois->RSFMask->image;
- for (i=0; i<nv; i++) {
- if (fabs(*fptr3-(float)val)<1e-4) {
- *fptr3=(float)j;
- }
- fptr3++;
- }
- }
- fptr3=rsfrois->RSFMask->image;
- l=(float)(rsfrois->rois->NumberOfRegions)-.5;
- for (i=0; i<nv; i++) {
- if (*fptr3>l) *fptr3=0;
- fptr3++;
- }
- for (i=0; i<nroi; i++) {rsfrois->rois->List[i].MaskVal=i; rsfrois->rois->List[i].NVoxels=0;}
- fptr3=rsfrois->RSFMask->image;
- for (i=0; i<nv; i++) {
- val=(int)rint((double)*fptr3);
- rsfrois->rois->List[val].NVoxels++;
- fptr3++;
- }
- return rsfrois;
- }
- float *RSFPVC(RSFMat *RSFMat, float *roimean, int iters)
- /*
- RSFMat is a RSFMat structure that contains the matrix size n and a floating point matrix of n by n;
- roimean is a vector that counts from 1 to n;
- iters is the number of iterations to be performed using the iterative PVC algorithm;
- The return value is a pointer that points to a vector that counts from 1 to n
- */
- {
- int i, j, k, NROI;
- float *r, *val, *m;
- NROI=RSFMat->n;
- r=vector(1,NROI);
- val=vector(1,NROI);
- m=vector(1,NROI);
- for (i=1; i<=NROI; i++) {m[i]=roimean[i];} /* Initial estimation */
- for (k=0; k<iters; k++)
- {
- for (i=1; i<=NROI; i++){
- val[i]=0.;
- for (j=1; j<=NROI; j++) {
- val[i]+=m[j]*RSFMat->mat[j][i]; /* Blurred regional value assuming current estimation */
- }
- r[i]=fabs(roimean[i]/val[i]); /* ratio between reblurred value and observed value */
- r[i]= (r[i]<1.2)?r[i]:1.2; /* constraints for the ratio to be applied to avoid blow up */
- r[i]= (r[i]>0.8)?r[i]:0.8;
- }
- for (i=1; i<=NROI; i++) {
- m[i]=m[i]*r[i]; /* Apply correction for current iteration */
- }
- }
- free_vector(r, 1, NROI);
- free_vector(val, 1, NROI);
- return m;
- }
- void readtac(char *fn, float *tac, float *frd, float *st, float *nv, int *nframes)
- {
- FILE *fp;
- char line[MAXL], dummy[MAXL];
- float fdum, *fptr1, *fptr2, *fptr3, *fptr4;
- int i;
- if (!(fp=fopen(fn, "r"))) errr("readtac","fn");
- fgets(line, 512, fp);
- sscanf(line, "%s%s%s%s%s%f", dummy, dummy, dummy, dummy, dummy, nv);
- fptr3=tac;
- fptr2=frd;
- fptr1=st;
- *nframes=0;
- while(fgets(line, 512, fp))
- {
- sscanf(line, "%f%f%f%f", &fdum, fptr1, fptr2, fptr3);
- fptr1++;
- fptr2++;
- fptr3++;
- (*nframes)++;
- }
- fclose(fp);
- }
RSF.c at commit 746dd5d, under BSD-3-Clause · at the source
Overview
- Banner Sun Health Research Institute Sun City Arizona USA
- ZRO Imaging Santiago de Compostela Spain
- Banner Alzheimer's Institute Phoenix Arizona USA
- Beckman Coulter Inc. Chaska Minnesota USA
Abstract
INTRODUCTION: Plasma phosphorylated tau (p‐tau), particularly p‐tau217, is a highly specific biomarker of Alzheimer's disease (AD) pathology. However, plasma p‐tau217 can be elevated in rare non‐AD conditions. Brain‐derived (BD) p‐tau217 may reduce these off‐target effects, but its performance against neuropathology has not been evaluated.
METHODS: We compared p‐tau217, BD p‐tau217, their amyloid beta 42 (Aβ42) ratios, BD p‐tau217/
RESULTS: All markers tracked neuropathological severity, with BD p‐tau217 having larger fold‐changes than p‐tau217 but BD p‐tau217/
DISCUSSION: BD p‐tau217 and BD‐based ratios enhance dynamic range and prognostic performance while maintaining diagnostic accuracy, supporting further clinical evaluation.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 1 match between paragraphs and lines of code.
ysu001/PUP
746dd5dce34807d85a820ac02aa22887a71005ed, 13 October 2020Availability: 1 check, the latest on 26 September 2026: the link answers
- 26 September 2026: the link answers
277 files
- 4dfp/
4dfptoanalyze/ — C, 268 lines4dfptoanalyze.c - 4dfp/
JSSutil/ — C, 229 linesJSSnrutil.c - 4dfp/
JSSutil/ — C, 382 linesJSSstatistics.c - 4dfp/
JSSutil/ — C/C++, 48 linesJSSstatistics.h - 4dfp/
JSSutil/ — C/C++, 89 linesJSSutil.h - 4dfp/
JSSutil/ — C, 460 lineslin_algebra.c - 4dfp/
JSSutil/ — C, 89 linesrandom.c - 4dfp/
S2T_4dfp/ — C, 162 linesC2T_4dfp.c - 4dfp/
S2T_4dfp/ — C, 158 linesS2T_4dfp.c - 4dfp/
S2T_4dfp/ — C, 153 linesT2C_4dfp.c - 4dfp/
S2T_4dfp/ — C, 152 linesT2S_4dfp.c - 4dfp/
TRX/ — C/C++, 66 linesANALYZE.h - 4dfp/
TRX/ — C, 317 linesGetifh.c - 4dfp/
TRX/ — C/C++, 43 linesGetifh.h - 4dfp/
TRX/ — C, 111 linesInithdr.c - 4dfp/
TRX/ — C, 161 linesasciito4dfp.c - 4dfp/
TRX/ — C, 182 linesendian_4dfp.c - 4dfp/
TRX/ — C, 343 linesendianio.c - 4dfp/
TRX/ — C/C++, 55 linesendianio.h - 4dfp/
TRX/ — C/C++, 50 linesifh.h - 4dfp/
TRX/ — C, 134 linesifh2hdr.c - 4dfp/
TRX/ — C, 276 linesrec.c - 4dfp/
TRX/ — C/C++, 33 linesrec.h - 4dfp/
TRX/ — C/C++, 45 linesspline23dvgh.h - 4dfp/
TRX/ — C, 69 linesspline23dvgh_test.c - 4dfp/
actmapf_4dfp/ — C, 586 linesGC_4dfp.c - 4dfp/
actmapf_4dfp/ — C, 503 linesGC_dat.c - 4dfp/
actmapf_4dfp/ — C, 512 linesLDA.c - 4dfp/
actmapf_4dfp/ — C, 243 linesLOWESS.c - 4dfp/
actmapf_4dfp/ — C, 438 linesactmapf_4dfp.c - 4dfp/
actmapf_4dfp/ — C, 193 linescompute_defined_4dfp.c - 4dfp/
actmapf_4dfp/ — C, 323 linesconc.c - 4dfp/
actmapf_4dfp/ — C/C++, 54 linesconc.h - 4dfp/
actmapf_4dfp/ — C, 164 linesconc_test.c - 4dfp/
actmapf_4dfp/ — C, 159 linescondense.c - 4dfp/
actmapf_4dfp/ — C, 870 linescovariance.c - 4dfp/
actmapf_4dfp/ — C, 340 linescovariance_analysis.c - 4dfp/
actmapf_4dfp/ — C, 171 linesexpandf.c - 4dfp/
actmapf_4dfp/ — C, 91 linesformat2lst.c - 4dfp/
actmapf_4dfp/ — C, 782 linesglm_4dfp.c - 4dfp/
actmapf_4dfp/ — C, 453 linesmat_algebra.c - 4dfp/
aff_conv/ — C, 573 linesaff_conv.c - 4dfp/
algebra_4dfp/ — C, 346 linesRFX_4dfp.c - 4dfp/
algebra_4dfp/ — C, 284 linesROI_resolve_4dfp.c - 4dfp/
algebra_4dfp/ — C, 426 linesimgopr_4dfp.c - 4dfp/
algebra_4dfp/ — C, 223 linesspatial_corr_4dfp.c - 4dfp/
algebra_4dfp/ — C, 215 linesspatial_cov_multivol_4df p.c - 4dfp/
analyzeto4dfp/ — C, 340 linesanalyzeto4dfp.c - 4dfp/
analyzeto4dfp/ — C, 106 lineshdr2txt.c - 4dfp/
cluster_4dfp/ — C, 501 linescluster_4dfp.c - 4dfp/
collate_slice_4dfp/ — C, 195 linescollate_slice_4dfp.c - 4dfp/
crop_4dfp/ — C, 314 linescrop_4dfp.c - 4dfp/
crop_4dfp/ — C, 236 lineszero_slice_4dfp.c - 4dfp/
cross_realign3d_4dfp/ — C, 697 linescross_realign3d_4dfp.c - 4dfp/
cross_realign3d_4dfp/ — C, 32 linesgauss2diz.c - 4dfp/
cross_realign3d_4dfp/ — C, 42 linesgauss3diz.c - 4dfp/
cross_realign3d_4dfp/ — C, 340 linesmat2dat.c - 4dfp/
cs2ap_4dfp/ — C, 162 linescs2ap_4dfp.c - 4dfp/
dcm_dump_file/ — C, 558 linescondition.c - 4dfp/
dcm_dump_file/ — C, 218 linesctnthread.c - 4dfp/
dcm_dump_file/ — C, 7,314 linesdcm.c - 4dfp/
dcm_dump_file/ — C, 273 linesdcm_dump_file.c - 4dfp/
dcm_dump_file/ — C, 173 linesdcmcond.c - 4dfp/
dcm_dump_file/ — C, 2,144 linesdcmdict.c - 4dfp/
dcm_dump_file/ — C, 229 linesdcmsupport.c - 4dfp/
dcm_dump_file/ — C/C++, 88 linesinclude/ condition.h - 4dfp/
dcm_dump_file/ — C/C++, 79 linesinclude/ ctnthread.h - 4dfp/
dcm_dump_file/ — C/C++, 162 linesinclude/ dcmprivate.h - 4dfp/
dcm_dump_file/ — C/C++, 272 linesinclude/ dicom.h - 4dfp/
dcm_dump_file/ — C/C++, 1,704 linesinclude/ dicom_objects.h - 4dfp/
dcm_dump_file/ — C/C++, 264 linesinclude/ dicom_uids.h - 4dfp/
dcm_dump_file/ — C/C++, 104 linesinclude/ lst.h - 4dfp/
dcm_dump_file/ — C/C++, 71 linesinclude/ lstprivate.h - 4dfp/
dcm_dump_file/ — C/C++, 121 linesinclude/ utility.h - 4dfp/
dcm_dump_file/ — C, 539 lineslst.c - 4dfp/
dcm_dump_file/ — C, 1,093 linesutility.c - 4dfp/
dcm_pet/ — C, 558 linescondition.c - 4dfp/
dcm_pet/ — C/C++, 197 linesconfig.h - 4dfp/
dcm_pet/ — C, 218 linesctnthread.c - 4dfp/
dcm_pet/ — C, 7,363 linesdcm.c - 4dfp/
dcm_pet/ — C, 2,744 linesdcm_pet.c - 4dfp/
dcm_pet/ — C, 165 linesdcmcond.c - 4dfp/
dcm_pet/ — C, 2,144 linesdcmdict.c - 4dfp/
dcm_pet/ — C, 229 linesdcmsupport.c - 4dfp/
dcm_pet/ — C/C++, 130 linesinclude/ common_disp.h - 4dfp/
dcm_pet/ — C/C++, 88 linesinclude/ condition.h - 4dfp/
dcm_pet/ — C/C++, 113 linesinclude/ ctn_os.h - 4dfp/
dcm_pet/ — C/C++, 79 linesinclude/ ctnthread.h - 4dfp/
dcm_pet/ — C/C++, 130 linesinclude/ dcm_pet.h - 4dfp/
dcm_pet/ — C/C++, 162 linesinclude/ dcmprivate.h - 4dfp/
dcm_pet/ — C/C++, 272 linesinclude/ dicom.h - 4dfp/
dcm_pet/ — C/C++, 108 linesinclude/ dicom_chr.h - 4dfp/
dcm_pet/ — C/C++, 1,704 linesinclude/ dicom_objects.h - 4dfp/
dcm_pet/ — C/C++, 710 linesinclude/ dicom_sq.h - 4dfp/
dcm_pet/ — C/C++, 264 linesinclude/ dicom_uids.h - 4dfp/
dcm_pet/ — C/C++, 477 linesinclude/ dulprotocol.h - 4dfp/
dcm_pet/ — C/C++, 104 linesinclude/ lst.h - 4dfp/
dcm_pet/ — C/C++, 71 linesinclude/ lstprivate.h - 4dfp/
dcm_pet/ — C/C++, 121 linesinclude/ utility.h - 4dfp/
dcm_pet/ — C, 539 lineslst.c - 4dfp/
dcm_pet/ — C, 199 linespixel_ops.c - 4dfp/
dcm_pet/ — C, 3,131 linessequences.c - 4dfp/
dcm_pet/ — C, 112 linessqcond.c - 4dfp/
dcm_pet/ — C, 1,093 linesutility.c - 4dfp/
dcm_to_4dfp/ — C, 558 linescondition.c - 4dfp/
dcm_to_4dfp/ — C/C++, 198 linesconfig.h - 4dfp/
dcm_to_4dfp/ — C, 218 linesctnthread.c - 4dfp/
dcm_to_4dfp/ — C, 7,363 linesdcm.c - 4dfp/
dcm_to_4dfp/ — C, 1,799 linesdcm_to_4dfp.c - 4dfp/
dcm_to_4dfp/ — C, 169 linesdcmcond.c - 4dfp/
dcm_to_4dfp/ — C, 2,144 linesdcmdict.c - 4dfp/
dcm_to_4dfp/ — C, 229 linesdcmsupport.c - 4dfp/
dcm_to_4dfp/ — C, 2 linesgitversion.c - 4dfp/
dcm_to_4dfp/ — C/C++, 88 linesinclude/ condition.h - 4dfp/
dcm_to_4dfp/ — C/C++, 79 linesinclude/ ctnthread.h - 4dfp/
dcm_to_4dfp/ — C/C++, 71 linesinclude/ dcm_to_analyze.h - 4dfp/
dcm_to_4dfp/ — C/C++, 162 linesinclude/ dcmprivate.h - 4dfp/
dcm_to_4dfp/ — C/C++, 260 linesinclude/ dicom.h - 4dfp/
dcm_to_4dfp/ — C/C++, 1,704 linesinclude/ dicom_objects.h - 4dfp/
dcm_to_4dfp/ — C/C++, 264 linesinclude/ dicom_uids.h - 4dfp/
dcm_to_4dfp/ — C/C++, 104 linesinclude/ lst.h - 4dfp/
dcm_to_4dfp/ — C/C++, 71 linesinclude/ lstprivate.h - 4dfp/
dcm_to_4dfp/ — C/C++, 121 linesinclude/ utility.h - 4dfp/
dcm_to_4dfp/ — C, 539 lineslst.c - 4dfp/
dcm_to_4dfp/ — C, 174 linespixel_ops.c - 4dfp/
dcm_to_4dfp/ — C, 122 linestest_dcm.c - 4dfp/
dcm_to_4dfp/ — C, 458 linestest_dcm_to_4dfp.c - 4dfp/
dcm_to_4dfp/ — C, 1,090 linesutility.c - 4dfp/
deband_4dfp/ — C, 321 linesdeband_4dfp.c - 4dfp/
diff4dfp/ — C, 247 linesaffine_DTrot.c - 4dfp/
diff4dfp/ — C, 608 linescontour.c - 4dfp/
diff4dfp/ — C, 390 linesdiffRGB_4dfp.c - 4dfp/
diff4dfp/ — C, 1,119 linesdiff_4dfp.c - 4dfp/
diff4dfp/ — C, 627 linesdtensor.c - 4dfp/
diff4dfp/ — C, 1,222 linesfeat.c - 4dfp/
diff4dfp/ — C, 579 linesfuzzy.c - 4dfp/
diff4dfp/ — C, 102 linesget_dti_params.c - 4dfp/
diff4dfp/ — C/C++, 190 linesknee.h - 4dfp/
diff4dfp/ — C, 1,025 linesmorph.c - 4dfp/
diff4dfp/ — C, 868 linesnonlinear.c - 4dfp/
diff4dfp/ — C, 70 linest4tolin.c - 4dfp/
diff4dfp/ — C, 336 lineswhisker_4dfp.c - 4dfp/
dwi_xalign_4dfp/ — C, 550 linesdwi_cross_xalign3d_4dfp. c - 4dfp/
dwi_xalign_4dfp/ — C, 638 linesdwi_xalign3d_4dfp.c - 4dfp/
ecat/ — C, 501 linesecat_header.c - 4dfp/
ecat/ — C/C++, 17 linesecat_header.h - 4dfp/
ecat/ — C, 227 linesecatto4dfp.c - 4dfp/
flip_4dfp/ — C, 80 linescflip.c - 4dfp/
flip_4dfp/ — C, 146 linesflip_4dfp.c - 4dfp/
flip_4dfp/ — C/C++, 9 linesflip_4dfp.h - 4dfp/
frame_align/ — C, 274 linesframe_align_4dfp.c - 4dfp/
frame_align/ — C, 102 linesrfft1d.c - 4dfp/
frame_align/ — C, 28 linesslice_sequence.c - 4dfp/
gauss_4dfp/ — C, 98 linescgauss3dd.c - 4dfp/
gauss_4dfp/ — C, 263 linesgauss_4dfp.c - 4dfp/
gauss_4dfp/ — C, 156 lineshsphere_4dfp.c - 4dfp/
imato4dfp2/ — C, 307 linesunpack_4dfp.c - 4dfp/
img2msk_4dfp/ — C, 150 linesimg2msk_4dfp.c - 4dfp/
img_hist_4dfp/ — C, 163 linesfimg_mode.c - 4dfp/
img_hist_4dfp/ — C, 452 linesimg_hist_4dfp.c - 4dfp/
imgblur_4dfp/ — C, 177 linesimgblur_4dfp.c - 4dfp/
imglin/ — C, 37 linesdnormal.c - 4dfp/
imglin/ — C, 221 linesimgsurf_4dfp.c - 4dfp/
imglin/ — C, 124 linesstretch_out.c - 4dfp/
imglin/ — C, 115 linest4_factor.c - 4dfp/
imglin/ — C, 96 linest4_ident.c - 4dfp/
imglin/ — C, 183 linest4_inv.c - 4dfp/
imglin/ — C, 102 linest4_io.c - 4dfp/
imglin/ — C/C++, 15 linest4_io.h - 4dfp/
imglin/ — C, 187 linest4_mul.c - 4dfp/
imglin/ — C, 265 linest4_opr.c - 4dfp/
imglin/ — C, 136 linest4_pts.c - 4dfp/
imglin/ — C, 300 linest4_resolve.c - 4dfp/
imglin/ — C/C++, 11 linest4_sub.h - 4dfp/
imglin/ — C, 29 linest4scale.c - 4dfp/
imgmax_4dfp/ — C, 191 linesimgmax_4dfp.c - 4dfp/
imgreg_4dfp/ — C, 237 linesimgreg_4dfp.c - 4dfp/
interp_4dfp/ — C, 390 linesbandpass_4dfp.c - 4dfp/
interp_4dfp/ — C, 260 linesinterp_4dfp.c - 4dfp/
librms/ — C, 102 linescgauss3d.c - 4dfp/
librms/ — C, 79 linesdgeigen.c - 4dfp/
librms/ — C, 331 linesdsvdcmp0.c - 4dfp/
librms/ — C, 105 linesfft_test.c - 4dfp/
librms/ — C, 47 linesimag2mask.c - 4dfp/
librms/ — C, 42 linesimg2lmask.c - 4dfp/
librms/ — C, 45 linesimg2lmask_test.c - 4dfp/
librms/ — C/C++, 114 lineslibrms.h - 4dfp/
maskimg_4dfp/ — C, 251 linesmaskimg_4dfp.c - 4dfp/
mpetto4dfp/ — C, 656 linesmpetto4dfp.c - 4dfp/
mprtir/ — C, 361 lines2Dhist.c - 4dfp/
mprtir/ — C, 726 linespartitiond_gfc_4dfp.c - 4dfp/
nifti_4dfp/ — C, 732 lines4dfp-format.c - 4dfp/
nifti_4dfp/ — C/C++, 26 lines4dfp-format.h - 4dfp/
nifti_4dfp/ — C, 156 linescommon-format.c - 4dfp/
nifti_4dfp/ — C/C++, 112 linescommon-format.h - 4dfp/
nifti_4dfp/ — C/C++, 49 linesmystdint.h - 4dfp/
nifti_4dfp/ — C, 956 linesnifti-format.c - 4dfp/
nifti_4dfp/ — C/C++, 40 linesnifti-format.h - 4dfp/
nifti_4dfp/ — C/C++, 1,521 linesnifti1.h - 4dfp/
nifti_4dfp/ — C, 145 linesnifti_4dfp.c - 4dfp/
nifti_4dfp/ — C, 11 linesparse_common.c - 4dfp/
nifti_4dfp/ — C/C++, 3 linesparse_common.h - 4dfp/
nifti_4dfp/ — C, 41 linessplit.c - 4dfp/
nifti_4dfp/ — C, 354 linestransform.c - 4dfp/
nifti_4dfp/ — C/C++, 39 linestransform.h - 4dfp/
nonlin/ — C, 482 linesiic.c - 4dfp/
nonlin/ — C, 98 lineslud.c - 4dfp/
nonlin/ — C, 620 linesmorphc_4dfp.c - 4dfp/
nonlin/ — C, 158 linespiic.c - 4dfp/
normalize_4dfp/ — C, 61 linesimg2hist.c - 4dfp/
normalize_4dfp/ — C, 368 linesnormalize_4dfp.c - 4dfp/
paste_4dfp/ — C, 309 linespaste_4dfp.c - 4dfp/
peak_4dfp/ — C, 347 linesburn_sphere_4dfp.c - 4dfp/
peak_4dfp/ — C, 141 linesindex2atl.c - 4dfp/
peak_4dfp/ — C, 625 linespeak_4dfp.c - 4dfp/
peak_4dfp/ — C, 125 linesread_4dfp.c - 4dfp/
permute/ — C, 73 linespermute.c - 4dfp/
permute/ — C, 63 linespermuteN.c - 4dfp/
qnt_4dfp/ — C, 342 linesqnt_4dfp.c - 4dfp/
qnt_4dfp/ — C, 309 linesqntm_4dfp.c - 4dfp/
qnt_4dfp/ — C, 491 linesqntv_4dfp.c - 4dfp/
qnt_4dfp/ — C, 241 linesqntw_4dfp.c - 4dfp/
reindex_4dfp/ — C, 230 linesreindex_4dfp.c - 4dfp/
rmspike_4dfp/ — C, 300 linesrmspike_4dfp.c - 4dfp/
scale_4dfp/ — C, 229 linesscale_4dfp.c - 4dfp/
sqrt_4dfp/ — C, 134 linesbertulani_betai.c - 4dfp/
sqrt_4dfp/ — C, 194 linesrho2z_4dfp.c - 4dfp/
sqrt_4dfp/ — C, 170 linessqrt_4dfp.c - 4dfp/
sqrt_4dfp/ — C, 211 linesstatsub.c - 4dfp/
sqrt_4dfp/ — C, 232 linest2z_4dfp.c - 4dfp/
sqrt_4dfp/ — C, 196 linesz2logp_4dfp.c - 4dfp/
sum_pet_4dfp/ — C, 332 linessum_pet_4dfp.c - 4dfp/
t4_actmapf_4dfp/ — C, 394 linest4_xr3d_4dfp.c - 4dfp/
t4imgs_4dfp/ — C, 39 linesNaN_test.c - 4dfp/
t4imgs_4dfp/ — C, 32 linescvrtflip.c - 4dfp/
t4imgs_4dfp/ — C, 667 linest4imgs_4dfp.c - 4dfp/
var_4dfp/ — C, 212 linesdvar_4dfp.c - 4dfp/
var_4dfp/ — C, 444 linesvar_4dfp.c - 4dfp/
wrpsmg_4dfp/ — C, 606 lineswrpsmg_4dfp.c - 4dfp/
zero_lt_4dfp/ — C, 150 lineszero_gt_4dfp.c - 4dfp/
zero_lt_4dfp/ — C, 155 lineszero_gtlt_4dfp.c - 4dfp/
zero_lt_4dfp/ — C, 162 lineszero_lt_4dfp.c - 4dfp/
zero_lt_4dfp/ — C, 155 lineszero_ltgt_4dfp.c - matlabcode/
Getifh.m — MATLAB, 96 lines - matlabcode/
Writeifh.m — MATLAB, 36 lines - matlabcode/
emab.m — MATLAB, 43 lines - matlabcode/
emabv1.m — MATLAB, 30 lines - matlabcode/
emart.m — MATLAB, 43 lines - matlabcode/
emart2.m — MATLAB, 50 lines - matlabcode/
emartv1.m — MATLAB, 30 lines - matlabcode/
findtroisize.m — MATLAB, 12 lines - matlabcode/
read4dfp.m — MATLAB, 48 lines - matlabcode/
write4dfp.m — MATLAB, 46 lines - scripts/
pettb.pl — Perl, 79 lines - src/
ANALYZE.h — C/C++, 69 lines - src/
Getifh.c — C, 316 lines - src/
Getifh.h — C/C++, 46 lines - src/
PreprocessRSFtest2.c — C, 44 lines - src/
RSF.c — C, 793 lines, 1 match - src/
RSF.h — C/C++, 47 lines - src/
calrsfmat.c — C, 59 lines - src/
cgauss3d.c — C, 105 lines - src/
endianio.c — C, 343 lines - src/
endianio.h — C/C++, 58 lines - src/
fs2brain.c — C, 106 lines - src/
ifh.h — C/C++, 53 lines - src/
librms.h — C/C++, 117 lines - src/
loganREF.c — C, 87 lines - src/
loganREFROI.c — C, 74 lines - src/
nrutil.c — C, 67 lines - src/
nrutil.h — C/C++, 101 lines - src/
rec.h — C/C++, 36 lines - src/
roieval2.c — C, 71 lines - src/
roieval3.c — C, 73 lines - src/
rsfroieval2.c — C, 95 lines - LICENSE — License, 24 lines
- README.md — Text, 47 lines
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 275 scripts, each with its path and the digest of its content;
- 1 match between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 16 authors, 9 keywords, 13 MeSH terms, 6 funders, 37 references.
Cite
This paper
Denkinger, M. N., Brum, W. S., Leuzy, A., Singh, A., Marques, T. M., Ghisays, V., Protas, H., Su, Y., Atri, A., Beach, T. G., Serrano, G. E., Bhatt, K., Carlson, C. M., Hoffmann, K., Reiman, E. M., & Ashton, N. J. (2026). Brain-derived plasma p-tau217 shows enhanced dynamic range for Alzheimer's disease neuropathological change. Alzheimer's & dementia : the journal of the Alzheimer's Association, 22(9), e71773. https://
BibTeX
@article{denkinger2026br
author = {Denkinger, Marisa N. and Brum, Wagner S. and Leuzy, Antoine and Singh, Alpana and Marques, Taina M. and Ghisays, Valentina and Protas, Hillary and Su, Yi and Atri, Ali and Beach, Thomas G. and Serrano, Geidy E. and Bhatt, Kinal and Carlson, Corey M. and Hoffmann, Katharine and Reiman, Eric M. and Ashton, Nicholas J.},
title = {{Brain-derived plasma p-tau217 shows enhanced dynamic range for Alzheimer's disease neuropathological change}},
journal = {Alzheimer's \& dementia : the journal of the Alzheimer's Association},
year = {2026},
month = sep,
volume = {22},
number = {9},
pages = {e71773},
publisher = {Wiley},
issn = {1552-5260},
doi = {10.1002/
url = {https://
pmid = {42677463},
pmcid = {PMC13531372}
}
RIS
TY - JOUR
AU - Denkinger, Marisa N.
AU - Brum, Wagner S.
AU - Leuzy, Antoine
AU - Singh, Alpana
AU - Marques, Taina M.
AU - Ghisays, Valentina
AU - Protas, Hillary
AU - Su, Yi
AU - Atri, Ali
AU - Beach, Thomas G.
AU - Serrano, Geidy E.
AU - Bhatt, Kinal
AU - Carlson, Corey M.
AU - Hoffmann, Katharine
AU - Reiman, Eric M.
AU - Ashton, Nicholas J.
TI - Brain-derived plasma p-tau217 shows enhanced dynamic range for Alzheimer's disease neuropathological change
T2 - Alzheimer's & dementia : the journal of the Alzheimer's Association
J2 - Alzheimers Dement
PY - 2026
DA - 2026/
VL - 22
IS - 9
SP - e71773
SN - 1552-5260
PB - Wiley
DO - 10.1002/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1002/
"type": "article-journal",
"title": "Brain-derived plasma p-tau217 shows enhanced dynamic range for Alzheimer's disease neuropathological change",
"container-title": "Alzheimer's & dementia : the journal of the Alzheimer's Association",
"author": [
{
"family": "Denkinger",
"given": "Marisa N."
},
{
"family": "Brum",
"given": "Wagner S."
},
{
"family": "Leuzy",
"given": "Antoine"
},
{
"family": "Singh",
"given": "Alpana"
},
{
"family": "Marques",
"given": "Taina M."
},
{
"family": "Ghisays",
"given": "Valentina"
},
{
"family": "Protas",
"given": "Hillary"
},
{
"family": "Su",
"given": "Yi"
},
{
"family": "Atri",
"given": "Ali"
},
{
"family": "Beach",
"given": "Thomas G."
},
{
"family": "Serrano",
"given": "Geidy E."
},
{
"family": "Bhatt",
"given": "Kinal"
},
{
"family": "Carlson",
"given": "Corey M."
},
{
"family": "Hoffmann",
"given": "Katharine"
},
{
"family": "Reiman",
"given": "Eric M."
},
{
"family": "Ashton",
"given": "Nicholas J."
}
],
"container-title-short":
"volume": "22",
"issue": "9",
"page": "e71773",
"DOI": "10.1002/
"PMID": "42677463",
"PMCID": "PMC13531372",
"ISSN": "1552-5260",
"publisher": "Wiley",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
9,
1
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1093/brain/awaf375 [code]
- Reference proteins to improve Core 1 and Core 2 Alzheimer's disease CSF and plasma biomarkers.Journal: Brain : a journal of neurologyIn common: PET / SPECT, other, Alzheimer's / dementia, 6 references
- [2] doi:10.1002/alz.71711 [code]
- Exploring longitudinal relationships among Alzheimer's disease biomarkers.Journal: Alzheimer's & dementia : the journal of the Alzheimer's AssociationIn common: PET / SPECT, other, Alzheimer's / dementia, 5 references
- [3] doi:10.1002/ana.78300
- Distribution of Big Tau Isoforms in the Human Central and Peripheral Nervous System.Journal: Annals of neurologyIn common: other, Alzheimer's / dementia, 5 references
- [4] doi:10.1186/s13195-026-02119-z
- Age-dependent diagnostic and correlational architecture of multiplex plasma biomarkers in Alzheimer's disease: a cross-ethnic, cross-platform validation study.Journal: Alzheimer's research & therapyIn common: PET / SPECT, other, Alzheimer's / dementia, 5 references
- [5] doi:10.1002/acn3.70423
- Impact of Plasma p-tau181 on Cognition, Motor Phenotypes, and Disease Course in ALS.Journal: Annals of clinical and translational neurologyIn common: other, Alzheimer's / dementia, 5 references
- [6] doi:10.1002/alz.71530 [code]
- Differential associations of plasma biomarkers with Alzheimer's disease and small vessel disease: A multimodal imaging study.Journal: Alzheimer's & dementia : the journal of the Alzheimer's AssociationIn common: PET / SPECT, other, Alzheimer's / dementia, 4 references
- [7] doi:10.64898/2026.05.06.26352540 [code]
- Generating synthetic tau-PET scans in Alzheimer’s disease from MRI, blood biomarkers and demographics with deep learningJournal: medRxiv (preprint)In common: PET / SPECT, other, Alzheimer's / dementia, 4 references
- [8] doi:10.1093/brain/awaf413 [code]
- Estimating the time course of biomarker changes in Alzheimer's disease.Journal: Brain : a journal of neurologyIn common: PET / SPECT, Alzheimer's / dementia, 4 references
- [9] doi:10.1007/s00401-026-03042-1
- Tau368 improves p-tau diagnostic accuracy for FTLD-tau from FTLD-TDP.Journal: Acta neuropathologicaIn common: Alzheimer's / dementia, 4 references
- [10] doi:10.1002/hbm.70508 [code]
- Cyclic 2.5D Perceptual Loss for Cross-Modal 3D Medical Image Synthesis: T1w MRI to Tau PET.Journal: Human brain mappingIn common: PET / SPECT, Alzheimer's / dementia, 3 references
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 275 scripts, and 1 match between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:b89e87aaf8840239…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
