Changeset 4206
- Timestamp:
- Jun 9, 2005, 4:30:47 PM (21 years ago)
- Location:
- trunk/psLib
- Files:
-
- 5 edited
-
src/image/psImagePixelExtract.c (modified) (5 diffs)
-
src/image/psImagePixelExtract.h (modified) (3 diffs)
-
src/imageops/psImagePixelExtract.c (modified) (5 diffs)
-
src/imageops/psImagePixelExtract.h (modified) (3 diffs)
-
test/image/tst_psImagePixelExtract.c (modified) (17 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/image/psImagePixelExtract.c
r3968 r4206 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-0 5-19 02:08:21$10 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-10 02:30:47 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 28 28 const psImage* restrict mask, 29 29 psU32 maskVal, 30 psS32 col0, 31 psS32 row0, 32 psS32 col1, 33 psS32 row1, 30 psRegion region, 34 31 psImageCutDirection direction, 35 32 const psStats* stats) … … 42 39 psS32 delta = 1; 43 40 psF64* outData; 41 psS32 row0 = region.y0; 42 psS32 row1 = region.y1; 43 psS32 col0 = region.x0; 44 psS32 col1 = region.x1; 44 45 45 46 if (in == NULL || in->data.V == NULL) { … … 271 272 psVector* cutRows, 272 273 const psImage* in, 273 const psImage* restrictmask,274 const psImage* mask, 274 275 psU32 maskVal, 275 float startCol, 276 float startRow, 277 float endCol, 278 float endRow, 276 psRegion region, 279 277 psU32 nSamples, 280 278 psImageInterpolateMode mode) 281 279 { 280 282 281 if (in == NULL || in->data.V == NULL) { 283 282 psError(PS_ERR_BAD_PARAMETER_NULL, true, … … 297 296 } 298 297 298 float startCol = region.x0; 299 float startRow = region.y0; 300 float endCol = region.x1; 301 float endRow = region.y1; 299 302 if (startCol < 0 || startCol >= numCols || 300 303 startRow < 0 || startRow >= numRows || -
trunk/psLib/src/image/psImagePixelExtract.h
r4162 r4206 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06- 08 23:40:45$10 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-10 02:30:47 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 65 65 const psImage* mask, ///< the mask for the input image. 66 66 psU32 maskVal, ///< the mask value to apply to the mask 67 psS32 col0, ///< the leftmost column of the slice region 68 psS32 row0, ///< the bottommost row of the slice region 69 psS32 col1, ///< exclusive end column of the slice region 70 psS32 row1, ///< exclusive end row of the slice region 67 psRegion region, ///< the slice region 71 68 psImageCutDirection direction, ///< the slice dimension and direction 72 69 const psStats* stats ///< the statistic to perform in slice operation … … 96 93 const psImage* mask, ///< the mask for the input image. 97 94 psU32 maskVal, ///< the mask value to apply to the mask 98 float startCol, ///< the column of the start of the cut line 99 float startRow, ///< the row of the start of the cut line 100 float endCol, ///< the column of the end of the cut line 101 float endRow, ///< the row of the end of the cut line 95 psRegion region, ///< the start and end points to cut along 102 96 psU32 nSamples, ///< the number of samples along the cut 103 97 psImageInterpolateMode mode ///< the interpolation method to use -
trunk/psLib/src/imageops/psImagePixelExtract.c
r3968 r4206 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-0 5-19 02:08:21$10 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-10 02:30:47 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 28 28 const psImage* restrict mask, 29 29 psU32 maskVal, 30 psS32 col0, 31 psS32 row0, 32 psS32 col1, 33 psS32 row1, 30 psRegion region, 34 31 psImageCutDirection direction, 35 32 const psStats* stats) … … 42 39 psS32 delta = 1; 43 40 psF64* outData; 41 psS32 row0 = region.y0; 42 psS32 row1 = region.y1; 43 psS32 col0 = region.x0; 44 psS32 col1 = region.x1; 44 45 45 46 if (in == NULL || in->data.V == NULL) { … … 271 272 psVector* cutRows, 272 273 const psImage* in, 273 const psImage* restrictmask,274 const psImage* mask, 274 275 psU32 maskVal, 275 float startCol, 276 float startRow, 277 float endCol, 278 float endRow, 276 psRegion region, 279 277 psU32 nSamples, 280 278 psImageInterpolateMode mode) 281 279 { 280 282 281 if (in == NULL || in->data.V == NULL) { 283 282 psError(PS_ERR_BAD_PARAMETER_NULL, true, … … 297 296 } 298 297 298 float startCol = region.x0; 299 float startRow = region.y0; 300 float endCol = region.x1; 301 float endRow = region.y1; 299 302 if (startCol < 0 || startCol >= numCols || 300 303 startRow < 0 || startRow >= numRows || -
trunk/psLib/src/imageops/psImagePixelExtract.h
r4162 r4206 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06- 08 23:40:45$10 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-10 02:30:47 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 65 65 const psImage* mask, ///< the mask for the input image. 66 66 psU32 maskVal, ///< the mask value to apply to the mask 67 psS32 col0, ///< the leftmost column of the slice region 68 psS32 row0, ///< the bottommost row of the slice region 69 psS32 col1, ///< exclusive end column of the slice region 70 psS32 row1, ///< exclusive end row of the slice region 67 psRegion region, ///< the slice region 71 68 psImageCutDirection direction, ///< the slice dimension and direction 72 69 const psStats* stats ///< the statistic to perform in slice operation … … 96 93 const psImage* mask, ///< the mask for the input image. 97 94 psU32 maskVal, ///< the mask value to apply to the mask 98 float startCol, ///< the column of the start of the cut line 99 float startRow, ///< the row of the start of the cut line 100 float endCol, ///< the column of the end of the cut line 101 float endRow, ///< the row of the end of the cut line 95 psRegion region, ///< the start and end points to cut along 102 96 psU32 nSamples, ///< the number of samples along the cut 103 97 psImageInterpolateMode mode ///< the interpolation method to use -
trunk/psLib/test/image/tst_psImagePixelExtract.c
r3973 r4206 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-0 5-19 02:49:40$8 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-06-10 02:30:47 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 77 77 } \ 78 78 } \ 79 out = psImageSlice(out,positions,image,mask,1, c/10,r/10,c/10+M,r/10+N,DIRECTION,stat); \79 out = psImageSlice(out,positions,image,mask,1,psRegionSet(c/10,c/10+M,r/10,r/10+N),DIRECTION,stat); \ 80 80 \ 81 81 if (out->n != TRUTH_SIZE) { \ … … 153 153 NULL, NULL, 154 154 NULL, 0, 155 c/10, r/10, 156 c/10 + 1, r/10 + 1, 155 psRegionSet(c/10, c/10 + 1, r/10, r/10 + 1), 157 156 PS_CUT_X_POS, 158 157 stat ); … … 171 170 NULL, image, 172 171 mask, 1, 173 c/10, r/10, 174 c/10 + 1, 175 r/10 + 1, 172 psRegionSet(c/10, c/10 + 1, r/10, r/10 + 1), 176 173 PS_CUT_X_POS, 177 174 NULL ); … … 190 187 image, 191 188 mask, 1, 192 c/10, r/10, 193 c/10+1, r/10+1, 189 psRegionSet(c/10, c/10 + 1, r/10, r/10 + 1), 194 190 5, 195 191 stat); … … 208 204 image, 209 205 mask, 1, 210 c/10, r/10, 211 c/10, r/10, 206 psRegionSet(c/10, c/10, r/10, r/10), 212 207 PS_CUT_X_POS, 213 208 stat ); … … 226 221 image, 227 222 mask, 1, 228 c+1, r/10, 229 c+2, r/10+10, 223 psRegionSet(c+1, c+2, r/10, r/10 + 10), 230 224 PS_CUT_X_POS, 231 225 stat ); … … 239 233 image, 240 234 mask, 1, 241 c/10, r+1, 242 c/10+1,r+5, 235 psRegionSet(c/10, c/10 + 1, r+1,r+5), 243 236 PS_CUT_X_POS, 244 237 stat ); … … 252 245 image, 253 246 mask, 1, 254 c/10, r/10, 255 c+1, r/10+1, 247 psRegionSet(c/10, c+1, r/10, r/10+1), 256 248 PS_CUT_X_POS, 257 249 stat); … … 265 257 image, 266 258 mask, 1, 267 c/10, r/10, 268 c/10+1, r + 1, 259 psRegionSet(c/10, c/10 + 1, r/10, r + 1), 269 260 PS_CUT_X_POS, 270 261 stat); … … 284 275 image, 285 276 mask, 1, 286 c/10, r/10, 287 c/10+1, r/10+1, 277 psRegionSet(c/10, c/10 + 1, r/10, r/10+1), 288 278 PS_CUT_X_POS, 289 279 stat); … … 302 292 image, 303 293 maskSz, 1, 304 c/10, r/10, 305 c/10+1, r/10+1, 294 psRegionSet(c/10, c/10 + 1, r/10, r/10 + 1), 306 295 PS_CUT_X_POS, 307 296 stat); … … 318 307 image, 319 308 maskS8, 1, 320 c/10, r/10, 321 c/10+1, r/10+1, 309 psRegionSet(c/10, c/10 + 1, r/10, r/10 + 1), 322 310 PS_CUT_X_POS, 323 311 stat); … … 377 365 image, 378 366 NULL,0, 379 startCol[n], startRow[n], 380 endCol[n], endRow[n], 367 psRegionSet(startCol[n], endCol[n], startRow[n],endRow[n]), 381 368 length, 382 369 PS_INTERPOLATE_FLAT); … … 386 373 image, 387 374 mask,1, 388 startCol[n], startRow[n], 389 endCol[n], endRow[n], 375 psRegionSet(startCol[n], endCol[n], startRow[n], endRow[n]), 390 376 length, 391 377 PS_INTERPOLATE_FLAT); … … 454 440 NULL, 455 441 mask,1, 456 startCol[0], startRow[0], 457 endCol[0], endRow[0], 442 psRegionSet(startCol[0], endCol[0], startRow[0], endRow[0]), 458 443 length, 459 444 PS_INTERPOLATE_FLAT); … … 476 461 image, 477 462 mask,1, 478 startCol[0], startRow[0], 479 endCol[0], endRow[0], 463 psRegionSet(startCol[0], endCol[0], startRow[0], endRow[0]), 480 464 0, 481 465 PS_INTERPOLATE_FLAT);
Note:
See TracChangeset
for help on using the changeset viewer.
