Changeset 4385
- Timestamp:
- Jun 24, 2005, 2:51:28 PM (21 years ago)
- Location:
- trunk/psLib
- Files:
-
- 22 edited
-
pslib.kdevses (modified) (1 diff)
-
src/dataManip/psMatrix.c (modified) (5 diffs)
-
src/dataManip/psMatrix.h (modified) (2 diffs)
-
src/image/psImageGeomManip.c (modified) (4 diffs)
-
src/image/psImageGeomManip.h (modified) (4 diffs)
-
src/image/psImagePixelExtract.c (modified) (4 diffs)
-
src/image/psImagePixelExtract.h (modified) (5 diffs)
-
src/image/psImagePixelManip.c (modified) (2 diffs)
-
src/image/psImagePixelManip.h (modified) (2 diffs)
-
src/image/psImageStats.c (modified) (3 diffs)
-
src/image/psImageStats.h (modified) (3 diffs)
-
src/imageops/psImageGeomManip.c (modified) (4 diffs)
-
src/imageops/psImageGeomManip.h (modified) (4 diffs)
-
src/imageops/psImagePixelExtract.c (modified) (4 diffs)
-
src/imageops/psImagePixelExtract.h (modified) (5 diffs)
-
src/imageops/psImagePixelManip.c (modified) (2 diffs)
-
src/imageops/psImagePixelManip.h (modified) (2 diffs)
-
src/imageops/psImageStats.c (modified) (3 diffs)
-
src/imageops/psImageStats.h (modified) (3 diffs)
-
src/math/psMatrix.c (modified) (5 diffs)
-
src/math/psMatrix.h (modified) (2 diffs)
-
test/dataManip/verified/tst_psMatrix04.stderr (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/pslib.kdevses
r4367 r4385 2 2 <!DOCTYPE KDevPrjSession> 3 3 <KDevPrjSession> 4 <DocsAndViews NumberOfDocuments="0" /> 4 <DocsAndViews NumberOfDocuments="2" > 5 <Doc0 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/dataManip/psMatrix.h" > 6 <View0 line="77" Type="Source" /> 7 </Doc0> 8 <Doc1 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/dataManip/psMatrix.c" > 9 <View0 line="345" Type="Source" /> 10 </Doc1> 11 </DocsAndViews> 5 12 <pluginList> 6 13 <kdevbookmarks> 7 <bookmarks/> 14 <bookmarks> 15 <bookmark url="/home/drobbin/panstarrs/psLib/src/sysUtils/psType.h" > 16 <mark line="69" /> 17 </bookmark> 18 </bookmarks> 8 19 </kdevbookmarks> 9 20 <kdevvalgrind> -
trunk/psLib/src/dataManip/psMatrix.c
r4321 r4385 21 21 * @author Robert DeSonia, MHPCC 22 22 * 23 * @version $Revision: 1.3 2$ $Name: not supported by cvs2svn $24 * @date $Date: 2005-06-2 0 22:42:29$23 * @version $Revision: 1.33 $ $Name: not supported by cvs2svn $ 24 * @date $Date: 2005-06-25 00:51:28 $ 25 25 * 26 26 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 298 298 } 299 299 300 psImage* psMatrixInvert(psImage* out Image, const psImage* inImage, float *det)300 psImage* psMatrixInvert(psImage* out, const psImage* in, float *determinant) 301 301 { 302 302 psS32 signum = 0; … … 307 307 gsl_permutation *perm = NULL; 308 308 309 #define INVERT_CLEANUP { psFree(out Image); return NULL; }310 // Error checks 311 PS_ASSERT_GENERAL_PTR_NON_NULL(det , INVERT_CLEANUP);312 PS_ASSERT_GENERAL_IMAGE_NON_NULL(in Image, INVERT_CLEANUP);313 PS_CHECK_POINTERS(in Image, outImage, INVERT_CLEANUP);314 PS_CHECK_DIMEN_AND_TYPE(in Image, PS_DIMEN_IMAGE, INVERT_CLEANUP);315 PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in Image, INVERT_CLEANUP);316 317 out Image = psImageRecycle(outImage, inImage->numCols, inImage->numRows, inImage->type.type);318 319 PS_CHECK_SQUARE(in Image, INVERT_CLEANUP);320 PS_CHECK_SQUARE(out Image, INVERT_CLEANUP);309 #define INVERT_CLEANUP { psFree(out); return NULL; } 310 // Error checks 311 PS_ASSERT_GENERAL_PTR_NON_NULL(determinant, INVERT_CLEANUP); 312 PS_ASSERT_GENERAL_IMAGE_NON_NULL(in, INVERT_CLEANUP); 313 PS_CHECK_POINTERS(in, out, INVERT_CLEANUP); 314 PS_CHECK_DIMEN_AND_TYPE(in, PS_DIMEN_IMAGE, INVERT_CLEANUP); 315 PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in, INVERT_CLEANUP); 316 317 out = psImageRecycle(out, in->numCols, in->numRows, in->type.type); 318 319 PS_CHECK_SQUARE(in, INVERT_CLEANUP); 320 PS_CHECK_SQUARE(out, INVERT_CLEANUP); 321 321 322 322 // Initialize data 323 numRows = in Image->numRows;324 numCols = in Image->numCols;323 numRows = in->numRows; 324 numCols = in->numCols; 325 325 326 326 // Initialize GSL data … … 328 328 lu = gsl_matrix_alloc(numRows, numCols); 329 329 inv = gsl_matrix_alloc(numRows, numCols); 330 psImageToGslMatrix(lu, in Image);330 psImageToGslMatrix(lu, in); 331 331 332 332 // Invert data and calculate determinant 333 333 gsl_linalg_LU_decomp(lu, perm, &signum); 334 334 gsl_linalg_LU_invert(lu, perm, inv); 335 *det = (float)gsl_linalg_LU_det(lu, signum);335 *determinant = (float)gsl_linalg_LU_det(lu, signum); 336 336 337 337 // Copy GSL matrix data to psImage data 338 gslMatrixToPsImage(out Image, inv);338 gslMatrixToPsImage(out, inv); 339 339 340 340 // Free GSL structs … … 343 343 gsl_matrix_free(inv); 344 344 345 return out Image;345 return out; 346 346 } 347 347 -
trunk/psLib/src/dataManip/psMatrix.h
r4321 r4385 21 21 * @author Ross Harman, MHPCC 22 22 * 23 * @version $Revision: 1.1 7$ $Name: not supported by cvs2svn $24 * @date $Date: 2005-06-2 0 22:42:29$23 * @version $Revision: 1.18 $ $Name: not supported by cvs2svn $ 24 * @date $Date: 2005-06-25 00:51:28 $ 25 25 * 26 26 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 74 74 */ 75 75 psImage* psMatrixInvert( 76 psImage* out Image, ///< Image to return, or NULL for in-place substitution.77 const psImage* in Image, ///< Image to be inverted76 psImage* out, ///< Image to return, or NULL for in-place substitution. 77 const psImage* in, ///< Image to be inverted 78 78 float *det ///< Determinant to return, or NULL 79 79 ); -
trunk/psLib/src/image/psImageGeomManip.c
r4367 r4385 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06-2 3 03:50:29$12 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-25 00:51:28 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 305 305 const psImage* input, 306 306 float angle, 307 _Complex exposed,307 complex exposed, 308 308 psImageInterpolateMode mode) 309 309 { … … 597 597 float dx, 598 598 float dy, 599 _Complex exposed,599 complex exposed, 600 600 psImageInterpolateMode mode) 601 601 { … … 692 692 const psImage *input, 693 693 const psImage *inputMask, 694 intinputMaskVal,694 psMaskType inputMaskVal, 695 695 const psPlaneTransform *outToIn, 696 696 psRegion region, -
trunk/psLib/src/image/psImageGeomManip.h
r4367 r4385 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06-2 3 03:50:29$10 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-25 00:51:28 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 77 77 const psImage* input, ///< input image 78 78 float angle, ///< the rotation angle in radians. 79 _Complex exposed,///< the output image pixel values for non-imagery areas79 complex exposed, ///< the output image pixel values for non-imagery areas 80 80 psImageInterpolateMode mode ///< the interpolation mode used 81 81 ); … … 97 97 float dx, ///< the shift in x direction. 98 98 float dy, ///< the shift in y direction. 99 _Complex exposed,///< the output image pixel values for non-imagery areas99 complex exposed, ///< the output image pixel values for non-imagery areas 100 100 psImageInterpolateMode mode ///< the interpolation mode to use 101 101 ); … … 147 147 const psImage *input, ///< psImage to apply transform to 148 148 const psImage *inputMask, ///< if not NULL, mask of input psImage 149 int inputMaskVal,///< masking value for inputMask149 psMaskType inputMaskVal, ///< masking value for inputMask 150 150 const psPlaneTransform *outToIn, ///< the transform to apply 151 151 psRegion region, ///< the size of the transformed image 152 152 const psPixels* pixels, /**< if not NULL, consists of psPixelCoords and specifies which pixels in 153 * output image shall be transformed; otherwise, entire image generated*/153 * output image shall be transformed; otherwise, entire image generated*/ 154 154 psImageInterpolateMode mode, ///< the interpolation scheme to be used 155 155 double exposedValue ///< Exposed value to which non-corresponding pixels are set -
trunk/psLib/src/image/psImagePixelExtract.c
r4367 r4385 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06-2 3 03:50:29$10 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-25 00:51:28 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 27 27 const psImage* restrict input, 28 28 const psImage* restrict mask, 29 ps U32maskVal,29 psMaskType maskVal, 30 30 psRegion region, 31 31 psImageCutDirection direction, … … 273 273 const psImage* input, 274 274 const psImage* mask, 275 ps U32maskVal,275 psMaskType maskVal, 276 276 psRegion region, 277 277 unsigned int nSamples, … … 407 407 const psImage* input, 408 408 const psImage* restrict mask, 409 ps U32maskVal,409 psMaskType maskVal, 410 410 float x, 411 411 float y, -
trunk/psLib/src/image/psImagePixelExtract.h
r4367 r4385 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06-2 3 03:50:29$10 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-25 00:51:28 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 64 64 const psImage* input, ///< the input image in which to perform the slice 65 65 const psImage* mask, ///< the mask for the input image. 66 ps U32 maskVal,///< the mask value to apply to the mask66 psMaskType maskVal, ///< the mask value to apply to the mask 67 67 psRegion region, ///< the slice region 68 68 psImageCutDirection direction, ///< the slice dimension and direction … … 84 84 * psF64. 85 85 * 86 * @return psVector resulting vector86 * @return psVector* resulting vector 87 87 */ 88 88 psVector* psImageCut( … … 92 92 const psImage* input, ///< the input image in which to perform the cut 93 93 const psImage* mask, ///< the mask for the input image. 94 ps U32 maskVal,///< the mask value to apply to the mask94 psMaskType maskVal, ///< the mask value to apply to the mask 95 95 psRegion region, ///< the start and end points to cut along 96 96 unsigned int nSamples, ///< the number of samples along the cut … … 115 115 const psImage* input, ///< the input image in which to perform the cut 116 116 const psImage* mask, ///< the mask for the input image. 117 ps U32 maskVal,///< the mask value to apply to the mask117 psMaskType maskVal, ///< the mask value to apply to the mask 118 118 float x, ///< the column of the center of the cut circle 119 119 float y, ///< the row of the center of the cut circle -
trunk/psLib/src/image/psImagePixelManip.c
r4367 r4385 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06-2 3 03:50:29$12 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-25 00:51:28 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 311 311 312 312 int psImageClipComplexRegion(psImage* input, 313 _Complex min,314 _Complex vmin,315 _Complex max,316 _Complex vmax)313 complex min, 314 complex vmin, 315 complex max, 316 complex vmax) 317 317 { 318 318 psS32 numClipped = 0; -
trunk/psLib/src/image/psImagePixelManip.h
r4367 r4385 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06-2 3 03:50:29$10 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-25 00:51:28 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 51 51 int psImageClipComplexRegion( 52 52 psImage* input, ///< the image to clip 53 _Complex min,///< the minimum image value allowed54 _Complex vmin,///< the value pixels < min are set to55 _Complex max,///< the maximum image value allowed56 _Complex vmax///< the value pixels > max are set to53 complex min, ///< the minimum image value allowed 54 complex vmin, ///< the value pixels < min are set to 55 complex max, ///< the maximum image value allowed 56 complex vmax ///< the value pixels > max are set to 57 57 ); 58 58 -
trunk/psLib/src/image/psImageStats.c
r4029 r4385 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.7 4$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-0 5-25 20:26:55$11 * @version $Revision: 1.75 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-06-25 00:51:28 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 47 47 const psImage* in, 48 48 const psImage* mask, 49 ps S32maskVal)49 psMaskType maskVal) 50 50 { 51 51 psVector *junkData = NULL; … … 122 122 const psImage* in, 123 123 const psImage* mask, 124 ps U32maskVal)124 psMaskType maskVal) 125 125 { 126 126 PS_ASSERT_PTR_NON_NULL(out, NULL); -
trunk/psLib/src/image/psImageStats.h
r4243 r4385 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.2 3$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-06- 14 02:54:15$11 * @version $Revision: 1.24 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-06-25 00:51:28 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 40 40 const psImage* in, ///< image (or subimage) to calculate stats 41 41 const psImage* mask, ///< mask data for image (NULL ok) 42 ps S32 maskVal ///< mask Maskfor mask42 psMaskType maskVal ///< mask value for mask 43 43 ); 44 44 … … 55 55 const psImage* in, ///< Image data to be histogramed. 56 56 const psImage* mask, ///< mask data for image (NULL ok) 57 ps U32 maskVal///< mask Mask for mask57 psMaskType maskVal ///< mask Mask for mask 58 58 ); 59 59 -
trunk/psLib/src/imageops/psImageGeomManip.c
r4367 r4385 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06-2 3 03:50:29$12 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-25 00:51:28 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 305 305 const psImage* input, 306 306 float angle, 307 _Complex exposed,307 complex exposed, 308 308 psImageInterpolateMode mode) 309 309 { … … 597 597 float dx, 598 598 float dy, 599 _Complex exposed,599 complex exposed, 600 600 psImageInterpolateMode mode) 601 601 { … … 692 692 const psImage *input, 693 693 const psImage *inputMask, 694 intinputMaskVal,694 psMaskType inputMaskVal, 695 695 const psPlaneTransform *outToIn, 696 696 psRegion region, -
trunk/psLib/src/imageops/psImageGeomManip.h
r4367 r4385 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06-2 3 03:50:29$10 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-25 00:51:28 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 77 77 const psImage* input, ///< input image 78 78 float angle, ///< the rotation angle in radians. 79 _Complex exposed,///< the output image pixel values for non-imagery areas79 complex exposed, ///< the output image pixel values for non-imagery areas 80 80 psImageInterpolateMode mode ///< the interpolation mode used 81 81 ); … … 97 97 float dx, ///< the shift in x direction. 98 98 float dy, ///< the shift in y direction. 99 _Complex exposed,///< the output image pixel values for non-imagery areas99 complex exposed, ///< the output image pixel values for non-imagery areas 100 100 psImageInterpolateMode mode ///< the interpolation mode to use 101 101 ); … … 147 147 const psImage *input, ///< psImage to apply transform to 148 148 const psImage *inputMask, ///< if not NULL, mask of input psImage 149 int inputMaskVal,///< masking value for inputMask149 psMaskType inputMaskVal, ///< masking value for inputMask 150 150 const psPlaneTransform *outToIn, ///< the transform to apply 151 151 psRegion region, ///< the size of the transformed image 152 152 const psPixels* pixels, /**< if not NULL, consists of psPixelCoords and specifies which pixels in 153 * output image shall be transformed; otherwise, entire image generated*/153 * output image shall be transformed; otherwise, entire image generated*/ 154 154 psImageInterpolateMode mode, ///< the interpolation scheme to be used 155 155 double exposedValue ///< Exposed value to which non-corresponding pixels are set -
trunk/psLib/src/imageops/psImagePixelExtract.c
r4367 r4385 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06-2 3 03:50:29$10 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-25 00:51:28 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 27 27 const psImage* restrict input, 28 28 const psImage* restrict mask, 29 ps U32maskVal,29 psMaskType maskVal, 30 30 psRegion region, 31 31 psImageCutDirection direction, … … 273 273 const psImage* input, 274 274 const psImage* mask, 275 ps U32maskVal,275 psMaskType maskVal, 276 276 psRegion region, 277 277 unsigned int nSamples, … … 407 407 const psImage* input, 408 408 const psImage* restrict mask, 409 ps U32maskVal,409 psMaskType maskVal, 410 410 float x, 411 411 float y, -
trunk/psLib/src/imageops/psImagePixelExtract.h
r4367 r4385 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06-2 3 03:50:29$10 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-25 00:51:28 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 64 64 const psImage* input, ///< the input image in which to perform the slice 65 65 const psImage* mask, ///< the mask for the input image. 66 ps U32 maskVal,///< the mask value to apply to the mask66 psMaskType maskVal, ///< the mask value to apply to the mask 67 67 psRegion region, ///< the slice region 68 68 psImageCutDirection direction, ///< the slice dimension and direction … … 84 84 * psF64. 85 85 * 86 * @return psVector resulting vector86 * @return psVector* resulting vector 87 87 */ 88 88 psVector* psImageCut( … … 92 92 const psImage* input, ///< the input image in which to perform the cut 93 93 const psImage* mask, ///< the mask for the input image. 94 ps U32 maskVal,///< the mask value to apply to the mask94 psMaskType maskVal, ///< the mask value to apply to the mask 95 95 psRegion region, ///< the start and end points to cut along 96 96 unsigned int nSamples, ///< the number of samples along the cut … … 115 115 const psImage* input, ///< the input image in which to perform the cut 116 116 const psImage* mask, ///< the mask for the input image. 117 ps U32 maskVal,///< the mask value to apply to the mask117 psMaskType maskVal, ///< the mask value to apply to the mask 118 118 float x, ///< the column of the center of the cut circle 119 119 float y, ///< the row of the center of the cut circle -
trunk/psLib/src/imageops/psImagePixelManip.c
r4367 r4385 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06-2 3 03:50:29$12 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-25 00:51:28 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 311 311 312 312 int psImageClipComplexRegion(psImage* input, 313 _Complex min,314 _Complex vmin,315 _Complex max,316 _Complex vmax)313 complex min, 314 complex vmin, 315 complex max, 316 complex vmax) 317 317 { 318 318 psS32 numClipped = 0; -
trunk/psLib/src/imageops/psImagePixelManip.h
r4367 r4385 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06-2 3 03:50:29$10 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-25 00:51:28 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 51 51 int psImageClipComplexRegion( 52 52 psImage* input, ///< the image to clip 53 _Complex min,///< the minimum image value allowed54 _Complex vmin,///< the value pixels < min are set to55 _Complex max,///< the maximum image value allowed56 _Complex vmax///< the value pixels > max are set to53 complex min, ///< the minimum image value allowed 54 complex vmin, ///< the value pixels < min are set to 55 complex max, ///< the maximum image value allowed 56 complex vmax ///< the value pixels > max are set to 57 57 ); 58 58 -
trunk/psLib/src/imageops/psImageStats.c
r4029 r4385 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.7 4$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-0 5-25 20:26:55$11 * @version $Revision: 1.75 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-06-25 00:51:28 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 47 47 const psImage* in, 48 48 const psImage* mask, 49 ps S32maskVal)49 psMaskType maskVal) 50 50 { 51 51 psVector *junkData = NULL; … … 122 122 const psImage* in, 123 123 const psImage* mask, 124 ps U32maskVal)124 psMaskType maskVal) 125 125 { 126 126 PS_ASSERT_PTR_NON_NULL(out, NULL); -
trunk/psLib/src/imageops/psImageStats.h
r4243 r4385 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.2 3$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-06- 14 02:54:15$11 * @version $Revision: 1.24 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-06-25 00:51:28 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 40 40 const psImage* in, ///< image (or subimage) to calculate stats 41 41 const psImage* mask, ///< mask data for image (NULL ok) 42 ps S32 maskVal ///< mask Maskfor mask42 psMaskType maskVal ///< mask value for mask 43 43 ); 44 44 … … 55 55 const psImage* in, ///< Image data to be histogramed. 56 56 const psImage* mask, ///< mask data for image (NULL ok) 57 ps U32 maskVal///< mask Mask for mask57 psMaskType maskVal ///< mask Mask for mask 58 58 ); 59 59 -
trunk/psLib/src/math/psMatrix.c
r4321 r4385 21 21 * @author Robert DeSonia, MHPCC 22 22 * 23 * @version $Revision: 1.3 2$ $Name: not supported by cvs2svn $24 * @date $Date: 2005-06-2 0 22:42:29$23 * @version $Revision: 1.33 $ $Name: not supported by cvs2svn $ 24 * @date $Date: 2005-06-25 00:51:28 $ 25 25 * 26 26 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 298 298 } 299 299 300 psImage* psMatrixInvert(psImage* out Image, const psImage* inImage, float *det)300 psImage* psMatrixInvert(psImage* out, const psImage* in, float *determinant) 301 301 { 302 302 psS32 signum = 0; … … 307 307 gsl_permutation *perm = NULL; 308 308 309 #define INVERT_CLEANUP { psFree(out Image); return NULL; }310 // Error checks 311 PS_ASSERT_GENERAL_PTR_NON_NULL(det , INVERT_CLEANUP);312 PS_ASSERT_GENERAL_IMAGE_NON_NULL(in Image, INVERT_CLEANUP);313 PS_CHECK_POINTERS(in Image, outImage, INVERT_CLEANUP);314 PS_CHECK_DIMEN_AND_TYPE(in Image, PS_DIMEN_IMAGE, INVERT_CLEANUP);315 PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in Image, INVERT_CLEANUP);316 317 out Image = psImageRecycle(outImage, inImage->numCols, inImage->numRows, inImage->type.type);318 319 PS_CHECK_SQUARE(in Image, INVERT_CLEANUP);320 PS_CHECK_SQUARE(out Image, INVERT_CLEANUP);309 #define INVERT_CLEANUP { psFree(out); return NULL; } 310 // Error checks 311 PS_ASSERT_GENERAL_PTR_NON_NULL(determinant, INVERT_CLEANUP); 312 PS_ASSERT_GENERAL_IMAGE_NON_NULL(in, INVERT_CLEANUP); 313 PS_CHECK_POINTERS(in, out, INVERT_CLEANUP); 314 PS_CHECK_DIMEN_AND_TYPE(in, PS_DIMEN_IMAGE, INVERT_CLEANUP); 315 PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in, INVERT_CLEANUP); 316 317 out = psImageRecycle(out, in->numCols, in->numRows, in->type.type); 318 319 PS_CHECK_SQUARE(in, INVERT_CLEANUP); 320 PS_CHECK_SQUARE(out, INVERT_CLEANUP); 321 321 322 322 // Initialize data 323 numRows = in Image->numRows;324 numCols = in Image->numCols;323 numRows = in->numRows; 324 numCols = in->numCols; 325 325 326 326 // Initialize GSL data … … 328 328 lu = gsl_matrix_alloc(numRows, numCols); 329 329 inv = gsl_matrix_alloc(numRows, numCols); 330 psImageToGslMatrix(lu, in Image);330 psImageToGslMatrix(lu, in); 331 331 332 332 // Invert data and calculate determinant 333 333 gsl_linalg_LU_decomp(lu, perm, &signum); 334 334 gsl_linalg_LU_invert(lu, perm, inv); 335 *det = (float)gsl_linalg_LU_det(lu, signum);335 *determinant = (float)gsl_linalg_LU_det(lu, signum); 336 336 337 337 // Copy GSL matrix data to psImage data 338 gslMatrixToPsImage(out Image, inv);338 gslMatrixToPsImage(out, inv); 339 339 340 340 // Free GSL structs … … 343 343 gsl_matrix_free(inv); 344 344 345 return out Image;345 return out; 346 346 } 347 347 -
trunk/psLib/src/math/psMatrix.h
r4321 r4385 21 21 * @author Ross Harman, MHPCC 22 22 * 23 * @version $Revision: 1.1 7$ $Name: not supported by cvs2svn $24 * @date $Date: 2005-06-2 0 22:42:29$23 * @version $Revision: 1.18 $ $Name: not supported by cvs2svn $ 24 * @date $Date: 2005-06-25 00:51:28 $ 25 25 * 26 26 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 74 74 */ 75 75 psImage* psMatrixInvert( 76 psImage* out Image, ///< Image to return, or NULL for in-place substitution.77 const psImage* in Image, ///< Image to be inverted76 psImage* out, ///< Image to return, or NULL for in-place substitution. 77 const psImage* in, ///< Image to be inverted 78 78 float *det ///< Determinant to return, or NULL 79 79 ); -
trunk/psLib/test/dataManip/verified/tst_psMatrix04.stderr
r3127 r4385 1 1 <DATE><TIME>|<HOST>|E|psMatrixInvert (FILE:LINENO) 2 Unallowable operation: psImage in Imageor its data is NULL.2 Unallowable operation: psImage in or its data is NULL. 3 3 <DATE><TIME>|<HOST>|E|psMatrixInvert (FILE:LINENO) 4 Unallowable operation: det is NULL.4 Unallowable operation: determinant is NULL.
Note:
See TracChangeset
for help on using the changeset viewer.
