Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/lib/diderot.c
ViewVC logotype

Diff of /branches/pure-cfg/src/lib/diderot.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 880, Wed Apr 20 12:47:26 2011 UTC revision 881, Wed Apr 20 13:11:08 2011 UTC
# Line 435  Line 435 
435      Nrrd *nin = LoadNrrdFile (name);      Nrrd *nin = LoadNrrdFile (name);
436      Diderot_image1D_t *img = (Diderot_image1D_t *)malloc(sizeof(Diderot_image1D_t));      Diderot_image1D_t *img = (Diderot_image1D_t *)malloc(sizeof(Diderot_image1D_t));
437    
438      // compute the offset to the first space axis
439        int base = nin->dim - nin->spaceDim;
440    
441      img->dim = 1;      img->dim = 1;
442      img->size[0] = nin->axis[0].size;      img->size[0] = nin->axis[base+0].size;
443      img->data = nin->data;      img->data = nin->data;
444    
445  printf("LoadImage \"%s\": dim = 1, axes = <%d>\n", name, img->size[0]);  printf("LoadImage \"%s\": space dim = 1, axes = <%d>\n",
446    name, img->size[base+0]);
447      LoadTransformM2x2 (nin, img->m);      LoadTransformM2x2 (nin, img->m);
448      InvertM2x2 (img->m, img->mInv);      InvertM2x2 (img->m, img->mInv);
449  PrintMat2x2("m", img->m);  PrintMat2x2("m", img->m);
# Line 454  Line 458 
458      Nrrd *nin = LoadNrrdFile (name);      Nrrd *nin = LoadNrrdFile (name);
459      Diderot_image2D_t *img = (Diderot_image2D_t *)malloc(sizeof(Diderot_image2D_t));      Diderot_image2D_t *img = (Diderot_image2D_t *)malloc(sizeof(Diderot_image2D_t));
460    
461      // compute the offset to the first space axis
462        int base = nin->dim - nin->spaceDim;
463    
464      img->dim = 2;      img->dim = 2;
465      img->size[0] = nin->axis[0].size;      img->size[0] = nin->axis[base+0].size;
466      img->size[1] = nin->axis[1].size;      img->size[1] = nin->axis[base+1].size;
467      img->data = nin->data;      img->data = nin->data;
468    
469  printf("LoadImage \"%s\": dim = 2, axes = <%d, %d>\n", name, img->size[0], img->size[1]);  printf("LoadImage \"%s\": space dim = 2, axes = <%d, %d>\n",
470    name, img->size[0], img->size[1]);
471      LoadTransformM3x3 (nin, img->m);      LoadTransformM3x3 (nin, img->m);
472      InvertM3x3 (img->m, img->mInv);      InvertM3x3 (img->m, img->mInv);
473      InvertTransposeM3x3 (img->m, img->mInvT);      InvertTransposeM3x3 (img->m, img->mInvT);
# Line 476  Line 484 
484      Nrrd *nin = LoadNrrdFile (name);      Nrrd *nin = LoadNrrdFile (name);
485      Diderot_image3D_t *img = (Diderot_image3D_t *)malloc(sizeof(Diderot_image3D_t));      Diderot_image3D_t *img = (Diderot_image3D_t *)malloc(sizeof(Diderot_image3D_t));
486    
487      // compute the offset to the first space axis
488        int base = nin->dim - nin->spaceDim;
489    
490      img->dim = 3;      img->dim = 3;
491      img->size[0] = nin->axis[0].size;      img->size[0] = nin->axis[base+0].size;
492      img->size[1] = nin->axis[1].size;      img->size[1] = nin->axis[base+1].size;
493      img->size[2] = nin->axis[2].size;      img->size[2] = nin->axis[base+2].size;
494      img->data = nin->data;      img->data = nin->data;
495    
496  printf("LoadImage \"%s\": dim = 3, axes = <%d, %d, %d>\n",  printf("LoadImage \"%s\": space dim = 3, axes = <%d, %d, %d>\n",
497  name, img->size[0], img->size[1], img->size[2]);  name, img->size[0], img->size[1], img->size[2]);
498      LoadTransformM4x4 (nin, img->m);      LoadTransformM4x4 (nin, img->m);
499      InvertM4x4 (img->m, img->mInv);      InvertM4x4 (img->m, img->mInv);

Legend:
Removed from v.880  
changed lines
  Added in v.881

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0