Changeset 1653
- Timestamp:
- Aug 27, 2004, 3:18:28 PM (22 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 4 added
- 6 edited
-
astronomy/psMetadata.c (modified) (4 diffs)
-
collections/psMetadata.c (modified) (4 diffs)
-
image/Makefile (modified) (2 diffs)
-
image/psImage.c (modified) (7 diffs)
-
image/psImageConvolve.c (added)
-
image/psImageConvolve.h (added)
-
imageops/psImageConvolve.c (added)
-
imageops/psImageConvolve.h (added)
-
mathtypes/psImage.c (modified) (7 diffs)
-
types/psMetadata.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astronomy/psMetadata.c
r1621 r1653 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.2 5$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08-2 5 20:21:25$14 * @version $Revision: 1.26 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-28 01:18:28 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 482 482 entry = (psMetadataItem* ) psHashLookup(mdTable, key); 483 483 if (entry == NULL) { 484 psError(__func__, "Could not find metadata item. Key: %s", key);485 484 return NULL; 486 485 } … … 567 566 } 568 567 569 // Match not found570 if (entry == NULL) {571 psError(__func__, "Couldn't find metadata item");572 }573 574 568 return entry; 575 569 } … … 605 599 return psListGetPrevious(mdList); 606 600 } 607 }608 609 // Match not found610 if (entry == NULL) {611 psError(__func__, "Couldn't find metadata item", match);612 601 } 613 602 -
trunk/psLib/src/collections/psMetadata.c
r1621 r1653 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.2 5$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08-2 5 20:21:25$14 * @version $Revision: 1.26 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-28 01:18:28 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 482 482 entry = (psMetadataItem* ) psHashLookup(mdTable, key); 483 483 if (entry == NULL) { 484 psError(__func__, "Could not find metadata item. Key: %s", key);485 484 return NULL; 486 485 } … … 567 566 } 568 567 569 // Match not found570 if (entry == NULL) {571 psError(__func__, "Couldn't find metadata item");572 }573 574 568 return entry; 575 569 } … … 605 599 return psListGetPrevious(mdList); 606 600 } 607 }608 609 // Match not found610 if (entry == NULL) {611 psError(__func__, "Couldn't find metadata item", match);612 601 } 613 602 -
trunk/psLib/src/image/Makefile
r1625 r1653 3 3 ## Makefile: collections 4 4 ## 5 ## $Revision: 1. 3$ $Name: not supported by cvs2svn $6 ## $Date: 2004-08-2 5 21:10:08 $5 ## $Revision: 1.4 $ $Name: not supported by cvs2svn $ 6 ## $Date: 2004-08-28 01:18:28 $ 7 7 ## 8 8 ## Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 35 35 psImageManip.o \ 36 36 psImageStats.o \ 37 psImageFFT.o 37 psImageFFT.o \ 38 psImageConvolve.o 38 39 39 40 OBJS = $(addprefix makedir/,$(SRC_OBJS)) -
trunk/psLib/src/image/psImage.c
r1634 r1653 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.4 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-08-2 7 19:05:40$12 * @version $Revision: 1.42 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-08-28 01:18:28 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 17 17 * That is the routine used to generate matrices. 18 18 */ 19 20 /******************************************************************************/21 22 /* INCLUDE FILES */23 24 /******************************************************************************/25 19 26 20 #include <string.h> … … 33 27 34 28 static void imageFree(psImage* image); 35 36 /*****************************************************************************/37 38 /* FUNCTION IMPLEMENTATION - PUBLIC */39 40 /*****************************************************************************/41 29 42 30 psImage* psImageAlloc(unsigned int numCols, … … 52 40 if (area < 1) { 53 41 psError(__func__, 54 "Invalid value for number of rows or columns " "(numRows=%d, numCols=%d).", numRows, numCols); 42 "Invalid value for number of rows or columns " 43 "(numRows=%d, numCols=%d).", 44 numRows, numCols); 55 45 return NULL; 56 46 } … … 129 119 const psElemType type) 130 120 { 131 int elementSize = PSELEMTYPE_SIZEOF(type); // element 132 133 // size in 134 // bytes 135 int rowSize = numCols * elementSize; // row 136 137 // size 138 139 // in bytes. 121 int elementSize = PSELEMTYPE_SIZEOF(type); // element size in bytes 122 int rowSize = numCols * elementSize; // row size in bytes. 140 123 141 124 if (old == NULL) { … … 145 128 146 129 if (old->type.dimen != PS_DIMEN_IMAGE) { 147 psError(__func__, "Can not realloc image because input is not an image."); 130 psError(__func__, 131 "Can not realloc image because input is not an image."); 148 132 return NULL; 149 133 } … … 166 150 167 151 /* image already the right size/type? */ 168 if (numCols == old->numCols && numRows == old->numRows && type == old->type.type) { 152 if (numCols == old->numCols && numRows == old->numRows && 153 type == old->type.type) { 169 154 return old; 170 155 } 171 156 // Resize the image buffer 172 old->rawDataBuffer = psRealloc(old->data.V[0], numCols * numRows * elementSize); 157 old->rawDataBuffer = psRealloc(old->data.V[0], 158 numCols * numRows * elementSize); 173 159 old->data.V = (void **)psRealloc(old->data.V, numRows * sizeof(void *)); 174 160 -
trunk/psLib/src/mathtypes/psImage.c
r1634 r1653 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.4 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-08-2 7 19:05:40$12 * @version $Revision: 1.42 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-08-28 01:18:28 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 17 17 * That is the routine used to generate matrices. 18 18 */ 19 20 /******************************************************************************/21 22 /* INCLUDE FILES */23 24 /******************************************************************************/25 19 26 20 #include <string.h> … … 33 27 34 28 static void imageFree(psImage* image); 35 36 /*****************************************************************************/37 38 /* FUNCTION IMPLEMENTATION - PUBLIC */39 40 /*****************************************************************************/41 29 42 30 psImage* psImageAlloc(unsigned int numCols, … … 52 40 if (area < 1) { 53 41 psError(__func__, 54 "Invalid value for number of rows or columns " "(numRows=%d, numCols=%d).", numRows, numCols); 42 "Invalid value for number of rows or columns " 43 "(numRows=%d, numCols=%d).", 44 numRows, numCols); 55 45 return NULL; 56 46 } … … 129 119 const psElemType type) 130 120 { 131 int elementSize = PSELEMTYPE_SIZEOF(type); // element 132 133 // size in 134 // bytes 135 int rowSize = numCols * elementSize; // row 136 137 // size 138 139 // in bytes. 121 int elementSize = PSELEMTYPE_SIZEOF(type); // element size in bytes 122 int rowSize = numCols * elementSize; // row size in bytes. 140 123 141 124 if (old == NULL) { … … 145 128 146 129 if (old->type.dimen != PS_DIMEN_IMAGE) { 147 psError(__func__, "Can not realloc image because input is not an image."); 130 psError(__func__, 131 "Can not realloc image because input is not an image."); 148 132 return NULL; 149 133 } … … 166 150 167 151 /* image already the right size/type? */ 168 if (numCols == old->numCols && numRows == old->numRows && type == old->type.type) { 152 if (numCols == old->numCols && numRows == old->numRows && 153 type == old->type.type) { 169 154 return old; 170 155 } 171 156 // Resize the image buffer 172 old->rawDataBuffer = psRealloc(old->data.V[0], numCols * numRows * elementSize); 157 old->rawDataBuffer = psRealloc(old->data.V[0], 158 numCols * numRows * elementSize); 173 159 old->data.V = (void **)psRealloc(old->data.V, numRows * sizeof(void *)); 174 160 -
trunk/psLib/src/types/psMetadata.c
r1621 r1653 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.2 5$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08-2 5 20:21:25$14 * @version $Revision: 1.26 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-28 01:18:28 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 482 482 entry = (psMetadataItem* ) psHashLookup(mdTable, key); 483 483 if (entry == NULL) { 484 psError(__func__, "Could not find metadata item. Key: %s", key);485 484 return NULL; 486 485 } … … 567 566 } 568 567 569 // Match not found570 if (entry == NULL) {571 psError(__func__, "Couldn't find metadata item");572 }573 574 568 return entry; 575 569 } … … 605 599 return psListGetPrevious(mdList); 606 600 } 607 }608 609 // Match not found610 if (entry == NULL) {611 psError(__func__, "Couldn't find metadata item", match);612 601 } 613 602
Note:
See TracChangeset
for help on using the changeset viewer.
