Changeset 28988
- Timestamp:
- Aug 20, 2010, 10:56:07 AM (16 years ago)
- Location:
- branches/eam_branches/ipp-20100621/Ohana/src/libdvo
- Files:
-
- 4 edited
-
include/dvo.h (modified) (1 diff)
-
src/LoadPhotcodesText.c (modified) (1 diff)
-
src/coordops.c (modified) (1 diff)
-
src/dvo_photcode_ops.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100621/Ohana/src/libdvo/include/dvo.h
r28891 r28988 329 329 330 330 PhotCodeData *GetPhotcodeTable (void); 331 void SetPhotcodeTable (PhotCodeData *); 332 333 int *GetSecFiltMap(PhotCodeData *ouput, PhotCodeData* input); 331 334 332 335 int LoadPhotcodes (char *catdir_file, char *master_file, int readwrite); -
branches/eam_branches/ipp-20100621/Ohana/src/libdvo/src/LoadPhotcodesText.c
r17190 r28988 109 109 110 110 photcode[Ncode].type = 0; 111 memset(photcode[Ncode].dummy, 0, sizeof(photcode[Ncode].dummy)); 111 112 photcode[Ncode].code = code; 112 113 memset (photcode[Ncode].name, 0, 32); -
branches/eam_branches/ipp-20100621/Ohana/src/libdvo/src/coordops.c
r28725 r28988 41 41 *L += X2*coords[0].polyterms[0][0] + XY*coords[0].polyterms[1][0] + Y2*coords[0].polyterms[2][0]; 42 42 *M += X2*coords[0].polyterms[0][1] + XY*coords[0].polyterms[1][1] + Y2*coords[0].polyterms[2][1]; 43 } 44 if (coords[0].Npolyterms > 2) { 45 X3 = X2*X; 46 Y3 = Y2*Y; 47 *L += X3*coords[0].polyterms[3][0] + X2*Y*coords[0].polyterms[4][0] + X*Y2*coords[0].polyterms[5][0] + Y3*coords[0].polyterms[6][0]; 48 *M += X3*coords[0].polyterms[3][1] + X2*Y*coords[0].polyterms[4][1] + X*Y2*coords[0].polyterms[5][1] + Y3*coords[0].polyterms[6][1]; 43 44 if (coords[0].Npolyterms > 2) { 45 X3 = X2*X; 46 Y3 = Y2*Y; 47 *L += X3*coords[0].polyterms[3][0] + X2*Y*coords[0].polyterms[4][0] + X*Y2*coords[0].polyterms[5][0] + Y3*coords[0].polyterms[6][0]; 48 *M += X3*coords[0].polyterms[3][1] + X2*Y*coords[0].polyterms[4][1] + X*Y2*coords[0].polyterms[5][1] + Y3*coords[0].polyterms[6][1]; 49 } 49 50 } 50 51 -
branches/eam_branches/ipp-20100621/Ohana/src/libdvo/src/dvo_photcode_ops.c
r24974 r28988 21 21 PhotCodeData *GetPhotcodeTable () { 22 22 23 /* allocate space to photcode table, free existing data */24 23 if (photcodes == NULL) { 24 /* allocate space to photcode table */ 25 25 ALLOCATE (photcodes, PhotCodeData, 1); 26 26 photcodes[0].code = NULL; 27 27 } 28 28 return photcodes; 29 } 30 31 // set the photcode table. This is used to switch between serveral previously 32 // allocated tables 33 void SetPhotcodeTable (PhotCodeData *new) { 34 photcodes = new; 29 35 } 30 36 … … 531 537 } 532 538 539 // Create a map between the secfilt values from one photcode table to another 540 int *GetSecFiltMap(PhotCodeData *output, PhotCodeData *input) { 541 int i; 542 int NsecfiltIn = input[0].Nsecfilt; 543 int *map; 544 ALLOCATE(map, int, NsecfiltIn); 545 546 // loop over entries 547 for (i = 0; i < NsecfiltIn; i++) { 548 int code = input[0].codeNsec[i]; 549 int entry = output[0].hashcode[code]; 550 if (entry == -1) { 551 // entry is missing 552 free(map); 553 return(FALSE); 554 } 555 map[i] = entry; 556 } 557 558 return map; 559 } 560 533 561 /* photcode table should have the following format: 534 562
Note:
See TracChangeset
for help on using the changeset viewer.
