Changeset 895
- Timestamp:
- Jun 6, 2004, 5:49:20 PM (22 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 2 edited
-
image/psImageStats.c (modified) (5 diffs)
-
imageops/psImageStats.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/image/psImageStats.c
r889 r895 20 20 /// This routine must determine the various statistics for the image. 21 21 /***************************************************************************** 22 GUS: verify that image/mask have the 23 correct types 24 sizes 22 GUS: verify that image/mask have the correct types, and sizes. 25 23 *****************************************************************************/ 26 24 psStats *psImageStats(psStats *stats, … … 35 33 int j = 0; 36 34 35 // GUS: Verify this action. 36 if ((stats == NULL) || 37 (in == NULL)) { 38 return(NULL); 39 } 40 // GUS: Verify this action. 41 if (stats->options == 0) { 42 return(stats); 43 } 44 37 45 junkData = psVectorAlloc(in->numRows * in->numCols, in->type.type); 38 46 junkData->n = junkData->nalloc; … … 64 72 stats = psVectorStats(stats, junkData, NULL, 0); 65 73 } 66 67 74 psVectorFree(junkData); 68 69 75 return(stats); 70 76 } … … 73 79 NOTE: We assume that the psHistogram structure out has already been 74 80 allocated and initialized. 75 76 GUS: verify that image/mask have the 77 correct types 78 sizes 81 GUS: verify that image/mask have the, correct types and sizes. 79 82 *****************************************************************************/ 80 83 psHistogram *psImageHistogram(psHistogram *out, … … 88 91 int i = 0; 89 92 int j = 0; 93 94 // GUS: Verify this action. 95 if ((out == NULL) || 96 (in == NULL)) { 97 return(NULL); 98 } 90 99 91 100 junkData = psVectorAlloc(in->numRows * in->numCols, in->type.type); -
trunk/psLib/src/imageops/psImageStats.c
r889 r895 20 20 /// This routine must determine the various statistics for the image. 21 21 /***************************************************************************** 22 GUS: verify that image/mask have the 23 correct types 24 sizes 22 GUS: verify that image/mask have the correct types, and sizes. 25 23 *****************************************************************************/ 26 24 psStats *psImageStats(psStats *stats, … … 35 33 int j = 0; 36 34 35 // GUS: Verify this action. 36 if ((stats == NULL) || 37 (in == NULL)) { 38 return(NULL); 39 } 40 // GUS: Verify this action. 41 if (stats->options == 0) { 42 return(stats); 43 } 44 37 45 junkData = psVectorAlloc(in->numRows * in->numCols, in->type.type); 38 46 junkData->n = junkData->nalloc; … … 64 72 stats = psVectorStats(stats, junkData, NULL, 0); 65 73 } 66 67 74 psVectorFree(junkData); 68 69 75 return(stats); 70 76 } … … 73 79 NOTE: We assume that the psHistogram structure out has already been 74 80 allocated and initialized. 75 76 GUS: verify that image/mask have the 77 correct types 78 sizes 81 GUS: verify that image/mask have the, correct types and sizes. 79 82 *****************************************************************************/ 80 83 psHistogram *psImageHistogram(psHistogram *out, … … 88 91 int i = 0; 89 92 int j = 0; 93 94 // GUS: Verify this action. 95 if ((out == NULL) || 96 (in == NULL)) { 97 return(NULL); 98 } 90 99 91 100 junkData = psVectorAlloc(in->numRows * in->numCols, in->type.type);
Note:
See TracChangeset
for help on using the changeset viewer.
