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 878, Wed Apr 20 03:42:56 2011 UTC revision 879, Wed Apr 20 12:37:36 2011 UTC
# Line 138  Line 138 
138  {  {
139  #define M(i,j)  m[i].r[j]  #define M(i,j)  m[i].r[j]
140    
141      // compute the offset to the first space axis
142        int base = nin->dim - nin->spaceDim;
143    
144    // Image axis Scaling and Rotation    // Image axis Scaling and Rotation
145      M(0,0) = nin->axis[0].spaceDirection[0];      M(0,0) = nin->axis[base+0].spaceDirection[0];
146    
147    // Image location    // Image location
148      M(0,1) = nin->spaceOrigin[0];      M(0,1) = nin->spaceOrigin[0];
# Line 201  Line 204 
204  {  {
205  #define M(i,j)  m[i].r[j]  #define M(i,j)  m[i].r[j]
206    
207      // compute the offset to the first space axis
208        int base = nin->dim - nin->spaceDim;
209    
210    // Image axis Scaling and Rotation    // Image axis Scaling and Rotation
211      M(0,0) = nin->axis[0].spaceDirection[0];      M(0,0) = nin->axis[base+0].spaceDirection[0];
212      M(1,0) = nin->axis[0].spaceDirection[1];      M(1,0) = nin->axis[base+0].spaceDirection[1];
213      M(0,1) = nin->axis[1].spaceDirection[0];      M(0,1) = nin->axis[base+1].spaceDirection[0];
214      M(1,1) = nin->axis[1].spaceDirection[1];      M(1,1) = nin->axis[base+1].spaceDirection[1];
215    
216    // Image location    // Image location
217      M(0,2) = nin->spaceOrigin[0];      M(0,2) = nin->spaceOrigin[0];
# Line 378  Line 384 
384  {  {
385  #define M(i,j)  m[i].r[j]  #define M(i,j)  m[i].r[j]
386    
387      // compute the offset to the first space axis
388        int base = nin->dim - nin->spaceDim;
389    
390    // Image axis Scaling and Rotation    // Image axis Scaling and Rotation
391      M(0,0) = nin->axis[0].spaceDirection[0];      M(0,0) = nin->axis[base+0].spaceDirection[0];
392      M(1,0) = nin->axis[0].spaceDirection[1];      M(1,0) = nin->axis[base+0].spaceDirection[1];
393      M(2,0) = nin->axis[0].spaceDirection[2];      M(2,0) = nin->axis[base+0].spaceDirection[2];
394      M(0,1) = nin->axis[1].spaceDirection[0];      M(0,1) = nin->axis[base+1].spaceDirection[0];
395      M(1,1) = nin->axis[1].spaceDirection[1];      M(1,1) = nin->axis[base+1].spaceDirection[1];
396      M(2,1) = nin->axis[1].spaceDirection[2];      M(2,1) = nin->axis[base+1].spaceDirection[2];
397      M(0,2) = nin->axis[2].spaceDirection[0];      M(0,2) = nin->axis[base+2].spaceDirection[0];
398      M(1,2) = nin->axis[2].spaceDirection[1];      M(1,2) = nin->axis[base+2].spaceDirection[1];
399      M(2,2) = nin->axis[2].spaceDirection[2];      M(2,2) = nin->axis[base+2].spaceDirection[2];
400    
401    // Image location    // Image location
402      M(0,3) = nin->spaceOrigin[0];      M(0,3) = nin->spaceOrigin[0];

Legend:
Removed from v.878  
changed lines
  Added in v.879

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