Changeset 6750 for trunk/psLib/src/mathtypes
- Timestamp:
- Mar 31, 2006, 4:43:57 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/mathtypes/psImage.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/mathtypes/psImage.c
r6631 r6750 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1. 99$ $Name: not supported by cvs2svn $12 * @date $Date: 2006-0 3-17 20:38:19$11 * @version $Revision: 1.100 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2006-04-01 02:43:57 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 173 173 { 174 174 175 if (image == NULL) { 176 return in; 175 // if (image == NULL) { 176 // return in; 177 // } 178 PS_ASSERT_IMAGE_NON_NULL(image, in); 179 //if the region is [0,0,0,0], the whole image (or subimage) is to be included. 180 if (in.x0 == 0 && in.x1 == 0 && in.y0 == 0 && in.y1 == 0) { 181 in.x0 = image->col0; 182 in.x1 = image->col0 + image->numCols - 1; 183 in.y0 = image->row0; 184 in.y1 = image->row0 + image->numRows - 1; 185 return (in); 177 186 } 178 187 … … 195 204 // flip start and end if out of order 196 205 if (in.x0 > in.x1) { 206 psError (PS_ERR_BAD_PARAMETER_VALUE, true, 207 "Invalid region in psRegionForImage. x0 > x1. Values have been swapped.\n"); 197 208 PS_SWAP (in.x0, in.x1); 198 209 } 199 210 if (in.y0 > in.y1) { 211 psError (PS_ERR_BAD_PARAMETER_VALUE, true, 212 "Invalid region in psRegionForImage. y0 > y1. Values have been swapped.\n"); 200 213 PS_SWAP (in.y0, in.y1); 201 214 } … … 717 730 { 718 731 719 if (input == NULL) { 720 psError(PS_ERR_BAD_PARAMETER_NULL,true, 721 PS_ERRORTEXT_psImage_IMAGE_NULL); 722 return unexposedValue; 732 /* if (input == NULL) { 733 psError(PS_ERR_BAD_PARAMETER_NULL,true, 734 PS_ERRORTEXT_psImage_IMAGE_NULL); 735 return unexposedValue; 736 } 737 */ 738 PS_ASSERT_IMAGE_NON_NULL(input, unexposedValue); 739 if (input->row0 != 0 || input->col0 != 0) { 740 x += input->col0; 741 y += input->row0; 723 742 } 724 743
Note:
See TracChangeset
for help on using the changeset viewer.
