Changeset 26664 for trunk/ppbgrestore/src
- Timestamp:
- Jan 22, 2010, 4:54:06 AM (16 years ago)
- Location:
- trunk/ppbgrestore/src
- Files:
-
- 3 edited
-
ppbgrestoreCleanup.c (modified) (1 diff)
-
ppbgrestoreLoop.c (modified) (3 diffs)
-
ppbgrestoreParseCamera.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppbgrestore/src/ppbgrestoreCleanup.c
r25973 r26664 22 22 // fprintf(stderr, "Found %d leaks at %s\n", psMemCheckLeaks (0, NULL, NULL, false), "ppImage"); 23 23 24 fprintf(stderr, "Found %d leaks at %s\n", psMemCheckLeaks (0, NULL, stdout, false), "ppbgrestore");24 // fprintf(stderr, "Found %d leaks at %s\n", psMemCheckLeaks (0, NULL, stdout, false), "ppbgrestore"); 25 25 26 26 } -
trunk/ppbgrestore/src/ppbgrestoreLoop.c
r26662 r26664 104 104 return false; 105 105 } 106 pmReadout *backgroundRO = pmFPAviewThisReadout(&roView, background->fpa); 107 // pmReadout *backgroundRO = pmFPAfileDefineInternal (config->files, "PSPHOT.BACKGND", image->numCols, image->numRows, PS_TYPE_F32); 106 pmReadout *backgroundRO; 107 #define USE_CELL 108 #ifdef USE_CELL 109 pmCell *backgroundCell = pmFPAviewThisCell(&roView, background->fpa); 110 backgroundRO = pmReadoutAlloc(backgroundCell); 111 #else 112 backgroundRO = pmFPAviewThisReadout(&roView, background->fpa); 113 // backgroundRO = pmFPAfileDefineInternal (config->files, "PSPHOT.BACKGND", image->numCols, image->numRows, PS_TYPE_F32); 114 #endif 108 115 backgroundRO->image = psImageAlloc(image->numCols, image->numRows, PS_TYPE_F32); 116 backgroundRO->data_exists = true; 117 backgroundRO->parent->data_exists = true; 118 backgroundRO->parent->parent->data_exists = true; 109 119 110 120 // linear interpolation to full-scale … … 120 130 int numCols = image->numCols, numRows = image->numRows; // Size of image 121 131 long nancount = 0; 132 long naninputs = 0; 122 133 long finitecount = 0; 123 134 for (int y = 0; y < numRows; y++) { … … 140 151 } else if (isfinite(imageval)) { 141 152 // XXX: TODO:following ppImage we should not modify pixels that are masked. 142 image->data.F32[y][x] += bgvalue; 143 } 153 image->data.F32[y][x] = imageval + bgvalue; 154 } else { 155 naninputs++; 156 } 144 157 } 158 } 159 if (naninputs) { 160 printf("%ld infinite pixels found in input image\n", naninputs); 145 161 } 146 162 if (nancount) { -
trunk/ppbgrestore/src/ppbgrestoreParseCamera.c
r26662 r26664 27 27 return NULL; 28 28 } 29 pmFPAfile *outBG = pmFPAfileDefineOutput(config, input->fpa, "PPBGRESTORE.BACKGROUND"); 29 // pmFPAfile *outBG = pmFPAfileDefineOutput(config, NULL, "PPBGRESTORE.BACKGROUND"); 30 pmFPAfile *outBG = pmFPAfileDefineFromFPA(config, input->fpa, 1, 1, "PPBGRESTORE.BACKGROUND"); 30 31 if (!outBG) { 31 32 psError(PS_ERR_IO, false, _("Unable to generate bacgkround file from PPBGRESTORE.BACKGROUND"));
Note:
See TracChangeset
for help on using the changeset viewer.
