Changeset 16989 for trunk/ppMerge/src/ppMergeMaskAverageConcepts.c
- Timestamp:
- Mar 13, 2008, 2:29:14 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppMerge/src/ppMergeMaskAverageConcepts.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppMerge/src/ppMergeMaskAverageConcepts.c
r15937 r16989 18 18 // Generate a mask 19 19 bool ppMergeMaskAverageConcepts(ppMergeData *data, // Data 20 ppMergeOptions *options, // Options21 pmConfig *config // Configuration20 ppMergeOptions *options, // Options 21 pmConfig *config // Configuration 22 22 ) 23 23 { … … 38 38 while ((cellOut = pmFPAviewNextCell(view, fpaOut, 1))) { 39 39 40 pmHDU *hdu = pmHDUGetLowest(fpaOut, chipOut, cellOut); 41 if (!hdu || hdu->blankPHU) { 42 continue; 43 } 44 40 45 // Get list of cells for concepts averaging 41 psList *inCells = psListAlloc(NULL); // List of cells42 for (int i = 0; i < filenames->n; i++) {43 if (! filenames->data[i] || strlen(filenames->data[i]) == 0) {44 continue;45 }46 pmCell *cellIn = pmFPAviewThisCell(view, data->in->data[i]); // Input cell47 psListAdd(inCells, PS_LIST_TAIL, cellIn);48 }49 if (!pmConceptsAverageCells(cellOut, inCells, NULL, NULL, true)) {50 psError(PS_ERR_UNKNOWN, false, "Unable to average cell concepts.");51 psFree(inCells);52 return false;53 }54 psFree(inCells);46 psList *inCells = psListAlloc(NULL); // List of cells 47 for (int i = 0; i < filenames->n; i++) { 48 if (! filenames->data[i] || strlen(filenames->data[i]) == 0) { 49 continue; 50 } 51 pmCell *cellIn = pmFPAviewThisCell(view, data->in->data[i]); // Input cell 52 psListAdd(inCells, PS_LIST_TAIL, cellIn); 53 } 54 if (!pmConceptsAverageCells(cellOut, inCells, NULL, NULL, true)) { 55 psError(PS_ERR_UNKNOWN, false, "Unable to average cell concepts."); 56 psFree(inCells); 57 return false; 58 } 59 psFree(inCells); 55 60 } 56 61 } … … 59 64 psList *inFPAs = psListAlloc(NULL); // List of FPAs 60 65 for (int i = 0; i < filenames->n; i++) { 61 if (! filenames->data[i] || strlen(filenames->data[i]) == 0) {62 continue;63 }64 pmFPA *fpaIn = data->in->data[i]; // Input FPA65 psListAdd(inFPAs, PS_LIST_TAIL, fpaIn);66 if (! filenames->data[i] || strlen(filenames->data[i]) == 0) { 67 continue; 68 } 69 pmFPA *fpaIn = data->in->data[i]; // Input FPA 70 psListAdd(inFPAs, PS_LIST_TAIL, fpaIn); 66 71 } 67 72 68 73 if (!pmConceptsAverageFPAs(fpaOut, inFPAs)) { 69 psError(PS_ERR_UNKNOWN, false, "Unable to average FPA concepts.");70 psFree(inFPAs);71 return false;74 psError(PS_ERR_UNKNOWN, false, "Unable to average FPA concepts."); 75 psFree(inFPAs); 76 return false; 72 77 } 73 78 psFree(inFPAs);
Note:
See TracChangeset
for help on using the changeset viewer.
