Changeset 1073 for trunk/psLib/src/dataManip/psVectorFFT.c
- Timestamp:
- Jun 23, 2004, 1:00:17 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/dataManip/psVectorFFT.c (modified) (37 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/dataManip/psVectorFFT.c
r1010 r1073 5 5 * @author Robert DeSonia, MHPCC 6 6 * 7 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $8 * @date $Date: 2004-06- 12 02:17:25 $7 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2004-06-23 23:00:15 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 35 35 /* got good image data? */ 36 36 if (in==NULL) { 37 ps ImageFree(out);37 psFree(out); 38 38 return NULL; 39 39 } … … 44 44 psError(__func__,"Input image must be a 32-bit float or complex image (type=%d)", 45 45 type); 46 ps ImageFree(out);46 psFree(out); 47 47 return NULL; 48 48 } … … 51 51 psError(__func__,"Input image must be complex image for reverse FFT (type=%d).", 52 52 type); 53 ps ImageFree(out);53 psFree(out); 54 54 return NULL; 55 55 … … 76 76 if (plan == NULL) { 77 77 psError(__func__,"Failed to create FFTW plan."); 78 ps ImageFree(out);78 psFree(out); 79 79 return NULL; 80 80 } … … 98 98 99 99 if (in == NULL) { 100 ps ImageFree(out);100 psFree(out); 101 101 return NULL; 102 102 } … … 143 143 psError(__func__,"Can not extract real component from given image type (%d).", 144 144 type); 145 ps ImageFree(out);145 psFree(out); 146 146 return NULL; 147 147 } … … 158 158 159 159 if (in == NULL) { 160 ps ImageFree(out);160 psFree(out); 161 161 return NULL; 162 162 } … … 205 205 psError(__func__,"Can not extract imaginary component from given image type (%d).", 206 206 type); 207 ps ImageFree(out);207 psFree(out); 208 208 return NULL; 209 209 } … … 220 220 221 221 if (real == NULL || imag == NULL) { 222 ps ImageFree(out);222 psFree(out); 223 223 return NULL; 224 224 } … … 230 230 if (imag->type.type != type) { 231 231 psError(__func__,"The inputs to psImageComplex must be the same type."); 232 ps ImageFree(out);232 psFree(out); 233 233 return NULL; 234 234 } … … 237 237 imag->numRows != numRows) { 238 238 psError(__func__,"The inputs to psImageComplex must be the same dimensions."); 239 ps ImageFree(out);239 psFree(out); 240 240 return NULL; 241 241 } … … 243 243 if (PS_IS_PSELEMTYPE_COMPLEX(type)) { 244 244 psError(__func__,"The inputs to psImageComplex can not be complex."); 245 ps ImageFree(out);245 psFree(out); 246 246 return NULL; 247 247 } … … 249 249 if (type != PS_TYPE_F32 && type != PS_TYPE_F64) { 250 250 psError(__func__,"The input type to psImageComplex must be a floating point."); 251 ps ImageFree(out);251 psFree(out); 252 252 return NULL; 253 253 } … … 287 287 psError(__func__,"Can not merge real and imaginary portions for given image type (%d).", 288 288 type); 289 ps ImageFree(out);289 psFree(out); 290 290 return NULL; 291 291 } … … 302 302 303 303 if (in == NULL) { 304 ps ImageFree(out);304 psFree(out); 305 305 return NULL; 306 306 } … … 347 347 psError(__func__,"Can not compute complex conjugate for given image type (%d).", 348 348 type); 349 ps ImageFree(out);349 psFree(out); 350 350 return NULL; 351 351 } … … 362 362 363 363 if (in == NULL) { 364 ps ImageFree(out);364 psFree(out); 365 365 return NULL; 366 366 } … … 374 374 if (! PS_IS_PSELEMTYPE_COMPLEX(type)) { 375 375 psError(__func__,"Power Spectrum for non-complex inputs is not implemented."); 376 ps ImageFree(out);376 psFree(out); 377 377 return NULL; 378 378 } … … 417 417 psError(__func__,"Can not power spectrum for given image type (%d).", 418 418 type); 419 ps ImageFree(out);419 psFree(out); 420 420 return NULL; 421 421 } … … 435 435 /* got good image data? */ 436 436 if (in==NULL) { 437 ps VectorFree(out);437 psFree(out); 438 438 return NULL; 439 439 } … … 444 444 psError(__func__,"Input image must be a 32-bit float or complex image (type=%d)", 445 445 type); 446 ps VectorFree(out);446 psFree(out); 447 447 return NULL; 448 448 } … … 451 451 psError(__func__,"Input image must be complex image for reverse FFT (type=%d).", 452 452 type); 453 ps VectorFree(out);453 psFree(out); 454 454 return NULL; 455 455 … … 491 491 if (plan == NULL) { 492 492 psError(__func__,"Failed to create FFTW plan."); 493 ps VectorFree(out);493 psFree(out); 494 494 return NULL; 495 495 } … … 510 510 511 511 if (in == NULL) { 512 ps VectorFree(out);512 psFree(out); 513 513 return NULL; 514 514 } … … 542 542 psError(__func__,"Can not extract real component from given vector type (%d).", 543 543 type); 544 ps VectorFree(out);544 psFree(out); 545 545 return NULL; 546 546 } … … 556 556 557 557 if (in == NULL) { 558 ps VectorFree(out);558 psFree(out); 559 559 return NULL; 560 560 } … … 588 588 psError(__func__,"Can not extract imaginary component from given vector type (%d).", 589 589 type); 590 ps VectorFree(out);590 psFree(out); 591 591 return NULL; 592 592 } … … 602 602 603 603 if (real == NULL || imag == NULL) { 604 ps VectorFree(out);604 psFree(out); 605 605 return NULL; 606 606 } … … 615 615 if (imag->type.type != type) { 616 616 psError(__func__,"The inputs to psVectorComplex must be the same type."); 617 ps VectorFree(out);617 psFree(out); 618 618 return NULL; 619 619 } … … 621 621 if (PS_IS_PSELEMTYPE_COMPLEX(type)) { 622 622 psError(__func__,"The inputs to psVectorComplex can not be complex."); 623 ps VectorFree(out);623 psFree(out); 624 624 return NULL; 625 625 } … … 640 640 psError(__func__,"Can not merge real and imaginary portions for given vector type (%d).", 641 641 type); 642 ps VectorFree(out);642 psFree(out); 643 643 return NULL; 644 644 } … … 654 654 655 655 if (in == NULL) { 656 ps VectorFree(out);656 psFree(out); 657 657 return NULL; 658 658 } … … 687 687 psError(__func__,"Can not compute complex conjugate for given vector type (%d).", 688 688 type); 689 ps VectorFree(out);689 psFree(out); 690 690 return NULL; 691 691 } … … 703 703 704 704 if (in == NULL) { 705 ps VectorFree(out);705 psFree(out); 706 706 return NULL; 707 707 } … … 716 716 if (! PS_IS_PSELEMTYPE_COMPLEX(type)) { 717 717 psError(__func__,"Power Spectrum for non-complex inputs is not implemented."); 718 ps VectorFree(out);718 psFree(out); 719 719 return NULL; 720 720 } … … 747 747 psError(__func__,"Can not power spectrum for given vector type (%d).", 748 748 type); 749 ps VectorFree(out);750 return NULL; 751 } 752 753 return out; 754 755 } 749 psFree(out); 750 return NULL; 751 } 752 753 return out; 754 755 }
Note:
See TracChangeset
for help on using the changeset viewer.
