Changeset 36060 for trunk/pstamp/src/ppstampMakeStamp.c
- Timestamp:
- Aug 30, 2013, 3:06:50 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/src/ppstampMakeStamp.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/src/ppstampMakeStamp.c
r35893 r36060 20 20 static bool setMaskedToNAN(pmConfig *config, psImage *image, psImage *mask, psImage *variance); 21 21 static bool copySources(pmReadout *outputReadout, pmReadout *inputReadout, pmReadout *astromReadout, psRegion extractRegion); 22 static bool imageHasValidPixels(psImage *image); 22 23 23 24 // convert the input chip's transforms to the output … … 337 338 status = false; 338 339 break; 340 } 341 if (!imageHasValidPixels(outReadout->image)) { 342 return PSTAMP_NO_VALID_PIXELS; 339 343 } 340 344 if (readout->variance) { … … 885 889 return true; 886 890 } 891 892 static bool 893 imageHasValidPixels(psImage *image) { 894 // check F32 image and return true if any pixel is finite 895 if (image->type.type != PS_TYPE_F32) { 896 return true; 897 } 898 for (int y=0; y<image->numRows; y++) { 899 for (int x=0; x<image->numCols; x++) { 900 psF32 pixel = image->data.F32[y][x]; 901 if (isfinite(pixel)) { 902 return true; 903 } 904 } 905 } 906 return false; 907 }
Note:
See TracChangeset
for help on using the changeset viewer.
