Module gwy
[hide private]
[frames] | no frames]

Source Code for Module gwy

    1  # This is dummy GENERATED file used for generation of documentation 
2 -class Axis:
3 - def __init__( orientation ):
4 """ 5 Creates a new axis. 6 7 8 @return: New axis as a B{C{GtkWidget}}. 9 10 """ 11 return None
12 - def set_logarithmic( is_logarithmic ):
13 """ 14 Sets logarithmic mode. 15 16 @param is_logarithmic: logarithmic mode I{(bool)} 17 @return: 18 """ 19 return None
20 - def set_visible( is_visible ):
21 """ 22 Sets the visibility of an axis. 23 24 @param is_visible: visibility I{(bool)} 25 @return: 26 """ 27 return None
28 - def is_visible( ):
29 """ 30 Determines whether axis is set to be visible. 31 32 Return: B{C{True}} if B{C{axis}} is set to be visible. 33 34 @return: 35 """ 36 return None
37 - def is_logarithmic( ):
38 """ 39 Determines whether axis is set to be locarithmic. 40 41 42 @return: B{C{True}} if B{C{axis}} is logarithmic. 43 44 """ 45 return None
46 - def get_orientation( ):
47 """ 48 Gets the orientation of an axis. 49 50 51 @return: The orientation. 52 53 """ 54 return None
55 - def set_auto( is_auto ):
56 """ 57 Enables or disables automatic axis adjustmet. 58 59 @param is_auto: B{C{True}} to enable automatic tick size and distribution adjustment, 60 B{C{False}} to disable it. I{(bool)} 61 @return: 62 """ 63 return None
64 - def request_range( min , max ):
65 """ 66 Sets the requisition of axis boundaries. 67 68 The axis will adjust the boundaries to satisfy requisition but still have 69 reasonable tick values and spacing. Use L{Axis.get_range}() to obtain the 70 boundaries the axis actually decided to use. 71 72 @param min: Minimum requisition (min boundary value). I{(float)} 73 @param max: Maximum requisition (max boundary value). I{(float)} 74 @return: 75 """ 76 return None
77 - def get_range( min , max ):
78 """ 79 Gets the actual boundaries of an axis. 80 81 @param min: Location to store actual axis minimum, or B{C{NULL}}. I{(float)} 82 @param max: Location to store actual axis maximum, or B{C{NULL}}. I{(float)} 83 @return: 84 """ 85 return None
86 - def get_requested_range( min , max ):
87 """ 88 Gets the requested boundaries of an axis. 89 90 @param min: Location to store requested axis minimum, or B{C{NULL}}. I{(float)} 91 @param max: Location to store requested axis maximum, or B{C{NULL}}. I{(float)} 92 @return: 93 """ 94 return None
95 - def get_magnification( ):
96 """ 97 98 @return: Magnification value of the axis 99 100 """ 101 return None
103 """ 104 Gets the magnification string of an axis. 105 106 107 @return: Magnification string of the axis, owned by the axis. 108 109 """ 110 return None
111 - def set_label( label ):
112 """ 113 Sets the label text of an axis. 114 115 @param label: The new label text (it can be B{C{NULL}} for an empty label). I{(string)} 116 @return: 117 """ 118 return None
119 - def get_label( ):
120 """ 121 Gets the label of an axis. 122 123 124 @return: Axis label as a string owned by B{C{axis}}. 125 126 """ 127 return None
128 - def set_si_unit( unit ):
129 """ 130 Sets the axis unit. This will be added automatically 131 to the label. B{C{unit}} is duplicated. 132 133 @param unit: axis unit I{(L{SIUnit})} 134 @return: 135 """ 136 return None
137 - def enable_label_edit( enable ):
138 """ 139 Enables/disables user to change axis label by clicking on axis widget. 140 141 @param enable: enable/disable user to change axis label I{(bool)} 142 @return: 143 """ 144 return None
145 - def draw_on_drawable( drawable , gc , xmin , ymin , width , height ):
146 """ 147 Draws the x and y-axis on a drawable 148 149 @param drawable: Drawable to draw on. I{(GdkDrawable*)} 150 @param gc: Graphics context. 151 It is modified by this function unpredictably. I{(GdkGC*)} 152 @param xmin: The minimum x-axis value. I{(int)} 153 @param ymin: The minimum y-axis value. I{(int)} 154 @param width: The width of the x-axis. I{(int)} 155 @param height: The height of the y-axis. I{(int)} 156 @return: 157 """ 158 return None
159 - def UNIMPLEMENTED_export_vector( xmin , ymin , width , height , fontsize ):
160 """ 161 162 @param xmin: I{(int)} 163 @param ymin: I{(int)} 164 @param width: width of the x-axis I{(int)} 165 @param height: hieght of the y-axis I{(int)} 166 @param fontsize: I{(int)} 167 @return: 168 """ 169 return None
170 - def get_major_ticks( nticks ):
171 """ 172 Gets the positions of major ticks of an axis. 173 174 175 @param nticks: Location to store the number of returned ticks. I{(int)} 176 @return: The positions of axis major ticks (as real values, not pixels). 177 The returned array is owned by the axis. 178 179 """ 180 return None
181 -class Brick:
182 - def __init__( xres , yres , zres , xreal , yreal , zreal , nullme ):
183 """ 184 Creates a new data brick. 185 186 Since: 2.31 187 188 @param yres: Y resolution, i.e., the number of samples in y direction I{(int)} 189 @param zres: Z resolution, i.e., the number of samples in z direction I{(int)} 190 @param xreal: Real physical dimension in x direction. I{(float)} 191 @param yreal: Real physical dimension in y direction. I{(float)} 192 @param zreal: Real physical dimension in z direction. I{(float)} 193 @param nullme: Whether the data brick should be initialized to zeroes. If B{C{False}}, 194 the data will not be initialized. I{(bool)} 195 @return: A newly created data brick. 196 197 198 """ 199 return None
200 - def new_alike( nullme ):
201 """ 202 Creates a new data brick similar to an existing one. 203 204 Use L{Brick.duplicate}() if you want to copy a data brick including 205 data. 206 207 Since: 2.31 208 209 @param nullme: Whether the data brick should be initialized to zeroes. If B{C{False}}, 210 the data will not be initialized. I{(bool)} 211 @return: A newly created data brick. 212 213 214 """ 215 return None
216 - def new_part( xpos , ypos , zpos , xres , yres , zres , keep_offsets ):
217 """ 218 Creates a new data brick as a part of existing one. 219 220 Use L{Brick.duplicate}() if you want to copy a whole data brick. 221 222 Since: 2.32 223 224 @param xpos: x position where to start from I{(int)} 225 @param ypos: y position where to start from I{(int)} 226 @param zpos: z position where to start from I{(int)} 227 @param xres: x resolution (width) to be extracted I{(int)} 228 @param yres: y resolution (height) to be extracted I{(int)} 229 @param zres: z resolution (depth) to be extracted I{(int)} 230 @param keep_offsets: keep offsets of data during extraction I{(bool)} 231 @return: A newly created data brick. 232 233 234 """ 235 return None
236 - def data_changed( ):
237 """ 238 Emits signal "data_changed" on a data brick. 239 240 Since: 2.31 241 242 @return: 243 """ 244 return None
245 - def resample( xres , yres , zres , interpolation ):
246 """ 247 Resamples a data brick. 248 249 In other words changes the size of three dimensional field related with data 250 brick. The original values are used for resampling using a requested 251 interpolation alorithm. 252 253 Since: 2.31 254 255 @param xres: Desired x resolution. I{(int)} 256 @param yres: Desired y resolution. I{(int)} 257 @param zres: Desired z resolution. I{(int)} 258 @param interpolation: Interpolation method to use. I{(InterpolationType)} 259 @return: 260 """ 261 return None
262 - def get_xres( ):
263 """ 264 Gets the x resolution of a data brick. 265 266 Since: 2.31 267 268 @return: Resolution (number of data points). 269 270 271 """ 272 return None
273 - def get_yres( ):
274 """ 275 Gets the y resolution of a data brick. 276 277 Since: 2.31 278 279 @return: Resolution (number of data points). 280 281 282 """ 283 return None
284 - def get_zres( ):
285 """ 286 Gets the z resolution of a data brick. 287 288 Since: 2.31 289 290 @return: Resolution (number of data points). 291 292 293 """ 294 return None
295 - def get_xreal( ):
296 """ 297 Gets the physical size of a data brick in the x direction. 298 299 Since: 2.31 300 301 @return: Real size of a data brick the x direction. 302 303 304 """ 305 return None
306 - def get_yreal( ):
307 """ 308 Gets the physical size of a data brick in the y direction. 309 310 Since: 2.31 311 312 @return: Real size of a data brick the y direction. 313 314 315 """ 316 return None
317 - def get_zreal( ):
318 """ 319 Gets the physical size of a data brick in the z direction. 320 321 Since: 2.31 322 323 @return: Real size of a data brick the z direction. 324 325 326 """ 327 return None
328 - def get_xoffset( ):
329 """ 330 Gets the offset of data brick origin in x direction. 331 332 Since: 2.31 333 334 @return: Offset value. 335 336 337 """ 338 return None
339 - def get_yoffset( ):
340 """ 341 Gets the offset of data brick origin in y direction. 342 343 Since: 2.31 344 345 @return: Offset value. 346 347 348 """ 349 return None
350 - def get_zoffset( ):
351 """ 352 Gets the offset of data brick origin in z direction. 353 354 Since: 2.31 355 356 @return: Offset value. 357 358 359 """ 360 return None
361 - def set_xreal( xreal ):
362 """ 363 Sets the real x dimension of a brick. 364 365 Since: 2.31 366 367 @param xreal: New real x dimensions value I{(float)} 368 @return: 369 """ 370 return None
371 - def set_yreal( yreal ):
372 """ 373 Sets the real y dimension of a brick. 374 375 Since: 2.31 376 377 @param yreal: New real y dimensions value I{(float)} 378 @return: 379 """ 380 return None
381 - def set_zreal( zreal ):
382 """ 383 Sets the real z dimension of a brick. 384 385 Since: 2.31 386 387 @param zreal: New real z dimensions value I{(float)} 388 @return: 389 """ 390 return None
391 - def set_xoffset( xoffset ):
392 """ 393 Sets the offset of a data brick origin in the x direction. 394 395 Note offsets don't affect any calculation, nor functions like 396 L{Brick.rtoi}(). 397 398 Since: 2.31 399 400 @param xoffset: New offset value. I{(float)} 401 @return: 402 """ 403 return None
404 - def set_yoffset( yoffset ):
405 """ 406 Sets the offset of a data brick origin in the y direction. 407 408 Note offsets don't affect any calculation, nor functions like 409 L{Brick.rtoi}(). 410 411 Since: 2.31 412 413 @param yoffset: New offset value. I{(float)} 414 @return: 415 """ 416 return None
417 - def set_zoffset( zoffset ):
418 """ 419 Sets the offset of a data brick origin in the z direction. 420 421 Note offsets don't affect any calculation, nor functions like 422 L{Brick.rtoi}(). 423 424 Since: 2.31 425 426 @param zoffset: New offset value. I{(float)} 427 @return: 428 """ 429 return None
430 - def get_si_unit_x( ):
431 """ 432 Returns x direction SI unit of a data brick. 433 434 Since: 2.31 435 436 @return: SI unit corresponding to the lateral (X) dimension of the data 437 brick. Its reference count is not incremented. 438 439 440 """ 441 return None
442 - def get_si_unit_y( ):
443 """ 444 Returns y direction SI unit of a data brick. 445 446 Since: 2.31 447 448 @return: SI unit corresponding to the lateral (Y) dimension of the data 449 brick. Its reference count is not incremented. 450 451 452 """ 453 return None
454 - def get_si_unit_z( ):
455 """ 456 Returns z direction SI unit of a data brick. 457 458 Since: 2.31 459 460 @return: SI unit corresponding to the "height" (Z) dimension of the data 461 brick. Its reference count is not incremented. 462 463 464 """ 465 return None
466 - def get_si_unit_w( ):
467 """ 468 Returns value SI unit of a data brick. 469 470 Since: 2.31 471 472 @return: SI unit corresponding to the "value" of the data 473 brick. Its reference count is not incremented. 474 475 476 """ 477 return None
478 - def set_si_unit_x( si_unit ):
479 """ 480 Sets the SI unit corresponding to the lateral (X) dimension of a data 481 brick. 482 483 It does not assume a reference on B{C{si_unit}}, instead it adds its own 484 reference. 485 486 Since: 2.31 487 488 @param si_unit: SI unit to be set. I{(L{SIUnit})} 489 @return: 490 """ 491 return None
492 - def set_si_unit_y( si_unit ):
493 """ 494 Sets the SI unit corresponding to the lateral (Y) dimension of a data 495 brick. 496 497 It does not assume a reference on B{C{si_unit}}, instead it adds its own 498 reference. 499 500 Since: 2.31 501 502 @param si_unit: SI unit to be set. I{(L{SIUnit})} 503 @return: 504 """ 505 return None
506 - def set_si_unit_z( si_unit ):
507 """ 508 Sets the SI unit corresponding to the "height" (Z) dimension of a data 509 brick. 510 511 It does not assume a reference on B{C{si_unit}}, instead it adds its own 512 reference. 513 514 Since: 2.31 515 516 @param si_unit: SI unit to be set. I{(L{SIUnit})} 517 @return: 518 """ 519 return None
520 - def set_si_unit_w( si_unit ):
521 """ 522 Sets the SI unit corresponding to the "value" of a data 523 brick. 524 525 It does not assume a reference on B{C{si_unit}}, instead it adds its own 526 reference. 527 528 Since: 2.31 529 530 @param si_unit: SI unit to be set. I{(L{SIUnit})} 531 @return: 532 """ 533 return None
534 - def get_min( ):
535 """ 536 Since: 2.31 537 538 @return: The minimum value within the brick. 539 540 541 """ 542 return None
543 - def get_max( ):
544 """ 545 Since: 2.31 546 547 @return: The maximum value within the brick. 548 549 550 """ 551 return None
552 - def UNIMPLEMENTED_get_value_format_x( style , format ):
553 """ 554 Finds value format good for displaying coordinates of a data brick. 555 556 Since: 2.31 557 558 @param style: Unit format style. I{(SIUnitFormatStyle)} 559 @param format: A SI value format to modify, or B{C{NULL}} to allocate a new one. I{(SIValueFormat*)} 560 @return: The value format. If B{C{format}} is B{C{NULL}}, a newly allocated format 561 is returned, otherwise (modified) B{C{format}} itself is returned. 562 563 564 """ 565 return None
566 - def UNIMPLEMENTED_get_value_format_y( style , format ):
567 """ 568 Finds value format good for displaying values of a data brick. 569 570 Since: 2.31 571 572 @param style: Unit format style. I{(SIUnitFormatStyle)} 573 @param format: A SI value format to modify, or B{C{NULL}} to allocate a new one. I{(SIValueFormat*)} 574 @return: The value format. If B{C{format}} is B{C{NULL}}, a newly allocated format 575 is returned, otherwise (modified) B{C{format}} itself is returned. 576 577 578 """ 579 return None
580 - def UNIMPLEMENTED_get_value_format_z( style , format ):
581 """ 582 Finds value format good for displaying values of a data brick. 583 584 Since: 2.31 585 586 @param style: Unit format style. I{(SIUnitFormatStyle)} 587 @param format: A SI value format to modify, or B{C{NULL}} to allocate a new one. I{(SIValueFormat*)} 588 @return: The value format. If B{C{format}} is B{C{NULL}}, a newly allocated format 589 is returned, otherwise (modified) B{C{format}} itself is returned. 590 591 592 """ 593 return None
594 - def UNIMPLEMENTED_get_value_format_w( style , format ):
595 """ 596 Finds value format good for displaying values of a data brick. 597 598 Note this functions searches for minimum and maximum value in B{C{brick}}, 599 therefore it's relatively slow. 600 601 Since: 2.31 602 603 @param style: Unit format style. I{(SIUnitFormatStyle)} 604 @param format: A SI value format to modify, or B{C{NULL}} to allocate a new one. I{(SIValueFormat*)} 605 @return: The value format. If B{C{format}} is B{C{NULL}}, a newly allocated format 606 is returned, otherwise (modified) B{C{format}} itself is returned. 607 608 609 """ 610 return None
611 - def get_data( ):
612 """ 613 Gets the raw data buffer of a data brick. 614 615 The returned buffer is not guaranteed to be valid through whole data 616 brick life time. Some function may change it, most notably 617 L{Brick.resample}(). 618 619 This function invalidates any cached information, use 620 L{Brick.get_data_const}() if you are not going to change the data. 621 622 Since: 2.31 623 624 @return: The data as an array of doubles of length B{C{xres}}*B{C{yres}}*B{C{zres}}. 625 626 627 """ 628 return None
629 - def itor( pixpos ):
630 """ 631 Transforms pixel coordinate to real (physical) coordinate in x direction. 632 633 That is it maps range [0..x resolution] to range [0..x real-size]. It is not 634 suitable for conversion of matrix indices to physical coordinates, you 635 have to use L{Brick.itor}(B{C{brick}}, B{C{pixpos}} + 0.5) for that. 636 637 Since: 2.31 638 639 @param pixpos: Pixel coordinate. I{(float)} 640 @return: B{C{pixpos}} in real coordinates. 641 642 643 """ 644 return None
645 - def rtoi( realpos ):
646 """ 647 Transforms real (physical) coordinate to pixel coordinate in x axis. 648 649 That is it maps range [0..x real-size] to range [0..x resolution]. 650 651 Since: 2.31 652 653 @param realpos: Real coordinate. I{(float)} 654 @return: B{C{realpos}} in pixel coordinates. 655 656 657 """ 658 return None
659 - def jtor( pixpos ):
660 """ 661 Transforms pixel coordinate to real (physical) coordinate in y direction. 662 663 That is it maps range [0..y resolution] to range [0..y real-size]. It is not 664 suitable for conversion of matrix indices to physical coordinates, you 665 have to use L{Brick.itor}(B{C{brick}}, B{C{pixpos}} + 0.5) for that. 666 667 Since: 2.31 668 669 @param pixpos: Pixel coordinate. I{(float)} 670 @return: B{C{pixpos}} in real coordinates. 671 672 673 """ 674 return None
675 - def rtoj( realpos ):
676 """ 677 Transforms real (physical) coordinate to pixel coordinate in y axis. 678 679 That is it maps range [0..y real-size] to range [0..y resolution]. 680 681 Since: 2.31 682 683 @param realpos: Real coordinate. I{(float)} 684 @return: B{C{realpos}} in pixel coordinates. 685 686 687 """ 688 return None
689 - def ktor( pixpos ):
690 """ 691 Transforms pixel coordinate to real (physical) coordinate in z direction. 692 693 That is it maps range [0..z resolution] to range [0..z real-size]. It is not 694 suitable for conversion of matrix indices to physical coordinates, you 695 have to use L{Brick.itor}(B{C{brick}}, B{C{pixpos}} + 0.5) for that. 696 697 Since: 2.31 698 699 @param pixpos: Pixel coordinate. I{(float)} 700 @return: B{C{pixpos}} in real coordinates. 701 702 703 """ 704 return None
705 - def rtok( realpos ):
706 """ 707 Transforms real (physical) coordinate to pixel coordinate in z axis. 708 709 That is it maps range [0..z real-size] to range [0..z resolution]. 710 711 Since: 2.31 712 713 @param realpos: Real coordinate. I{(float)} 714 @return: B{C{realpos}} in pixel coordinates. 715 716 717 """ 718 return None
719 - def ktor_cal( pixpos ):
720 """ 721 Transforms pixel coordinate to real (physical) coordinate in z direction, 722 taking into account calibration. 723 724 Unlike L{Brick.ktor}(), this function takes into account the B{C{z}} 725 calibration and, if calibration is not present, the B{C{z}} axis offset. 726 Since the calibration is available only for discrete pixel coordinates, 727 the values are interpolated between and clamped if outside the range. 728 729 The values in the calibration are assumed to correspond to pixel centres. 730 This convention is also kept when no calibration is present. 731 732 Since: 2.42 733 734 @param pixpos: Pixel coordinate. I{(float)} 735 @return: B{C{pixpos}} in real coordinates. 736 737 738 """ 739 return None
740 - def rtok_cal( realpos ):
741 """ 742 Transforms real (physical) coordinate to pixel coordinate in z axis, 743 taking into account calibration. 744 745 Unlike L{Brick.rtok}(), this function takes into account the B{C{z}} 746 calibration and, if calibration is not present, the B{C{z}} axis offset. 747 Since the calibration is available only for discrete pixel coordinates, 748 the values are interpolated between and clamped if outside the range. 749 750 The values in the calibration are assumed to correspond to pixel centres. 751 This convention is also kept when no calibration is present. 752 753 Since: 2.42 754 755 @param realpos: Real coordinate. I{(float)} 756 @return: B{C{realpos}} in pixel coordinates. 757 758 759 """ 760 return None
761 - def get_val( col , row , lev ):
762 """ 763 Gets value at given position in a data brick. 764 765 Do not access data with this function inside inner loops, it's slow. 766 Get raw data buffer with L{Brick.get_data_const}() and access it 767 directly instead. 768 769 Since: 2.31 770 771 @param col: Position in the brick (column index). I{(int)} 772 @param row: Position in the brick (row index). I{(int)} 773 @param lev: Position in the brick (level index). I{(int)} 774 @return: Value at given index. 775 776 777 """ 778 return None
779 - def set_val( col , row , lev , value ):
780 """ 781 Sets value at given position in a data brick. 782 783 Do not access data with this function inside inner loops, it's slow. 784 Get raw data buffer with L{Brick.get_data_const}() and access it 785 directly instead. 786 787 Since: 2.31 788 789 @param col: Position in the brick (column index). I{(int)} 790 @param row: Position in the brick (row index). I{(int)} 791 @param lev: Position in the brick (level index). I{(int)} 792 @param value: Value to be set. I{(float)} 793 @return: 794 """ 795 return None
796 - def get_val_real( x , y , z ):
797 """ 798 Gets value at given position in a data brick, in real coordinates. 799 800 Do not access data with this function inside inner loops, it's slow. 801 Get raw data buffer with L{Brick.get_data_const}() and access it 802 directly instead. 803 804 Since: 2.31 805 806 @param x: Position in the brick (x direction). I{(float)} 807 @param y: Position in the brick (y direction). I{(float)} 808 @param z: Position in the brick (z direction). I{(float)} 809 @return: Value at given index. 810 811 812 """ 813 return None
814 - def set_val_real( x , y , z , value ):
815 """ 816 Sets value at given position in a data brick. 817 818 Do not access data with this function inside inner loops, it's slow. 819 Get raw data buffer with L{Brick.get_data_const}() and access it 820 directly instead. 821 822 Since: 2.31 823 824 @param x: Position in the brick (x direction). I{(float)} 825 @param y: Position in the brick (y direction). I{(float)} 826 @param z: Position in the brick (z direction). I{(float)} 827 @param value: Value to be set. I{(float)} 828 @return: 829 """ 830 return None
831 - def get_dval( x , y , z , interpolation ):
832 """ 833 Gets interpolated value at arbitrary data brick point indexed by pixel 834 coordinates. 835 836 Note pixel values are centered in intervals [B{C{i}}, B{C{i}}+1]. 837 See also L{Brick.get_dval_real}() that does the same, but takes 838 real coordinates. 839 840 Since: 2.31 841 842 @param x: Position in data brick in range [0, x resolution]. If the value is outside 843 this range, the nearest border value is returned. I{(float)} 844 @param y: Position in data brick in range [0, y resolution]. If the value is outside 845 this range, the nearest border value is returned. I{(float)} 846 @param z: Position in data brick in range [0, z resolution]. If the value is outside 847 this range, the nearest border value is returned. I{(float)} 848 @param interpolation: Interpolation method to use. I{(int)} 849 @return: Value interpolated in the data brick. 850 851 852 """ 853 return None
854 - def get_dval_real( x , y , z , interpolation ):
855 """ 856 Gets interpolated value at arbitrary data brick point indexed by pixel 857 coordinates. 858 859 Note pixel values are centered in intervals [B{C{j}}, B{C{j}}+1]. 860 See also L{Brick.get_dval}() that does the same, but takes 861 pixel coordinates. 862 863 Since: 2.31 864 865 @param x: Position in data brick in range [0, x resolution]. If the value is outside 866 this range, the nearest border value is returned. I{(float)} 867 @param y: Position in data brick in range [0, y resolution]. If the value is outside 868 this range, the nearest border value is returned. I{(float)} 869 @param z: Position in data brick in range [0, z resolution]. If the value is outside 870 this range, the nearest border value is returned. I{(float)} 871 @param interpolation: Interpolation method to use. I{(int)} 872 @return: Value interpolated in the data brick. 873 874 875 """ 876 return None
877 - def clear( ):
878 """ 879 Fills a data brick with zeroes. 880 881 Since: 2.31 882 883 @return: 884 """ 885 return None
886 - def fill( value ):
887 """ 888 Fills a data brick with specified value. 889 890 Since: 2.31 891 892 @param value: Value to fill data brick with. I{(float)} 893 @return: 894 """ 895 return None
896 - def multiply( value ):
897 """ 898 Multiplies all values in a data brick with a specified value. 899 900 Since: 2.31 901 902 @param value: Value to multiply data brick with. I{(float)} 903 @return: 904 """ 905 return None
906 - def add( value ):
907 """ 908 Adds a specified value to all values in a data brick. 909 910 Since: 2.31 911 912 @param value: Value to be added. I{(float)} 913 @return: 914 """ 915 return None
916 - def extract_plane( target , istart , jstart , kstart , width , height , depth , keep_offsets ):
917 """ 918 Extract a plane (DataField) from the brick. 919 920 One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, determining the 921 plane orientation. 922 923 Since: 2.31 924 925 @param target: Datafield to be filled by extracted plane. It will be resized if 926 necessary. I{(L{DataField})} 927 @param istart: Column where to start (pixel coordinates). I{(int)} 928 @param jstart: Row where to start (pixel coordinates). I{(int)} 929 @param kstart: Level where to start (pixel coordinates). I{(int)} 930 @param width: Pixel width of extracted plane. If B{C{width}} is -1, the yz plane will 931 be extracted. I{(int)} 932 @param height: Pixel height of extracted plane. If B{C{height}} is -1, the xz plane 933 will be extracted I{(int)} 934 @param depth: Pixel depth of extracted plane. If B{C{depth}} is -1, the xy plane will 935 be extracted I{(int)} 936 @param keep_offsets: Keep the physical offsets in extracted field. I{(bool)} 937 @return: 938 """ 939 return None
940 - def sum_plane( target , istart , jstart , kstart , width , height , depth , keep_offsets ):
941 """ 942 Sums planes in certain direction and extract the result (DataField). One 943 value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, determining the plane 944 orientation. In contrast to L{Brick.extract_plane}, the appropriate start 945 coordinate (e.g. B{C{istart}} if B{C{width}} = -1) is not used for single plane 946 extraction, but the planes are accumulated in whole range (0..xres for given 947 example) 948 949 Since: 2.31 950 951 @param target: Datafield to be filled by summed plane. It will be resized if 952 necessary. I{(L{DataField})} 953 @param istart: Column where to start (pixel coordinates). I{(int)} 954 @param jstart: Row where to start (pixel coordinates). I{(int)} 955 @param kstart: Level where to start (pixel coordinates). I{(int)} 956 @param width: Pixel width of summed plane. If B{C{width}} is -1, the yz planes will be 957 summed. I{(int)} 958 @param height: Pixel height of summed plane. If B{C{height}} is -1, the xz planes will 959 be summed I{(int)} 960 @param depth: Pixel depth of summed plane. If B{C{depth}} is -1, the xy planes will 961 be summed I{(int)} 962 @param keep_offsets: Keep the physical offsets in extracted field. Not 963 implemented. I{(bool)} 964 @return: 965 """ 966 return None
967 - def min_plane( target , istart , jstart , kstart , width , height , depth , keep_offsets ):
968 """ 969 Finds minima of planes in certain direction and extract the result 970 (DataField). One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, 971 determining the plane orientation. In contrast to L{Brick.extract_plane}, 972 the appropriate start coordinate (e.g. B{C{istart}} if B{C{width}} = -1) is not used 973 for single plane extraction, but the planes are accumulated in whole range 974 (0..xres for given example) 975 976 Since: 2.32 977 978 @param target: Datafield to be filled by the minima plane. It will be resized if 979 necessary. I{(L{DataField})} 980 @param istart: Column where to start (pixel coordinates). I{(int)} 981 @param jstart: Row where to start (pixel coordinates). I{(int)} 982 @param kstart: Level where to start (pixel coordinates). I{(int)} 983 @param width: Pixel width of summarized plane. If B{C{width}} is -1, the yz planes will 984 be summarized. I{(int)} 985 @param height: Pixel height of summarized plane. If B{C{height}} is -1, the xz planes 986 will be summarized. I{(int)} 987 @param depth: Pixel depth of summarized plane. If B{C{depth}} is -1, the xy planes will 988 be summarized I{(int)} 989 @param keep_offsets: Keep the physical offsets in extracted field. Not 990 implemented. I{(bool)} 991 @return: 992 """ 993 return None
994 - def max_plane( target , istart , jstart , kstart , width , height , depth , keep_offsets ):
995 """ 996 Finds minima of planes in certain direction and extract the result 997 (DataField). One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, 998 determining the plane orientation. In contrast to L{Brick.extract_plane}, 999 the appropriate start coordinate (e.g. B{C{istart}} if B{C{width}} = -1) is not used 1000 for single plane extraction, but the planes are accumulated in whole range 1001 (0..xres for given example) 1002 1003 Since: 2.32 1004 1005 @param target: Datafield to be filled by the maxima plane. It will be resized if 1006 necessary. I{(L{DataField})} 1007 @param istart: Column where to start (pixel coordinates). I{(int)} 1008 @param jstart: Row where to start (pixel coordinates). I{(int)} 1009 @param kstart: Level where to start (pixel coordinates). I{(int)} 1010 @param width: Pixel width of summarized plane. If B{C{width}} is -1, the yz planes will 1011 be summarized. I{(int)} 1012 @param height: Pixel height of summarized plane. If B{C{height}} is -1, the xz planes 1013 will be summarized. I{(int)} 1014 @param depth: Pixel depth of extracted plane. If B{C{depth}} is -1, the xy planes will 1015 be summarized I{(int)} 1016 @param keep_offsets: Keep the physical offsets in extracted field. Not 1017 implemented. I{(bool)} 1018 @return: 1019 """ 1020 return None
1021 - def minpos_plane( target , istart , jstart , kstart , width , height , depth , keep_offsets ):
1022 """ 1023 Finds minima positions of planes in certain direction and extract the result 1024 (DataField). One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, 1025 determining the plane orientation. In contrast to L{Brick.extract_plane}, 1026 the appropriate start coordinate (e.g. B{C{istart}} if B{C{width}} = -1) is not used 1027 for single plane extraction, but the planes are accumulated in whole range 1028 (0..xres for given example) 1029 1030 Since: 2.32 1031 1032 @param target: Datafield to be filled by the minima positions plane. 1033 It will be resized if necessary. I{(L{DataField})} 1034 @param istart: Column where to start (pixel coordinates). I{(int)} 1035 @param jstart: Row where to start (pixel coordinates). I{(int)} 1036 @param kstart: Level where to start (pixel coordinates). I{(int)} 1037 @param width: Pixel width of summarized plane. If B{C{width}} is -1, the yz planes will 1038 be summarized. I{(int)} 1039 @param height: Pixel height of summarized plane. If B{C{height}} is -1, the xz planes 1040 will be summarized. I{(int)} 1041 @param depth: Pixel depth of summarized plane. If B{C{depth}} is -1, the xy planes will 1042 be summarized I{(int)} 1043 @param keep_offsets: Keep the physical offsets in summarized field. Not 1044 implemented. I{(bool)} 1045 @return: 1046 """ 1047 return None
1048 - def maxpos_plane( target , istart , jstart , kstart , width , height , depth , keep_offsets ):
1049 """ 1050 Finds maxima positions of planes in certain direction and extract the result 1051 (DataField). One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, 1052 determining the plane orientation. In contrast to L{Brick.extract_plane}, 1053 the appropriate start coordinate (e.g. B{C{istart}} if B{C{width}} = -1) is not used 1054 for single plane extraction, but the planes are accumulated in whole range 1055 (0..xres for given example) 1056 1057 Since: 2.32 1058 1059 @param target: Datafield to be filled by the maxima positions plane. 1060 It will be resized if necessary. I{(L{DataField})} 1061 @param istart: Column where to start (pixel coordinates). I{(int)} 1062 @param jstart: Row where to start (pixel coordinates). I{(int)} 1063 @param kstart: Level where to start (pixel coordinates). I{(int)} 1064 @param width: Pixel width of summarized plane. If B{C{width}} is -1, the yz planes will 1065 be summarized. I{(int)} 1066 @param height: Pixel height of summarized plane. If B{C{height}} is -1, the xz planes 1067 will be summarized I{(int)} 1068 @param depth: Pixel depth of summarized plane. If B{C{depth}} is -1, the xy planes will 1069 be summarized I{(int)} 1070 @param keep_offsets: Keep the physical offsets in summarized field. Not 1071 implemented. I{(bool)} 1072 @return: 1073 """ 1074 return None
1075 - def mean_plane( target , istart , jstart , kstart , width , height , depth , keep_offsets ):
1076 """ 1077 Finds mean of planes in certain direction and extract the result 1078 (DataField). One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, 1079 determining the plane orientation. In contrast to L{Brick.extract_plane}, 1080 the appropriate start coordinate (e.g. B{C{istart}} if B{C{width}} = -1) is not used 1081 for single plane extraction, but the planes are accumulated in whole range 1082 (0..xres for given example) 1083 1084 Since: 2.32 1085 1086 @param target: Datafield to be filled by the mean plane. It will be resized if 1087 necessary. I{(L{DataField})} 1088 @param istart: Column where to start (pixel coordinates). I{(int)} 1089 @param jstart: Row where to start (pixel coordinates). I{(int)} 1090 @param kstart: Level where to start (pixel coordinates). I{(int)} 1091 @param width: Pixel width of summarized plane. If B{C{width}} is -1, the yz planes will 1092 be summarized. I{(int)} 1093 @param height: Pixel height of summarized plane. If B{C{height}} is -1, the xz planes 1094 will be summarized. I{(int)} 1095 @param depth: Pixel depth of summarized plane. If B{C{depth}} is -1, the xy planes will 1096 be summarized. I{(int)} 1097 @param keep_offsets: Keep the physical offsets in summarized field. Not 1098 implemented. I{(bool)} 1099 @return: 1100 """ 1101 return None
1102 - def rms_plane( target , istart , jstart , kstart , width , height , depth , keep_offsets ):
1103 """ 1104 Finds rms of planes in certain direction and extract the result 1105 (DataField). One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, 1106 determining the plane orientation. In contrast to L{Brick.extract_plane}, 1107 the appropriate start coordinate (e.g. B{C{istart}} if B{C{width}} = -1) is not used 1108 for single plane extraction, but the planes are accumulated in whole range 1109 (0..xres for given example) 1110 1111 Since: 2.32 1112 1113 @param target: Datafield to be filled by the rms plane. It will be resized if 1114 necessary. I{(L{DataField})} 1115 @param istart: Column where to start (pixel coordinates). I{(int)} 1116 @param jstart: Row where to start (pixel coordinates). I{(int)} 1117 @param kstart: Level where to start (pixel coordinates). I{(int)} 1118 @param width: Pixel width of summarized plane. If B{C{width}} is -1, the yz planes will 1119 be summarized. I{(int)} 1120 @param height: Pixel height of summarized plane. If B{C{height}} is -1, the xz planes 1121 will be summarized. I{(int)} 1122 @param depth: Pixel depth of summarized plane. If B{C{depth}} is -1, the xy planes will 1123 be summarized. I{(int)} 1124 @param keep_offsets: Keep the physical offsets in extracted field. Not 1125 implemented. I{(bool)} 1126 @return: 1127 """ 1128 return None
1129 - def extract_line( target , istart , jstart , kstart , iend , jend , kend , keep_offsets ):
1130 """ 1131 Extract a line (DataLine) from the brick. 1132 1133 Only line orientations parallel to coordinate axes are supported now, i.e. 1134 two of the start coordinates need to be same as end ones. 1135 1136 Since: 2.31 1137 1138 @param target: Dataline to be filled by extracted line. It will be resized if 1139 necessary. I{(L{DataLine})} 1140 @param istart: Column where to start (pixel coordinates). I{(int)} 1141 @param jstart: Row where to start (pixel coordinates). I{(int)} 1142 @param kstart: Level where to start (pixel coordinates). I{(int)} 1143 @param iend: Column where to start (pixel coordinates). I{(int)} 1144 @param jend: Row where to start (pixel coordinates). I{(int)} 1145 @param kend: Level where to start (pixel coordinates). I{(int)} 1146 @param keep_offsets: Keep physical offsets in extracted line. I{(bool)} 1147 @return: 1148 """ 1149 return None
1150 - def get_zcalibration( ):
1151 """ 1152 Gets the z-axis non-linear calibration of a data brick. 1153 1154 Since: 2.32 1155 1156 @return: Z Calibration (non-linear Z-axis values as ordinates). 1157 1158 1159 """ 1160 return None
1161 - def set_zcalibration( calibration ):
1162 """ 1163 Sets the z-axis non-linear calibration of a data brick. 1164 1165 Since: 2.32 1166 1167 @param calibration: DataLine pointer with z-axis non-linear calibration 1168 of a data brick (values are stored as ordinates). It can also 1169 be B{C{NULL}} to unset the calibration. I{(L{DataLine})} 1170 @return: 1171 """ 1172 return None
1173 - def UNIMPLEMENTED_invert( brick , x , y , z ):
1174 return None
1175 - def duplicate( ):
1176 """ 1177 Duplicate brick 1178 1179 1180 @return: duplicated brick 1181 1182 """ 1183 return None
1184 - def get_data_pointer( ):
1185 """ 1186 Get Pointer to data which the brick contains. 1187 1188 1189 @return: integer pointing to the raw data of the brick 1190 1191 """ 1192 return None
1193 -class ColorAxis:
1194 - def __init__( orientation ):
1195 """ 1196 Creates a new color axis. 1197 1198 1199 @return: The newly created color axis as a B{C{GtkWidget}}. 1200 1201 """ 1202 return None
1203 - def get_range( min , max ):
1204 """ 1205 Gets the range of a color axis. 1206 1207 @param min: Location to store the range maximum (or B{C{NULL}}). I{(float)} 1208 @param max: Location to store the range minimum (or B{C{NULL}}). I{(float)} 1209 @return: 1210 """ 1211 return None
1212 - def set_range( min , max ):
1213 """ 1214 Sets the range of a color axis. 1215 1216 @param min: The range minimum. I{(float)} 1217 @param max: The range maximum. I{(float)} 1218 @return: 1219 """ 1220 return None
1221 - def get_si_unit( ):
1222 """ 1223 Gets the SI unit a color axis displays. 1224 1225 1226 @return: The SI unit. 1227 1228 """ 1229 return None
1230 - def set_si_unit( unit ):
1231 """ 1232 Sets the SI unit a color axis displays. 1233 1234 @param unit: A SI unit to display next to minimum and maximum value. I{(L{SIUnit})} 1235 @return: 1236 """ 1237 return None
1238 - def set_gradient( gradient ):
1239 """ 1240 Sets the color gradient a color axis should use. 1241 1242 @param gradient: Name of gradient B{C{axis}} should use. It should exist. I{(string)} 1243 @return: 1244 """ 1245 return None
1246 - def get_gradient( ):
1247 """ 1248 Gets the color gradient a color axis uses. 1249 1250 1251 @return: The color gradient. 1252 1253 """ 1254 return None
1255 - def get_ticks_style( ):
1256 """ 1257 Gets ticks style of a color axis. 1258 1259 1260 @return: The ticks style. 1261 1262 """ 1263 return None
1264 - def set_ticks_style( ticks_style ):
1265 """ 1266 Sets the ticks style of a color axis. 1267 1268 @param ticks_style: The ticks style to use. I{(TicksStyle)} 1269 @return: 1270 """ 1271 return None
1272 - def get_labels_visible( ):
1273 """ 1274 Gets the visibility of labels of a color axis. 1275 1276 1277 @return: B{C{True}} if labels are displayed, B{C{False}} if they are omitted. 1278 1279 """ 1280 return None
1281 - def set_labels_visible( labels_visible ):
1282 """ 1283 Sets the visibility of labels of a color axis. 1284 1285 @param labels_visible: B{C{True}} to display labels with minimum and maximum values, 1286 B{C{False}} to display no labels. I{(bool)} 1287 @return: 1288 """ 1289 return None
1290 - def UNIMPLEMENTED_set_tick_map_func( func , user_data ):
1291 """ 1292 Set the tick mapping function for a color axis. 1293 1294 The axis calculates tick positions as for the linear axis and then places 1295 them non-linearly using B{C{func}}. Hence a mapping function should be used with 1296 ticks mode B{C{TICKS_STYLE_UNLABELLED}} because minimum tick spacing is not 1297 guaranteed. 1298 1299 Since: 2.39 1300 1301 @param func: Tick mapping function. I{(ColorAxisMapFunc)} 1302 @param user_data: Data to pass to B{C{func}}. I{(gpointer)} 1303 @return: 1304 """ 1305 return None
1306 -class ColorButton:
1307 - def __init__( ):
1308 """ 1309 Creates a new color button. This returns a widget in the form of 1310 a small button containing a swatch representing the current selected 1311 color. When the button is clicked, a color-selection dialog will open, 1312 allowing the user to select a color. The swatch will be updated to reflect 1313 the new color when the user finishes. 1314 1315 1316 @return: a new color button. 1317 1318 """ 1319 return None
1320 - def set_color( color ):
1321 """ 1322 Sets the current color to be B{C{color}}. 1323 1324 @param color: A B{C{RGBA}} to set the current color with. I{(L{RGBA})} 1325 @return: 1326 """ 1327 return None
1328 - def get_color( color ):
1329 """ 1330 Sets B{C{color}} to be the current color in the B{C{ColorButton}} widget. 1331 1332 @param color: a B{C{RGBA}} to fill in with the current color. I{(L{RGBA})} 1333 @return: 1334 """ 1335 return None
1336 - def set_use_alpha( use_alpha ):
1337 """ 1338 Sets whether or not the color button should use the alpha channel. 1339 1340 @param use_alpha: B{C{True}} if color button should use alpha channel, B{C{False}} if not. I{(bool)} 1341 @return: 1342 """ 1343 return None
1344 - def get_use_alpha( ):
1345 """ 1346 Does the color selection dialog use the alpha channel? 1347 1348 1349 @return: B{C{True}} if the color sample uses alpha channel, B{C{False}} if not. 1350 1351 """ 1352 return None
1353 -class Container:
1354 - def __init__( ):
1355 """ 1356 Creates a new B{C{Container}}. 1357 1358 1359 @return: The container, as a B{C{GObject}}. 1360 1361 """ 1362 return None
1363 - def get_n_items( ):
1364 """ 1365 Gets the number of items in a container. 1366 1367 1368 @return: The number of items. 1369 1370 """ 1371 return None
1372 - def value_type( key ):
1373 """ 1374 Returns the type of value in B{C{container}} identified by B{C{key}}. 1375 1376 1377 @param key: A B{C{GQuark}} key. I{(int)} 1378 @return: The value type as B{C{GType}}; 0 if there is no such value. 1379 1380 """ 1381 return None
1382 - def contains( key ):
1383 """ 1384 Returns B{C{True}} if B{C{container}} contains a value identified by B{C{key}}. 1385 1386 1387 @param key: A B{C{GQuark}} key. I{(int)} 1388 @return: Whether B{C{container}} contains something identified by B{C{key}}. 1389 1390 """ 1391 return None
1392 - def get_value( key ):
1393 """ 1394 Returns the value in B{C{container}} identified by B{C{key}}. 1395 1396 1397 @param key: A B{C{GQuark}} key. I{(int)} 1398 @return: The value as a B{C{GValue}}. 1399 1400 """ 1401 return None
1402 - def UNIMPLEMENTED_gis_value( key , value ):
1403 """ 1404 Get-if-set a generic value from a container. 1405 1406 1407 @param key: A B{C{GQuark}} key. I{(int)} 1408 @param value: Pointer to a B{C{GValue}} to update. If item does not exist, 1409 it is left untouched. I{(GValue*)} 1410 @return: B{C{True}} if B{C{v}} was actually updated, B{C{False}} when there is no 1411 such value in the container. 1412 1413 """ 1414 return None
1415 - def remove( key ):
1416 """ 1417 Removes a value identified by B{C{key}} from a container. 1418 1419 1420 @param key: A B{C{GQuark}} key. I{(int)} 1421 @return: B{C{True}} if there was such a value and was removed. 1422 1423 """ 1424 return None
1425 - def remove_by_prefix( prefix ):
1426 """ 1427 Removes a values whose key start with B{C{prefix}} from container B{C{container}}. 1428 1429 B{C{prefix}} can be B{C{NULL}}, all values are then removed. 1430 1431 1432 @param prefix: A nul-terminated id prefix. I{(string)} 1433 @return: The number of values removed. 1434 1435 """ 1436 return None
1437 - def transfer( dest , source_prefix , dest_prefix , force ):
1438 """ 1439 Copies a items from one place in container to another place. 1440 1441 The copies are shallow, objects are not physically duplicated, only 1442 referenced in B{C{dest}}. 1443 1444 1445 @param dest: Destination container. It may be the same container as B{C{source}}, but 1446 B{C{source_prefix}} and B{C{dest_prefix}} may not overlap then. I{(L{Container})} 1447 @param source_prefix: Prefix in B{C{source}} to take values from. I{(string)} 1448 @param dest_prefix: Prefix in B{C{dest}} to put values to. I{(string)} 1449 @param force: B{C{True}} to replace existing values in B{C{dest}}. I{(bool)} 1450 @return: The number of actually transferred items. 1451 1452 """ 1453 return None
1454 - def rename( key , newkey , force ):
1455 """ 1456 Makes a value in B{C{container}} identified by B{C{key}} to be identified by B{C{newkey}}. 1457 1458 When B{C{force}} is B{C{True}} existing value at B{C{newkey}} is removed from B{C{container}}. 1459 When it's B{C{False}}, an existing value B{C{newkey}} inhibits the rename and B{C{False}} 1460 is returned. 1461 1462 1463 @param key: The current key. I{(int)} 1464 @param newkey: A new key for the value. I{(int)} 1465 @param force: Whether to replace existing value at B{C{newkey}}. I{(bool)} 1466 @return: Whether the rename succeeded. 1467 1468 """ 1469 return None
1470 - def UNIMPLEMENTED_foreach( prefix , function , user_data ):
1471 """ 1472 Calls B{C{function}} on each B{C{container}} item whose identifier starts with 1473 B{C{prefix}}. 1474 1475 The function is called B{C{function}}(B{C{GQuark}} key, B{C{GValue}} *value, user_data). 1476 1477 1478 @param prefix: A nul-terminated id prefix. I{(string)} 1479 @param function: The function called on the items. I{(GHFunc)} 1480 @param user_data: The user data passed to B{C{function}}. I{(gpointer)} 1481 @return: The number of items B{C{function}} was called on. 1482 1483 """ 1484 return None
1485 - def keys( ):
1486 """ 1487 Gets all quark keys of a container. 1488 1489 Since: 2.7 1490 1491 @return: A newly allocated array with quark keys of all B{C{container}} items, 1492 in no particular order. The number of items can be obtained 1493 with L{Container.get_n_items}(). If there are no items, B{C{NULL}} 1494 is returned. 1495 1496 1497 """ 1498 return None
1499 - def keys_by_name( ):
1500 """ 1501 Gets all string keys of a container. 1502 1503 Since: 2.7 1504 1505 @return: A newly allocated array with string keys of all B{C{container}} items, 1506 in no particular order. The number of items can be obtained 1507 with L{Container.get_n_items}(). If there are no items, B{C{NULL}} 1508 is returned. Unlike the array the strings are owned by GLib and 1509 must not be freed. 1510 1511 1512 """ 1513 return None
1514 - def set_boolean( key , value ):
1515 """ 1516 Stores a boolean into B{C{container}}, identified by B{C{key}}. 1517 1518 @param key: A B{C{GQuark}} key. I{(int)} 1519 @param value: A boolean. I{(bool)} 1520 @return: 1521 """ 1522 return None
1523 - def get_boolean( key ):
1524 """ 1525 Returns the boolean in B{C{container}} identified by B{C{key}}. 1526 1527 1528 @param key: A B{C{GQuark}} key. I{(int)} 1529 @return: The boolean as B{C{gboolean}}. 1530 1531 """ 1532 return None
1533 - def UNIMPLEMENTED_gis_boolean( key , value ):
1534 """ 1535 Get-if-set a boolean from a container. 1536 1537 1538 @param key: A B{C{GQuark}} key. I{(int)} 1539 @param value: Pointer to the boolean to update. I{(gboolean*)} 1540 @return: B{C{True}} if B{C{v}} was actually updated, B{C{False}} when there is no 1541 such boolean in the container. 1542 1543 """ 1544 return None
1545 - def set_uchar( key , value ):
1546 """ 1547 Stores an unsigned character into B{C{container}}, identified by B{C{key}}. 1548 1549 @param key: A B{C{GQuark}} key. I{(int)} 1550 @param value: An unsigned character. I{(guchar)} 1551 @return: 1552 """ 1553 return None
1554 - def get_uchar( key ):
1555 """ 1556 Returns the unsigned character in B{C{container}} identified by B{C{key}}. 1557 1558 1559 @param key: A B{C{GQuark}} key. I{(int)} 1560 @return: The character as B{C{guchar}}. 1561 1562 """ 1563 return None
1564 - def UNIMPLEMENTED_gis_uchar( key , value ):
1565 """ 1566 Get-if-set an unsigned char from a container. 1567 1568 1569 @param key: A B{C{GQuark}} key. I{(int)} 1570 @param value: Pointer to the unsigned char to update. I{(guchar*)} 1571 @return: B{C{True}} if B{C{v}} was actually updated, B{C{False}} when there is no 1572 such unsigned char in the container. 1573 1574 """ 1575 return None
1576 - def set_int32( key , value ):
1577 """ 1578 Stores a 32bit integer into B{C{container}}, identified by B{C{key}}. 1579 1580 @param key: A B{C{GQuark}} key. I{(int)} 1581 @param value: A 32bit integer. I{(int)} 1582 @return: 1583 """ 1584 return None
1585 - def get_int32( key ):
1586 """ 1587 Returns the 32bit integer in B{C{container}} identified by B{C{key}}. 1588 1589 1590 @param key: A B{C{GQuark}} key. I{(int)} 1591 @return: The integer as B{C{guint32}}. 1592 1593 """ 1594 return None
1595 - def UNIMPLEMENTED_gis_int32( key , value ):
1596 """ 1597 Get-if-set a 32bit integer from a container. 1598 1599 1600 @param key: A B{C{GQuark}} key. I{(int)} 1601 @param value: Pointer to the 32bit integer to update. I{(int)} 1602 @return: B{C{True}} if B{C{v}} was actually updated, B{C{False}} when there is no 1603 such 32bit integer in the container. 1604 1605 """ 1606 return None
1607 - def set_enum( key , value ):
1608 """ 1609 Stores an enum into B{C{container}}, identified by B{C{key}}. 1610 1611 Note enums are treated as 32bit integers. 1612 1613 @param key: A B{C{GQuark}} key. I{(int)} 1614 @param value: An enum integer. I{(int)} 1615 @return: 1616 """ 1617 return None
1618 - def get_enum( key ):
1619 """ 1620 Returns the enum in B{C{container}} identified by B{C{key}}. 1621 1622 Note enums are treated as 32bit integers. 1623 1624 1625 @param key: A B{C{GQuark}} key. I{(int)} 1626 @return: The enum as B{C{gint}}. 1627 1628 """ 1629 return None
1630 - def UNIMPLEMENTED_gis_enum( key , value ):
1631 """ 1632 Get-if-set an enum from a container. 1633 1634 Note enums are treated as 32bit integers. 1635 1636 1637 @param key: A B{C{GQuark}} key. I{(int)} 1638 @param value: Pointer to the enum to update. I{(int)} 1639 @return: B{C{True}} if B{C{v}} was actually updated, B{C{False}} when there is no 1640 such enum in the container. 1641 1642 """ 1643 return None
1644 - def set_int64( key , value ):
1645 """ 1646 Stores a 64bit integer into B{C{container}}, identified by B{C{key}}. 1647 1648 @param key: A B{C{GQuark}} key. I{(int)} 1649 @param value: A 64bit integer. I{(gint64)} 1650 @return: 1651 """ 1652 return None
1653 - def get_int64( key ):
1654 """ 1655 Returns the 64bit integer in B{C{container}} identified by B{C{key}}. 1656 1657 1658 @param key: A B{C{GQuark}} key. I{(int)} 1659 @return: The 64bit integer as B{C{guint64}}. 1660 1661 """ 1662 return None
1663 - def UNIMPLEMENTED_gis_int64( key , value ):
1664 """ 1665 Get-if-set a 64bit integer from a container. 1666 1667 1668 @param key: A B{C{GQuark}} key. I{(int)} 1669 @param value: Pointer to the 64bit integer to update. I{(int)} 1670 @return: B{C{True}} if B{C{v}} was actually updated, B{C{False}} when there is no 1671 such 64bit integer in the container. 1672 1673 """ 1674 return None
1675 - def set_double( key , value ):
1676 """ 1677 Stores a double into B{C{container}}, identified by B{C{key}}. 1678 1679 @param key: A B{C{GQuark}} key. I{(int)} 1680 @param value: A double. I{(float)} 1681 @return: 1682 """ 1683 return None
1684 - def get_double( key ):
1685 """ 1686 Returns the double in B{C{container}} identified by B{C{key}}. 1687 1688 1689 @param key: A B{C{GQuark}} key. I{(int)} 1690 @return: The double as B{C{gdouble}}. 1691 1692 """ 1693 return None
1694 - def UNIMPLEMENTED_gis_double( key , value ):
1695 """ 1696 Get-if-set a double from a container. 1697 1698 1699 @param key: A B{C{GQuark}} key. I{(int)} 1700 @param value: Pointer to the double to update. I{(float)} 1701 @return: B{C{True}} if B{C{v}} was actually updated, B{C{False}} when there is no 1702 such double in the container. 1703 1704 """ 1705 return None
1706 - def set_string( key , value ):
1707 """ 1708 Set string for key to given value 1709 1710 1711 @param value: new string I{(string)} 1712 @return: 1713 """ 1714 return None
1715 - def set_const_string( key , value ):
1716 """ 1717 Stores a string into B{C{container}}, identified by B{C{key}}. 1718 1719 The container makes a copy of the string, so it can be used on static 1720 strings. 1721 1722 Since: 2.38 1723 1724 @param key: A B{C{GQuark}} key. I{(int)} 1725 @param value: A nul-terminated string. I{(string)} 1726 @return: 1727 """ 1728 return None
1729 - def get_string( key ):
1730 """ 1731 Returns the string in B{C{container}} identified by B{C{key}}. 1732 1733 The returned string must be treated as constant and never freed or modified. 1734 1735 1736 @param key: A B{C{GQuark}} key. I{(int)} 1737 @return: The string. 1738 1739 """ 1740 return None
1741 - def UNIMPLEMENTED_gis_string( key , value ):
1742 """ 1743 Get-if-set a string from a container. 1744 1745 The string eventually stored in B{C{value}} must be treated as constant and 1746 never freed or modified. 1747 1748 1749 @param key: A B{C{GQuark}} key. I{(int)} 1750 @param value: Pointer to the string pointer to update. I{(const-guchar**)} 1751 @return: B{C{True}} if B{C{v}} was actually updated, B{C{False}} when there is no 1752 such string in the container. 1753 1754 """ 1755 return None
1756 - def set_object( key , value ):
1757 """ 1758 Stores an object into B{C{container}}, identified by B{C{key}}. 1759 1760 The container claims ownership on the object, i.e. its reference count is 1761 incremented. 1762 1763 The object must implement B{C{Serializable}} interface to allow serialization 1764 of the container. 1765 1766 @param key: A B{C{GQuark}} key. I{(int)} 1767 @param value: An object to store into container. I{(gpointer)} 1768 @return: 1769 """ 1770 return None
1771 - def get_object( key ):
1772 """ 1773 Get object of given key from container. 1774 1775 1776 @return: object of given key 1777 1778 """ 1779 return None
1780 - def gis_object( key , value ):
1781 """ 1782 Get-if-set an object from a container. 1783 1784 The object eventually stored in B{C{value}} doesn't have its reference count 1785 increased, use g_object_ref() if you want to access it even when 1786 B{C{container}} may cease to exist. 1787 1788 1789 @param key: A B{C{GQuark}} key. I{(int)} 1790 @param value: Pointer to the object pointer to update. I{(gpointer)} 1791 @return: B{C{True}} if B{C{v}} was actually updated, B{C{False}} when there is no 1792 such object in the container. 1793 1794 """ 1795 return None
1797 """ 1798 Creates a text representation of B{C{container}} contents. 1799 1800 Note only simple data types are supported as serialization of compound 1801 objects is not controllable. 1802 1803 1804 @return: A pointer array, each item containing string with one container 1805 item representation (name, type, value). The array is sorted by name. 1806 1807 """ 1808 return None
1809 - def contains_by_name( name ):
1810 """ 1811 Expands to B{C{True}} if container B{C{c}} contains a value identified by name B{C{n}}. 1812 1813 @param n: A nul-terminated name (id). 1814 @return: 1815 """ 1816 return None
1817 - def remove_by_name( name ):
1818 """ 1819 Removes a value identified by name B{C{n}} from container B{C{c}}. 1820 1821 Expands to B{C{True}} if there was such a value and was removed. 1822 1823 @param n: A nul-terminated name (id). 1824 @return: 1825 """ 1826 return None
1827 - def rename_by_name( name , new_name , delete ):
1828 """ 1829 Makes a value in container B{C{c}} identified by name B{C{n}} to be identified by 1830 new name B{C{nn}}. 1831 1832 See L{Container.rename}() for details. 1833 1834 @param n: A nul-terminated name (id). 1835 @param nn: A nul-terminated name (id). 1836 @param f: Whether to delete existing value at B{C{newkey}}. 1837 @return: 1838 """ 1839 return None
1840 - def set_boolean_by_name( name , value ):
1841 """ 1842 Stores a boolean into container B{C{c}}, identified by name B{C{n}}. 1843 1844 @param n: A nul-terminated name (id). 1845 @param v: A boolean. 1846 @return: 1847 """ 1848 return None
1849 - def set_double_by_name( name , value ):
1850 """ 1851 Stores a double into container B{C{c}}, identified by name B{C{n}}. 1852 1853 @param n: A nul-terminated name (id). 1854 @param v: A double integer. 1855 @return: 1856 """ 1857 return None
1858 - def set_enum_by_name( name , value ):
1859 """ 1860 Stores an enum into container B{C{c}}, identified by name B{C{n}}. 1861 1862 Note enums are treated as 32bit integers. 1863 1864 @param n: A nul-terminated name (id). 1865 @param v: An enum. 1866 @return: 1867 """ 1868 return None
1869 - def set_int32_by_name( name , value ):
1870 """ 1871 Stores a 32bit integer into container B{C{c}}, identified by name B{C{n}}. 1872 1873 @param n: A nul-terminated name (id). 1874 @param v: A 32bit integer. 1875 @return: 1876 """ 1877 return None
1878 - def set_int64_by_name( name , value ):
1879 """ 1880 Stores a 64bit integer into container B{C{c}}, identified by name B{C{n}}. 1881 1882 @param n: A nul-terminated name (id). 1883 @param v: A 64bit integer. 1884 @return: 1885 """ 1886 return None
1887 - def set_object_by_name( name , value ):
1888 """ 1889 Stores an object into container B{C{c}}, identified by name B{C{n}}. 1890 1891 See L{Container.set_object}() for details. 1892 1893 @param n: A nul-terminated name (id). 1894 @param v: An object to store into container. 1895 @return: 1896 """ 1897 return None
1898 - def set_uchar_by_name( name , value ):
1899 """ 1900 Stores an unsigned character into container B{C{c}}, identified by name B{C{n}}. 1901 1902 @param n: A nul-terminated name (id). 1903 @param v: An unsigned character. 1904 @return: 1905 """ 1906 return None
1907 - def set_string_by_name( name , value ):
1908 """ 1909 Stores a string into container B{C{c}}, identified by name B{C{n}}. 1910 1911 The container takes ownership of the string, so it can't be used on 1912 static strings, use g_strdup() to duplicate them first. 1913 1914 @param n: A nul-terminated name (id). 1915 @param v: A nul-terminated string. 1916 @return: 1917 """ 1918 return None
1919 - def get_boolean_by_name( name ):
1920 """ 1921 Gets the boolean in container B{C{c}} identified by name B{C{n}}. 1922 1923 @param n: A nul-terminated name (id). 1924 @return: 1925 """ 1926 return None
1927 - def get_double_by_name( name ):
1928 """ 1929 Gets the double in container B{C{c}} identified by name B{C{n}}. 1930 1931 @param n: A nul-terminated name (id). 1932 @return: 1933 """ 1934 return None
1935 - def get_enum_by_name( name ):
1936 """ 1937 Gets the enum in container B{C{c}} identified by name B{C{n}}. 1938 1939 Note enums are treated as 32bit integers. 1940 1941 @param n: A nul-terminated name (id). 1942 @return: 1943 """ 1944 return None
1945 - def get_int32_by_name( name ):
1946 """ 1947 Gets the 32bit integer in container B{C{c}} identified by name B{C{n}}. 1948 1949 @param n: A nul-terminated name (id). 1950 @return: 1951 """ 1952 return None
1953 - def get_int64_by_name( name ):
1954 """ 1955 Gets the 64bit integer in container B{C{c}} identified by name B{C{n}}. 1956 1957 @param n: A nul-terminated name (id). 1958 @return: 1959 """ 1960 return None
1961 - def get_object_by_name( name ):
1962 """ 1963 Gets the object in container B{C{c}} identified by name B{C{n}}. 1964 1965 The returned object doesn't have its reference count increased, use 1966 g_object_ref() if you want to access it even when B{C{container}} may cease 1967 to exist. 1968 1969 @param n: A nul-terminated name (id). 1970 @return: 1971 """ 1972 return None
1973 - def get_uchar_by_name( name ):
1974 """ 1975 Gets the unsigned character in container B{C{c}} identified by name B{C{n}}. 1976 1977 @param n: A nul-terminated name (id). 1978 @return: 1979 """ 1980 return None
1981 - def get_value_by_name( name ):
1982 """ 1983 Gets the value in container B{C{c}} identified by name B{C{n}}. 1984 1985 @param n: A nul-terminated name (id). 1986 @return: 1987 """ 1988 return None
1989 - def get_string_by_name( name ):
1990 """ 1991 Gets the string in container B{C{c}} identified by name B{C{n}}. 1992 1993 The returned string must be treated as constant and never freed or modified. 1994 1995 @param n: A nul-terminated name (id). 1996 @return: 1997 """ 1998 return None
1999 - def get_object( key ):
2000 """ 2001 Get object of given key from container. 2002 2003 2004 @return: object of given key 2005 2006 """ 2007 return None
2008 - def set_string( key , value ):
2009 """ 2010 Set string for key to given value 2011 2012 2013 @param value: new string I{(some_type)} 2014 @return: 2015 """ 2016 return None
2017 -class Curve:
2018 - def __init__( ):
2019 """ 2020 Creates B{C{Curve}} widget. By default, the widget will have 3 curves. 2021 2022 2023 @return: new B{C{Curve}} widget. 2024 2025 """ 2026 return None
2027 - def reset( ):
2028 """ 2029 Removes all control points, resetting the curves to their initial state. 2030 2031 2032 @return: 2033 """ 2034 return None
2035 - def set_range( min_x , max_x , min_y , max_y ):
2036 return None
2037 - def set_curve_type( type ):
2038 return None
2039 - def set_channels( num_channels , colors ):
2040 return None
2041 - def UNIMPLEMENTED_set_control_points( channel_data , prune ):
2042 return None
2043 - def UNIMPLEMENTED_get_control_points( channel_data , triplets ):
2044 return None
2045 -class DataField:
2046 - def __init__( xres , yres , xreal , yreal , nullme ):
2047 """ 2048 Creates a new data field. 2049 2050 2051 @param yres: Y-resolution, i.e., the number of rows. I{(int)} 2052 @param xreal: Real horizontal physical dimension. I{(float)} 2053 @param yreal: Real vertical physical dimension. I{(float)} 2054 @param nullme: Whether the data field should be initialized to zeroes. If B{C{False}}, 2055 the data will not be initialized. I{(bool)} 2056 @return: A newly created data field. 2057 2058 """ 2059 return None
2060 - def sum_fields( operand1 , operand2 ):
2061 """ 2062 Sums two data fields. 2063 2064 @param operand1: First data field operand. I{(L{DataField})} 2065 @param operand2: Second data field operand. I{(L{DataField})} 2066 @return: 2067 """ 2068 return None
2069 - def subtract_fields( operand1 , operand2 ):
2070 """ 2071 Subtracts one data field from another. 2072 2073 @param operand1: First data field operand. I{(L{DataField})} 2074 @param operand2: Second data field operand. I{(L{DataField})} 2075 @return: 2076 """ 2077 return None
2078 - def divide_fields( operand1 , operand2 ):
2079 """ 2080 Divides one data field with another. 2081 2082 @param operand1: First data field operand. I{(L{DataField})} 2083 @param operand2: Second data field operand. I{(L{DataField})} 2084 @return: 2085 """ 2086 return None
2087 - def multiply_fields( operand1 , operand2 ):
2088 """ 2089 Multiplies two data fields. 2090 2091 @param operand1: First data field operand. I{(L{DataField})} 2092 @param operand2: Second data field operand. I{(L{DataField})} 2093 @return: 2094 """ 2095 return None
2096 - def min_of_fields( operand1 , operand2 ):
2097 """ 2098 Finds point-wise maxima of two data fields. 2099 2100 @param operand1: First data field operand. I{(L{DataField})} 2101 @param operand2: Second data field operand. I{(L{DataField})} 2102 @return: 2103 """ 2104 return None
2105 - def max_of_fields( operand1 , operand2 ):
2106 """ 2107 Finds point-wise minima of two data fields. 2108 2109 @param operand1: First data field operand. I{(L{DataField})} 2110 @param operand2: Second data field operand. I{(L{DataField})} 2111 @return: 2112 """ 2113 return None
2114 - def hypot_of_fields( operand1 , operand2 ):
2115 """ 2116 Finds point-wise hypotenuse of two data fields. 2117 2118 Since: 2.31 2119 2120 @param operand1: First data field operand. I{(L{DataField})} 2121 @param operand2: Second data field operand. I{(L{DataField})} 2122 @return: 2123 """ 2124 return None
2125 - def check_compatibility( data_field2 , check ):
2126 """ 2127 Checks whether two data fields are compatible. 2128 2129 2130 @param data_field2: Another data field. I{(L{DataField})} 2131 @param check: The compatibility tests to perform. I{(DataCompatibilityFlags)} 2132 @return: Zero if all tested properties are compatible. Flags corresponding 2133 to failed tests if data fields are not compatible. 2134 2135 """ 2136 return None
2137 - def extend( left , right , up , down , exterior , fill_value , keep_offsets ):
2138 """ 2139 Creates a new data field by extending another data field using the specified 2140 method of exterior handling. 2141 2142 Since: 2.36 2143 2144 @param left: Number of pixels to extend to the left (towards lower column indices). I{(int)} 2145 @param right: Number of pixels to extend to the right (towards higher column 2146 indices). I{(int)} 2147 @param up: Number of pixels to extend up (towards lower row indices). I{(int)} 2148 @param down: Number of pixels to extend down (towards higher row indices). I{(int)} 2149 @param exterior: Exterior pixels handling. I{(ExteriorType)} 2150 @param fill_value: The value to use with B{C{EXTERIOR_FIXED_VALUE}} exterior. I{(float)} 2151 @param keep_offsets: B{C{True}} to set the X and Y offsets of the new field 2152 using B{C{field}} offsets. B{C{False}} to set offsets 2153 of the new field to zeroes. I{(bool)} 2154 @return: A newly created data field. 2155 2156 2157 """ 2158 return None
2159 - def correct_laplace_iteration( mask_field , buffer_field , corrfactor , error ):
2160 """ 2161 Performs one interation of Laplace data correction. 2162 2163 Tries to remove all the points in mask off the data by using 2164 iterative method similar to solving heat flux equation. 2165 2166 Use this function repeatedly until reasonable B{C{error}} is reached. 2167 2168 @param mask_field: Mask of places to be corrected. I{(L{DataField})} 2169 @param buffer_field: Initialized to same size as mask and data. I{(L{DataField})} 2170 @param error: Maximum change within last step. I{(float)} 2171 @param corrfactor: Correction factor within step. I{(float)} 2172 @return: 2173 """ 2174 return None
2175 - def correct_average( mask_field ):
2176 """ 2177 Fills data under mask with the average value. 2178 2179 This function simply puts average value of all the B{C{data_field}} values (both 2180 masked and unmasked) into points in B{C{data_field}} lying under points where 2181 B{C{mask_field}} values are nonzero. 2182 2183 In most cases you probably want to use 2184 L{DataField.correct_average_unmasked}() instead. 2185 2186 @param mask_field: Mask of places to be corrected. I{(L{DataField})} 2187 @return: 2188 """ 2189 return None
2190 - def correct_average_unmasked( mask_field ):
2191 """ 2192 Fills data under mask with the average value of unmasked data. 2193 2194 This function calculates the average value of all unmasked pixels in 2195 B{C{data_field}} and then fills all the masked pixels with this average value. 2196 It is useful as the first rough step of correction of data under the mask. 2197 2198 If all data are masked the field is filled with zeroes. 2199 2200 Since: 2.44 2201 2202 @param mask_field: Mask of places to be corrected. I{(L{DataField})} 2203 @return: 2204 """ 2205 return None
2206 - def mask_outliers( mask_field , thresh ):
2207 """ 2208 Creates mask of data that are above or below B{C{thresh}}*sigma from average 2209 height. 2210 2211 Sigma denotes root-mean square deviation of heights. This criterium 2212 corresponds to the usual Gaussian distribution outliers detection if 2213 B{C{thresh}} is 3. 2214 2215 @param mask_field: A data field to be filled with mask. I{(L{DataField})} 2216 @param thresh: Threshold value. I{(float)} 2217 @return: 2218 """ 2219 return None
2220 - def mask_outliers2( mask_field , thresh_low , thresh_high ):
2221 """ 2222 Creates mask of data that are above or below multiples of rms from average 2223 height. 2224 2225 Data that are below B{C{mean}}-B{C{thresh_low}}*B{C{sigma}} or above 2226 B{C{mean}}+B{C{thresh_high}}*B{C{sigma}} are marked as outliers, where B{C{sigma}} denotes the 2227 root-mean square deviation of heights. 2228 2229 Since: 2.26 2230 2231 @param mask_field: A data field to be filled with mask. I{(L{DataField})} 2232 @param thresh_low: Lower threshold value. I{(float)} 2233 @param thresh_high: Upper threshold value. I{(float)} 2234 @return: 2235 """ 2236 return None
2237 - def UNIMPLEMENTED_distort( dest , invtrans , user_data , interp , exterior , fill_value ):
2238 """ 2239 Distorts a data field in the horizontal plane. 2240 2241 Note the transform function B{C{invtrans}} is the inverse transform, in other 2242 words it calculates the old coordinates from the new coordinates (the 2243 transform would not be uniquely defined the other way round). 2244 2245 Since: 2.5 2246 2247 @param dest: Destination data field. I{(L{DataField})} 2248 @param invtrans: Inverse transform function, that is the transformation from 2249 new coordinates to old coordinates. It gets 2250 (B{C{j}}+0.5, B{C{i}}+0.5), where B{C{i}} and B{C{j}} are the new row and column 2251 indices, passed as the input coordinates. The output coordinates 2252 should follow the same convention. Unless a special exterior 2253 handling is required, the transform function does not need to 2254 concern itself with coordinates being outside of the data. I{(CoordTransform2DFunc)} 2255 @param user_data: Pointer passed as B{C{user_data}} to B{C{invtrans}}. I{(gpointer)} 2256 @param interp: Interpolation type to use. I{(InterpolationType)} 2257 @param exterior: Exterior pixels handling. I{(ExteriorType)} 2258 @param fill_value: The value to use with B{C{EXTERIOR_FIXED_VALUE}}. I{(float)} 2259 @return: 2260 """ 2261 return None
2262 - def UNIMPLEMENTED_sample_distorted( dest , coords , interp , exterior , fill_value ):
2263 """ 2264 Resamples a data field in an arbitrarily distorted manner. 2265 2266 Each item in B{C{coords}} corresponds to one pixel in B{C{dest}} and gives the 2267 coordinates in B{C{source}} defining the value to set in this pixel. 2268 2269 Since: 2.45 2270 2271 @param dest: Destination data field. I{(L{DataField})} 2272 @param coords: Array of B{C{source}} coordinates with the same number of items as 2273 B{C{dest}}, ordered as data field data. 2274 See L{DataField.distort}() for coordinate convention discussion. I{(const-XY*)} 2275 @param interp: Interpolation type to use. I{(InterpolationType)} 2276 @param exterior: Exterior pixels handling. I{(ExteriorType)} 2277 @param fill_value: The value to use with B{C{EXTERIOR_FIXED_VALUE}}. I{(float)} 2278 @return: 2279 """ 2280 return None
2281 - def affine( dest , invtrans , interp , exterior , fill_value ):
2282 """ 2283 Performs an affine transformation of a data field in the horizontal plane. 2284 2285 Note the transform B{C{invtrans}} is the inverse transform, in other 2286 words it calculates the old coordinates from the new coordinates. This 2287 way even degenerate (non-invertible) transforms can be meaningfully used. 2288 Also note that the (column, row) coordinate system is left-handed. 2289 2290 Since: 2.34 2291 2292 @param dest: Destination data field. I{(L{DataField})} 2293 @param invtrans: Inverse transform, that is the transformation from 2294 new pixel coordinates to old pixel coordinates, represented as 2295 (B{C{j}}+0.5, B{C{i}}+0.5), where B{C{i}} and B{C{j}} are the row and column 2296 indices. It is represented as a six-element array [B{C{axx}}, B{C{axy}}, 2297 B{C{ayx}}, B{C{ayy}}, B{C{bx}}, B{C{by}}] where B{C{axy}} is the coefficient from B{C{x}} to 2298 B{C{y}}. I{(const-gdouble*)} 2299 @param interp: Interpolation type to use. I{(InterpolationType)} 2300 @param exterior: Exterior pixels handling. I{(ExteriorType)} 2301 @param fill_value: The value to use with B{C{EXTERIOR_FIXED_VALUE}}. I{(float)} 2302 @return: 2303 """ 2304 return None
2305 - def mark_scars( result , threshold_high , threshold_low , min_scar_len , max_scar_width , negative ):
2306 """ 2307 Find and marks scars in a data field. 2308 2309 Scars are linear horizontal defects, consisting of shifted values. 2310 Zero or negative values in B{C{result}} siginify normal data, positive 2311 values siginify samples that are part of a scar. 2312 2313 Since: 2.46 2314 2315 @param result: A data field to store the result to (it is resized to match 2316 B{C{data_field}}). I{(L{DataField})} 2317 @param threshold_high: Miminum relative step for scar marking, must be positive. I{(float)} 2318 @param threshold_low: Definite relative step for scar marking, must be at least 2319 equal to B{C{threshold_high}}. I{(float)} 2320 @param min_scar_len: Minimum length of a scar, shorter ones are discarded 2321 (must be at least one). I{(float)} 2322 @param max_scar_width: Maximum width of a scar, must be at least one. I{(float)} 2323 @param negative: B{C{True}} to detect negative scars, B{C{False}} to positive. I{(bool)} 2324 @return: 2325 """ 2326 return None
2327 - def get_correlation_score( kernel_field , col , row , kernel_col , kernel_row , kernel_width , kernel_height ):
2328 """ 2329 Calculates a correlation score in one point. 2330 2331 Correlation window size is given 2332 by B{C{kernel_col}}, B{C{kernel_row}}, B{C{kernel_width}}, B{C{kernel_height}}, 2333 postion of the correlation window on data is given by 2334 B{C{col}}, B{C{row}}. 2335 2336 If anything fails (data too close to boundary, etc.), 2337 function returns -1.0 (none correlation).. 2338 2339 2340 @param kernel_field: Kernel to correlate data field with. I{(L{DataField})} 2341 @param col: Upper-left column position in the data field. I{(int)} 2342 @param row: Upper-left row position in the data field. I{(int)} 2343 @param kernel_col: Upper-left column position in kernel field. I{(int)} 2344 @param kernel_row: Upper-left row position in kernel field. I{(int)} 2345 @param kernel_width: Width of kernel field area. I{(int)} 2346 @param kernel_height: Heigh of kernel field area. I{(int)} 2347 @return: Correlation score (between -1.0 and 1.0). Value 1.0 denotes 2348 maximum correlation, -1.0 none correlation. 2349 2350 """ 2351 return None
2352 - def get_weighted_correlation_score( kernel_field , weight_field , col , row , kernel_col , kernel_row , kernel_width , kernel_height ):
2353 """ 2354 Calculates a correlation score in one point using weights to center 2355 the used information to the center of kernel. 2356 2357 Correlation window size is given 2358 by B{C{kernel_col}}, B{C{kernel_row}}, B{C{kernel_width}}, B{C{kernel_height}}, 2359 postion of the correlation window on data is given by 2360 B{C{col}}, B{C{row}}. 2361 2362 If anything fails (data too close to boundary, etc.), 2363 function returns -1.0 (none correlation).. 2364 2365 2366 @param kernel_field: Kernel to correlate data field with. I{(L{DataField})} 2367 @param weight_field: data field of same size as kernel window size I{(L{DataField})} 2368 @param col: Upper-left column position in the data field. I{(int)} 2369 @param row: Upper-left row position in the data field. I{(int)} 2370 @param kernel_col: Upper-left column position in kernel field. I{(int)} 2371 @param kernel_row: Upper-left row position in kernel field. I{(int)} 2372 @param kernel_width: Width of kernel field area. I{(int)} 2373 @param kernel_height: Heigh of kernel field area. I{(int)} 2374 @return: Correlation score (between -1.0 and 1.0). Value 1.0 denotes 2375 maximum correlation, -1.0 none correlation. 2376 2377 """ 2378 return None
2379 - def crosscorrelate( data_field2 , x_dist , y_dist , score , search_width , search_height , window_width , window_height ):
2380 """ 2381 Algorithm for matching two different images of the same object under changes. 2382 2383 It does not use any special features 2384 for matching. It simply searches for all points (with their neighbourhood) 2385 of B{C{data_field1}} within B{C{data_field2}}. Parameters B{C{search_width}} and 2386 B{C{search_height}} 2387 determine maimum area where to search for points. The area is cenetered 2388 in the B{C{data_field2}} at former position of points at B{C{data_field1}}. 2389 2390 @param data_field2: A data field. I{(L{DataField})} 2391 @param x_dist: A data field to store x-distances to. I{(L{DataField})} 2392 @param y_dist: A data field to store y-distances to. I{(L{DataField})} 2393 @param score: Data field to store correlation scores to. I{(L{DataField})} 2394 @param search_width: Search area width. I{(int)} 2395 @param search_height: Search area height. I{(int)} 2396 @param window_width: Correlation window width. This parameter is not actually 2397 used. Pass zero. I{(int)} 2398 @param window_height: Correlation window height. This parameter is not actually 2399 used. Pass zero. I{(int)} 2400 @return: 2401 """ 2402 return None
2403 - def UNIMPLEMENTED_crosscorrelate_init( data_field2 , x_dist , y_dist , score , search_width , search_height , window_width , window_height ):
2404 """ 2405 Initializes a cross-correlation iterator. 2406 2407 This iterator reports its state as B{C{ComputationStateType}}. 2408 2409 2410 @param data_field2: A data field. I{(L{DataField})} 2411 @param x_dist: A data field to store x-distances to, or B{C{NULL}}. I{(L{DataField})} 2412 @param y_dist: A data field to store y-distances to, or B{C{NULL}}. I{(L{DataField})} 2413 @param score: Data field to store correlation scores to, or B{C{NULL}}. I{(L{DataField})} 2414 @param search_width: Search area width. I{(int)} 2415 @param search_height: Search area height. I{(int)} 2416 @param window_width: Correlation window width. I{(int)} 2417 @param window_height: Correlation window height. I{(int)} 2418 @return: A new cross-correlation iterator. 2419 2420 """ 2421 return None
2422 - def correlate( kernel_field , score , method ):
2423 """ 2424 Computes correlation score for all positions in a data field. 2425 2426 Correlation score is compute for all points in data field B{C{data_field}} 2427 and full size of correlation kernel B{C{kernel_field}}. 2428 2429 The points in B{C{score}} correspond to centers of kernel. More precisely, the 2430 point ((B{C{kxres}}-1)/2, (B{C{kyres}}-1)/2) in B{C{score}} corresponds to kernel field 2431 top left corner coincident with data field top left corner. Points outside 2432 the area where the kernel field fits into the data field completely are 2433 set to -1 for B{C{CORRELATION_NORMAL}}. 2434 2435 @param kernel_field: Correlation kernel. I{(L{DataField})} 2436 @param score: Data field to store correlation scores to. I{(L{DataField})} 2437 @param method: Correlation score calculation method. I{(CorrelationType)} 2438 @return: 2439 """ 2440 return None
2441 - def UNIMPLEMENTED_correlate_init( kernel_field , score ):
2442 """ 2443 Creates a new correlation iterator. 2444 2445 This iterator reports its state as B{C{ComputationStateType}}. 2446 2447 2448 @param kernel_field: Kernel to correlate data field with. I{(L{DataField})} 2449 @param score: Data field to store correlation scores to. I{(L{DataField})} 2450 @return: A new correlation iterator. 2451 2452 """ 2453 return None
2454 - def invalidate( ):
2455 """ 2456 Invalidates cached data field stats. 2457 2458 User code should rarely need this macro, as all B{C{DataField}} methods do 2459 proper invalidation when they change data, as well as 2460 L{DataField.get_data}() does. 2461 2462 However, if you get raw data with L{DataField.get_data}() and then mix 2463 direct changes to it with calls to methods like L{DataField.get_max}(), 2464 you may need to explicitely invalidate cached values to let 2465 L{DataField.get_max}() know it has to recompute the maximum. 2466 2467 @return: 2468 """ 2469 return None
2470 - def new_alike( nullme ):
2471 """ 2472 Creates a new data field similar to an existing one. 2473 2474 Use L{DataField.duplicate}() if you want to copy a data field including 2475 data. 2476 2477 2478 @param nullme: Whether the data field should be initialized to zeroes. If B{C{False}}, 2479 the data will not be initialized. I{(bool)} 2480 @return: A newly created data field. 2481 2482 """ 2483 return None
2484 - def data_changed( ):
2485 """ 2486 Emits signal "data-changed" on a data field. 2487 2488 @return: 2489 """ 2490 return None
2491 - def new_resampled( xres , yres , interpolation ):
2492 """ 2493 Creates a new data field by resampling an existing one. 2494 2495 This method is equivalent to L{DataField.duplicate}() followed by 2496 L{DataField.resample}(), but it is more efficient. 2497 2498 2499 @param xres: Desired X resolution. I{(int)} 2500 @param yres: Desired Y resolution. I{(int)} 2501 @param interpolation: Interpolation method to use. I{(InterpolationType)} 2502 @return: A newly created data field. 2503 2504 """ 2505 return None
2506 - def resample( xres , yres , interpolation ):
2507 """ 2508 Resamples a data field using given interpolation method 2509 2510 This method may invalidate raw data buffer returned by 2511 L{DataField.get_data}(). 2512 2513 @param xres: Desired X resolution. I{(int)} 2514 @param yres: Desired Y resolution. I{(int)} 2515 @param interpolation: Interpolation method to use. I{(InterpolationType)} 2516 @return: 2517 """ 2518 return None
2519 - def resize( ulcol , ulrow , brcol , brrow ):
2520 """ 2521 Resizes (crops) a data field. 2522 2523 Crops a data field to a rectangle between upper-left and bottom-right 2524 points, recomputing real size. 2525 2526 This method may invalidate raw data buffer returned by 2527 L{DataField.get_data}(). 2528 2529 @param ulcol: Upper-left column coordinate. I{(int)} 2530 @param ulrow: Upper-left row coordinate. I{(int)} 2531 @param brcol: Bottom-right column coordinate + 1. I{(int)} 2532 @param brrow: Bottom-right row coordinate + 1. I{(int)} 2533 @return: 2534 """ 2535 return None
2536 - def area_extract( col , row , width , height ):
2537 """ 2538 Extracts a rectangular part of a data field to a new data field. 2539 2540 2541 @param row: Upper-left row coordinate. I{(int)} 2542 @param col: Upper-left column coordinate. I{(int)} 2543 @param width: Area width (number of columns). I{(int)} 2544 @param height: Area height (number of rows). I{(int)} 2545 @return: The extracted area as a newly created data field. 2546 2547 """ 2548 return None
2549 - def copy( dest , nondata_too ):
2550 """ 2551 Copies the contents of an already allocated data field to a data field 2552 of the same size. 2553 2554 @param dest: Destination data field. I{(L{DataField})} 2555 @param nondata_too: Whether non-data (units) should be copied too. I{(bool)} 2556 @return: 2557 """ 2558 return None
2559 - def area_copy( dest , col , row , width , height , destcol , destrow ):
2560 """ 2561 Copies a rectangular area from one data field to another. 2562 2563 The area starts at (B{C{col}}, B{C{row}}) in B{C{src}} and its dimension is B{C{width}}*B{C{height}}. 2564 It is copied to B{C{dest}} starting from (B{C{destcol}}, B{C{destrow}}). 2565 2566 The source area has to be completely contained in B{C{src}}. No assumptions are 2567 made about destination position, however, parts of the source area sticking 2568 out the destination data field B{C{dest}} are cut off. 2569 2570 If B{C{src}} is equal to B{C{dest}}, the areas may not overlap. 2571 2572 @param dest: Destination data field. I{(L{DataField})} 2573 @param col: Area upper-left column coordinate in B{C{src}}. I{(int)} 2574 @param row: Area upper-left row coordinate B{C{src}}. I{(int)} 2575 @param width: Area width (number of columns), pass -1 for full B{C{src}} widdth. I{(int)} 2576 @param height: Area height (number of rows), pass -1 for full B{C{src}} height. I{(int)} 2577 @param destcol: Destination column in B{C{dest}}. I{(int)} 2578 @param destrow: Destination row in B{C{dest}}. I{(int)} 2579 @return: 2580 """ 2581 return None
2582 - def get_data( ):
2583 """ 2584 Create a tuple of data which the datafield contains. Content of the tuple is NOT reference to original datafield but its copy. 2585 2586 2587 @return: tuple of raw numeric data from DataField 2588 2589 """ 2590 return None
2591 - def get_xres( ):
2592 """ 2593 Gets X resolution (number of columns) of a data field. 2594 2595 2596 @return: X resolution. 2597 2598 """ 2599 return None
2600 - def get_yres( ):
2601 """ 2602 Gets Y resolution (number of rows) of the field. 2603 2604 2605 @return: Y resolution. 2606 2607 """ 2608 return None
2609 - def get_xreal( ):
2610 """ 2611 Gets the X real (physical) size of a data field. 2612 2613 2614 @return: X real size value. 2615 2616 """ 2617 return None
2618 - def get_yreal( ):
2619 """ 2620 Gets the Y real (physical) size of a data field. 2621 2622 2623 @return: Y real size value. 2624 2625 """ 2626 return None
2627 - def set_xreal( xreal ):
2628 """ 2629 Sets X real (physical) size value of a data field. 2630 2631 @param xreal: New X real size value. I{(float)} 2632 @return: 2633 """ 2634 return None
2635 - def set_yreal( yreal ):
2636 """ 2637 Sets Y real (physical) size value of a data field. 2638 2639 @param yreal: New Y real size value. I{(float)} 2640 @return: 2641 """ 2642 return None
2643 - def get_xoffset( ):
2644 """ 2645 Gets the X offset of data field origin. 2646 2647 2648 @return: X offset value. 2649 2650 """ 2651 return None
2652 - def get_yoffset( ):
2653 """ 2654 Gets the Y offset of data field origin. 2655 2656 2657 @return: Y offset value. 2658 2659 """ 2660 return None
2661 - def set_xoffset( xoff ):
2662 """ 2663 Sets the X offset of a data field origin. 2664 2665 Note offsets don't affect any calculation, nor functions like 2666 L{DataField.rtoj}(). 2667 2668 @param xoff: New X offset value. I{(float)} 2669 @return: 2670 """ 2671 return None
2672 - def set_yoffset( yoff ):
2673 """ 2674 Sets the Y offset of a data field origin. 2675 2676 Note offsets don't affect any calculation, nor functions like 2677 L{DataField.rtoi}(). 2678 2679 @param yoff: New Y offset value. I{(float)} 2680 @return: 2681 """ 2682 return None
2683 - def get_si_unit_xy( ):
2684 """ 2685 Returns lateral SI unit of a data field. 2686 2687 2688 @return: SI unit corresponding to the lateral (XY) dimensions of the data 2689 field. Its reference count is not incremented. 2690 2691 """ 2692 return None
2693 - def get_si_unit_z( ):
2694 """ 2695 Returns value SI unit of a data field. 2696 2697 2698 @return: SI unit corresponding to the "height" (Z) dimension of the data 2699 field. Its reference count is not incremented. 2700 2701 """ 2702 return None
2703 - def set_si_unit_xy( si_unit ):
2704 """ 2705 Sets the SI unit corresponding to the lateral (XY) dimensions of a data 2706 field. 2707 2708 It does not assume a reference on B{C{si_unit}}, instead it adds its own 2709 reference. 2710 2711 @param si_unit: SI unit to be set. I{(L{SIUnit})} 2712 @return: 2713 """ 2714 return None
2715 - def set_si_unit_z( si_unit ):
2716 """ 2717 Sets the SI unit corresponding to the "height" (Z) dimension of a data 2718 field. 2719 2720 It does not assume a reference on B{C{si_unit}}, instead it adds its own 2721 reference. 2722 2723 @param si_unit: SI unit to be set. I{(L{SIUnit})} 2724 @return: 2725 """ 2726 return None
2727 - def UNIMPLEMENTED_get_value_format_xy( style , format ):
2728 """ 2729 Finds value format good for displaying coordinates of a data field. 2730 2731 2732 @param style: Unit format style. I{(SIUnitFormatStyle)} 2733 @param format: A SI value format to modify, or B{C{NULL}} to allocate a new one. I{(SIValueFormat*)} 2734 @return: The value format. If B{C{format}} is B{C{NULL}}, a newly allocated format 2735 is returned, otherwise (modified) B{C{format}} itself is returned. 2736 2737 """ 2738 return None
2739 - def UNIMPLEMENTED_get_value_format_z( style , format ):
2740 """ 2741 Finds value format good for displaying values of a data field. 2742 2743 2744 @param style: Unit format style. I{(SIUnitFormatStyle)} 2745 @param format: A SI value format to modify, or B{C{NULL}} to allocate a new one. I{(SIValueFormat*)} 2746 @return: The value format. If B{C{format}} is B{C{NULL}}, a newly allocated format 2747 is returned, otherwise (modified) B{C{format}} itself is returned. 2748 2749 """ 2750 return None
2751 - def copy_units_to_data_line( data_line ):
2752 """ 2753 Sets lateral and value units of a data line to match a data field. 2754 2755 @param data_line: A data line to set units of. I{(L{DataLine})} 2756 @return: 2757 """ 2758 return None
2759 - def itor( row ):
2760 """ 2761 Transforms vertical pixel coordinate to real (physical) Y coordinate. 2762 2763 That is it maps range [0..y-resolution] to range [0..real-y-size]. 2764 It is not suitable for conversion of matrix indices to physical coordinates, 2765 you have to use L{DataField.itor}(B{C{data_field}}, B{C{row}} + 0.5) for that. 2766 2767 2768 @param row: Vertical pixel coordinate. I{(float)} 2769 @return: Real Y coordinate. 2770 2771 """ 2772 return None
2773 - def jtor( col ):
2774 """ 2775 Transforms horizontal pixel coordinate to real (physical) X coordinate. 2776 2777 That is it maps range [0..x-resolution] to range [0..real-x-size]. 2778 It is not suitable for conversion of matrix indices to physical coordinates, 2779 you have to use L{DataField.jtor}(B{C{data_field}}, B{C{col}} + 0.5) for that. 2780 2781 2782 @param col: Horizontal pixel coordinate. I{(float)} 2783 @return: Real X coordinate. 2784 2785 """ 2786 return None
2787 - def rtoi( realy ):
2788 """ 2789 Transforms real (physical) Y coordinate to row. 2790 2791 That is it maps range [0..real-y-size] to range [0..y-resolution]. 2792 2793 2794 @param realy: Real (physical) Y coordinate. I{(float)} 2795 @return: Vertical pixel coodinate. 2796 2797 """ 2798 return None
2799 - def rtoj( realx ):
2800 """ 2801 Transforms real (physical) X coordinate to column. 2802 2803 That is it maps range [0..real-x-size] to range [0..x-resolution]. 2804 2805 2806 @param realx: Real (physical) X coodinate. I{(float)} 2807 @return: Horizontal pixel coordinate. 2808 2809 """ 2810 return None
2811 - def get_val( col , row ):
2812 """ 2813 Gets value at given position in a data field. 2814 2815 Do not access data with this function inside inner loops, it's slow. 2816 Get the raw data buffer with L{DataField.get_data_const}() and access it 2817 directly instead. 2818 2819 2820 @param col: Column index. I{(int)} 2821 @param row: Row index. I{(int)} 2822 @return: Value at (B{C{col}}, B{C{row}}). 2823 2824 """ 2825 return None
2826 - def set_val( col , row , value ):
2827 """ 2828 Sets value at given position in a data field. 2829 2830 Do not set data with this function inside inner loops, it's slow. Get the 2831 raw data buffer with L{DataField.get_data}() and write to it directly 2832 instead. 2833 2834 @param col: Column index. I{(int)} 2835 @param row: Row index. I{(int)} 2836 @param value: Value to set. I{(float)} 2837 @return: 2838 """ 2839 return None
2840 - def get_dval( x , y , interpolation ):
2841 """ 2842 Gets interpolated value at arbitrary data field point indexed by pixel 2843 coordinates. 2844 2845 Note pixel values are centered in pixels, so to get the same 2846 value as L{DataField.get_val}(B{C{data_field}}, B{C{j}}, B{C{i}}) returns, 2847 it's necessary to add 0.5: 2848 L{DataField.get_dval}(B{C{data_field}}, B{C{j}}+0.5, B{C{i}}+0.5, B{C{interpolation}}). 2849 2850 See also L{DataField.get_dval_real}() that does the same, but takes 2851 real coordinates. 2852 2853 2854 @param x: Horizontal position in pixel units, in range [0, x-resolution]. I{(float)} 2855 @param y: Vertical postition in pixel units, in range [0, y-resolution]. I{(float)} 2856 @param interpolation: Interpolation method to be used. I{(InterpolationType)} 2857 @return: Interpolated value at position (B{C{x}},B{C{y}}). 2858 2859 """ 2860 return None
2861 - def get_dval_real( x , y , interpolation ):
2862 """ 2863 Gets interpolated value at arbitrary data field point indexed by real 2864 coordinates. 2865 2866 See also L{DataField.get_dval}() that does the same, but takes pixel 2867 coordinates. 2868 2869 2870 @param x: X postion in real coordinates. I{(float)} 2871 @param y: Y postition in real coordinates. I{(float)} 2872 @param interpolation: Interpolation method to use. I{(InterpolationType)} 2873 @return: Value at position (B{C{x}},B{C{y}}). 2874 2875 """ 2876 return None
2877 - def rotate( angle , interpolation ):
2878 """ 2879 Rotates a data field by a given angle. 2880 2881 This function is mostly obsolete. See L{DataField.new_rotated}() 2882 and L{DataField.rotated_90}(). 2883 2884 Values that get outside of data field by the rotation are lost. 2885 Undefined values from outside of data field that get inside are set to 2886 data field minimum value. 2887 2888 The rotation is performed in pixel space, i.e. it can be in fact a more 2889 general affine transform in the real coordinates when pixels are not square. 2890 2891 @param angle: Rotation angle (in radians). I{(float)} 2892 @param interpolation: Interpolation method to use. I{(InterpolationType)} 2893 @return: 2894 """ 2895 return None
2896 - def new_rotated( exterior_mask , angle , interp , resize ):
2897 """ 2898 Creates a new data field by rotating a data field by an atribtrary angle. 2899 2900 The returned data field can have pixel corresponding to exterior in B{C{dfield}} 2901 (unless B{C{resize}} is B{C{ROTATE_RESIZE_CUT}}). They are filled with a neutral 2902 value; pass B{C{exterior_mask}} and replace them as you wish if you need more 2903 control. 2904 2905 The rotation is performed in real space, i.e. it is a more general affine 2906 transform in the pixel space for data field with non-square pixels. 2907 See L{DataField.rotate}() which rotates in the pixel space. 2908 2909 The returned data field has usually square pixels, the exception being when 2910 B{C{angle}} is a multiple of B{C{G_PI}}/2 when the function reduces to 2911 L{DataField.rotated_90}() and original pixels are preserved. This is of 2912 concern only when B{C{dfield}} has non-square pixels. 2913 2914 Since: 2.46 2915 2916 @param exterior_mask: Optional data field where pixels corresponding to exterior 2917 will be set to 1. It will be resized to match the returned 2918 field. I{(L{DataField})} 2919 @param angle: Rotation angle (in radians). I{(float)} 2920 @param interp: Interpolation type to use. I{(InterpolationType)} 2921 @param resize: Controls how the result size is determined. I{(RotateResizeType)} 2922 @return: A newly created data field. 2923 2924 2925 """ 2926 return None
2927 - def new_rotated_90( clockwise ):
2928 """ 2929 Creates a new data field by rotating a data field by 90 degrees. 2930 2931 Since: 2.46 2932 2933 @param clockwise: B{C{True}} to rotate clocwise, B{C{False}} to rotate anti-clockwise. I{(bool)} 2934 @return: A newly created data field. 2935 2936 2937 """ 2938 return None
2939 - def invert( x , y , z ):
2940 """ 2941 Reflects amd/or inverts a data field. 2942 2943 In the case of value reflection, it's inverted about the mean value. 2944 2945 @param x: B{C{True}} to reflect about X axis (i.e., vertically). I{(bool)} 2946 @param y: B{C{True}} to reflect about Y axis (i.e., horizontally). I{(bool)} 2947 @param z: B{C{True}} to invert in Z direction (i.e., invert values). I{(bool)} 2948 @return: 2949 """ 2950 return None
2951 - def fill( value ):
2952 """ 2953 Fills a data field with given value. 2954 2955 @param value: Value to be entered. I{(float)} 2956 @return: 2957 """ 2958 return None
2959 - def clear( ):
2960 """ 2961 Fills a data field with zeroes. 2962 2963 @return: 2964 """ 2965 return None
2966 - def multiply( value ):
2967 """ 2968 Multiplies all values in a data field by given value. 2969 2970 @param value: Value to multiply B{C{data_field}} with. I{(float)} 2971 @return: 2972 """ 2973 return None
2974 - def add( value ):
2975 """ 2976 Adds given value to all values in a data field. 2977 2978 @param value: Value to be added to data field values. I{(float)} 2979 @return: 2980 """ 2981 return None
2982 - def area_fill( col , row , width , height , value ):
2983 """ 2984 Fills a rectangular part of a data field with given value. 2985 2986 @param col: Upper-left column coordinate. I{(int)} 2987 @param row: Upper-left row coordinate. I{(int)} 2988 @param width: Area width (number of columns). I{(int)} 2989 @param height: Area height (number of rows). I{(int)} 2990 @param value: Value to be entered I{(float)} 2991 @return: 2992 """ 2993 return None
2994 - def area_fill_mask( mask , mode , col , row , width , height , value ):
2995 """ 2996 Fills a masked rectangular part of a data field with given value. 2997 2998 Since: 2.44 2999 3000 @param mask: Mask specifying which values to take into account/exclude, or B{C{NULL}}. I{(L{DataField})} 3001 @param mode: Masking mode to use. See the introduction for description of 3002 masking modes. I{(MaskingType)} 3003 @param col: Upper-left column coordinate. I{(int)} 3004 @param row: Upper-left row coordinate. I{(int)} 3005 @param width: Area width (number of columns). I{(int)} 3006 @param height: Area height (number of rows). I{(int)} 3007 @param value: Value to be entered I{(float)} 3008 @return: 3009 """ 3010 return None
3011 - def area_clear( col , row , width , height ):
3012 """ 3013 Fills a rectangular part of a data field with zeroes. 3014 3015 @param col: Upper-left column coordinate. I{(int)} 3016 @param row: Upper-left row coordinate. I{(int)} 3017 @param width: Area width (number of columns). I{(int)} 3018 @param height: Area height (number of rows). I{(int)} 3019 @return: 3020 """ 3021 return None
3022 - def area_multiply( col , row , width , height , value ):
3023 """ 3024 Multiplies values in a rectangular part of a data field by given value 3025 3026 @param col: Upper-left column coordinate. I{(int)} 3027 @param row: Upper-left row coordinate. I{(int)} 3028 @param width: Area width (number of columns). I{(int)} 3029 @param height: Area height (number of rows). I{(int)} 3030 @param value: Value to multiply area with. I{(float)} 3031 @return: 3032 """ 3033 return None
3034 - def area_add( col , row , width , height , value ):
3035 """ 3036 Adds given value to all values in a rectangular part of a data field. 3037 3038 @param col: Upper-left column coordinate. I{(int)} 3039 @param row: Upper-left row coordinate. I{(int)} 3040 @param width: Area width (number of columns). I{(int)} 3041 @param height: Area height (number of rows). I{(int)} 3042 @param value: Value to be added to area values. I{(float)} 3043 @return: 3044 """ 3045 return None
3046 - def get_profile( data_line , scol , srow , ecol , erow , res , thickness , interpolation ):
3047 """ 3048 Extracts a possibly averaged profile from data field to a data line. 3049 3050 3051 @param data_line: A data line. It will be resized to B{C{res}} samples. It is 3052 possible to pass B{C{NULL}} to instantiate and return a new 3053 B{C{DataLine}}. I{(L{DataLine})} 3054 @param scol: The column the line starts at (inclusive). I{(int)} 3055 @param srow: The row the line starts at (inclusive). I{(int)} 3056 @param ecol: The column the line ends at (inclusive). I{(int)} 3057 @param erow: The row the line ends at (inclusive). I{(int)} 3058 @param res: Requested resolution of data line (the number of samples to take). 3059 If nonpositive, data line resolution is chosen to match B{C{data_field}}'s. I{(int)} 3060 @param thickness: Thickness of line to be averaged. I{(int)} 3061 @param interpolation: Interpolation type to use. I{(InterpolationType)} 3062 @return: B{C{data_line}} itself if it was not B{C{NULL}}, otherwise a newly created 3063 data line. 3064 3065 """ 3066 return None
3067 - def get_row( data_line , row ):
3068 """ 3069 Extracts a data field row into a data line. 3070 3071 @param data_line: A data line. It will be resized to width ot B{C{data_field}}. I{(L{DataLine})} 3072 @param row: Row index. I{(int)} 3073 @return: 3074 """ 3075 return None
3076 - def get_column( data_line , col ):
3077 """ 3078 Extracts a data field column into a data line. 3079 3080 @param data_line: A data line. It will be resized to height of B{C{data_field}}. I{(L{DataLine})} 3081 @param col: Column index. I{(int)} 3082 @return: 3083 """ 3084 return None
3085 - def set_row( data_line , row ):
3086 """ 3087 Sets a row in the data field to values of a data line. 3088 3089 Data line length must be equal to width of data field. 3090 3091 @param data_line: A data line. I{(L{DataLine})} 3092 @param row: Row index. I{(int)} 3093 @return: 3094 """ 3095 return None
3096 - def set_column( data_line , col ):
3097 """ 3098 Sets a column in the data field to values of a data line. 3099 3100 Data line length must be equal to height of data field. 3101 3102 @param data_line: A data line. I{(L{DataLine})} 3103 @param col: Column index. I{(int)} 3104 @return: 3105 """ 3106 return None
3107 - def get_row_part( data_line , row , _from , to ):
3108 """ 3109 Extracts part of a data field row into a data line. 3110 3111 @param data_line: A data line. It will be resized to the row part width. I{(L{DataLine})} 3112 @param row: Row index. I{(int)} 3113 @param _from: Start column index. I{(int)} 3114 @param to: End column index + 1. I{(int)} 3115 @return: 3116 """ 3117 return None
3118 - def get_column_part( data_line , col , _from , to ):
3119 """ 3120 Extracts part of a data field column into a data line. 3121 3122 @param data_line: A data line. It will be resized to the column part height. I{(L{DataLine})} 3123 @param col: Column index. I{(int)} 3124 @param _from: Start row index. I{(int)} 3125 @param to: End row index + 1. I{(int)} 3126 @return: 3127 """ 3128 return None
3129 - def set_row_part( data_line , row , _from , to ):
3130 """ 3131 Puts a data line into a data field row. 3132 3133 If data line length differs from B{C{to}}-B{C{from}}, it is resampled to this length. 3134 3135 @param data_line: A data line. I{(L{DataLine})} 3136 @param row: Row index. I{(int)} 3137 @param _from: Start row index. I{(int)} 3138 @param to: End row index + 1. I{(int)} 3139 @return: 3140 """ 3141 return None
3142 - def set_column_part( data_line , col , _from , to ):
3143 """ 3144 Puts a data line into data field column. 3145 3146 If data line length differs from B{C{to}}-B{C{from}}, it is resampled to this length. 3147 3148 @param data_line: A data line. I{(L{DataLine})} 3149 @param col: Column index. I{(int)} 3150 @param _from: Start row index. I{(int)} 3151 @param to: End row index + 1. I{(int)} 3152 @return: 3153 """ 3154 return None
3155 - def get_xder( col , row ):
3156 """ 3157 Computes central derivative in X direction. 3158 3159 On border points, one-side derivative is returned. 3160 3161 3162 @param col: Column index. I{(int)} 3163 @param row: Row index. I{(int)} 3164 @return: Derivative in X direction. 3165 3166 """ 3167 return None
3168 - def get_yder( col , row ):
3169 """ 3170 Computes central derivative in Y direction. 3171 3172 On border points, one-side derivative is returned. 3173 3174 Note the derivative is for legacy reasons calulcated for the opposite 3175 y direction than is usual elsewhere in Gwyddion, i.e. if values increase 3176 with increasing row number, the returned value is negative. 3177 3178 3179 @param col: Column index. I{(int)} 3180 @param row: Row index. I{(int)} 3181 @return: Derivative in Y direction 3182 3183 """ 3184 return None
3185 - def get_angder( col , row , theta ):
3186 """ 3187 Computes derivative in direction specified by given angle. 3188 3189 3190 @param col: Column index. I{(int)} 3191 @param row: Row index. I{(int)} 3192 @param theta: Angle defining the direction (in radians, counterclockwise). I{(float)} 3193 @return: Derivative in direction given by angle B{C{theta}}. 3194 3195 """ 3196 return None
3197 - def UNIMPLEMENTED_average_xyz( density_map , points , npoints ):
3198 """ 3199 Fills a data field with regularised XYZ data using a simple method. 3200 3201 The real dimensions and offsets of B{C{field}} determine the rectangle in the XY 3202 plane that will be regularised. The regularisation method is fast but 3203 simple and there are no absolute guarantees of quality, even though the 3204 result will be usually quite acceptable. 3205 3206 This especially applies to reasonable views of the XYZ data. Unreasonable 3207 views can be rendered unreasonably. In particular if the rectangle does not 3208 contain any point from B{C{points}} (either due to high zoom to an empty region 3209 or by just being completely off) B{C{data_field}} will be filled entirely with 3210 the value of the closest point or something similar. 3211 3212 Since: 2.44 3213 3214 @param density_map: Optional data field to fill with XYZ point density map. It can 3215 be B{C{NULL}}. I{(L{DataField})} 3216 @param points: Array of XYZ points. Coordinates X and Y represent positions in 3217 the plane; the Z-coordinate represents values. I{(const-XYZ*)} 3218 @param npoints: Number of points. I{(int)} 3219 @return: 3220 """ 3221 return None
3222 - def xdwt( wt_coefs , direction , minsize ):
3223 """ 3224 Performs steps of the X-direction image wavelet decomposition. 3225 3226 The smallest low pass coefficients block is equal to B{C{minsize}}. Run with 3227 B{C{minsize}} = B{C{dfield}}->xres/2 to perform one step of decomposition 3228 or B{C{minsize}} = 4 to perform full decomposition (or anything between). 3229 3230 3231 @param wt_coefs: Data line where the wavelet transform coefficients are stored. I{(L{DataLine})} 3232 @param direction: Transform direction. I{(TransformDirection)} 3233 @param minsize: size of minimal transform result block I{(int)} 3234 @return: 3235 """ 3236 return None
3237 - def ydwt( wt_coefs , direction , minsize ):
3238 """ 3239 Performs steps of the Y-direction image wavelet decomposition. 3240 3241 The smallest low pass coefficients block is equal to B{C{minsize}}. Run with 3242 B{C{minsize}} = B{C{dfield}}->yres/2 to perform one step of decomposition 3243 or B{C{minsize}} = 4 to perform full decomposition (or anything between). 3244 3245 3246 @param wt_coefs: Data line where the wavelet transform coefficients are stored. I{(L{DataLine})} 3247 @param direction: Transform direction. I{(TransformDirection)} 3248 @param minsize: size of minimal transform result block I{(int)} 3249 @return: 3250 """ 3251 return None
3252 - def dwt( wt_coefs , direction , minsize ):
3253 """ 3254 Performs steps of the 2D image wavelet decomposition. 3255 3256 The smallest low pass coefficients block is equal to B{C{minsize}}. Run with 3257 B{C{minsize}} = B{C{dfield}}->xres/2 to perform one step of decomposition 3258 or B{C{minsize}} = 4 to perform full decomposition (or anything between). 3259 3260 3261 @param wt_coefs: Data line where the wavelet transform coefficients are stored. I{(L{DataLine})} 3262 @param direction: Transform direction. I{(TransformDirection)} 3263 @param minsize: size of minimal transform result block I{(int)} 3264 @return: 3265 """ 3266 return None
3267 - def dwt_mark_anisotropy( mask , wt_coefs , ratio , lowlimit ):
3268 return None
3269 - def elliptic_area_fill( col , row , width , height , value ):
3270 """ 3271 Fills an elliptic region of a data field with given value. 3272 3273 The elliptic region is defined by its bounding box which must be completely 3274 contained in the data field. 3275 3276 3277 @param col: Upper-left bounding box column coordinate. I{(int)} 3278 @param row: Upper-left bounding box row coordinate. I{(int)} 3279 @param width: Bounding box width (number of columns). I{(int)} 3280 @param height: Bounding box height (number of rows). I{(int)} 3281 @param value: Value to be entered. I{(float)} 3282 @return: The number of filled values. 3283 3284 """ 3285 return None
3286 - def elliptic_area_extract( col , row , width , height , data ):
3287 """ 3288 Extracts values from an elliptic region of a data field. 3289 3290 The elliptic region is defined by its bounding box which must be completely 3291 contained in the data field. 3292 3293 3294 @param col: Upper-left bounding box column coordinate. I{(int)} 3295 @param row: Upper-left bounding box row coordinate. I{(int)} 3296 @param width: Bounding box width (number of columns). I{(int)} 3297 @param height: Bounding box height (number of rows). I{(int)} 3298 @param data: Location to store the extracted values to. Its size has to be 3299 sufficient to contain all the extracted values. As a conservative 3300 estimate B{C{width}}*B{C{height}} can be used, or the 3301 size can be calculated with L{DataField.get_elliptic_area_size}(). I{(gdouble*)} 3302 @return: The number of extracted values. 3303 3304 """ 3305 return None
3306 - def elliptic_area_unextract( col , row , width , height , data ):
3307 """ 3308 Puts values back to an elliptic region of a data field. 3309 3310 The elliptic region is defined by its bounding box which must be completely 3311 contained in the data field. 3312 3313 This method does the reverse of L{DataField.elliptic_area_extract}() 3314 allowing to implement pixel-wise filters on elliptic areas. Values from 3315 B{C{data}} are put back to the same positions 3316 L{DataField.elliptic_area_extract}() took them from. 3317 3318 @param col: Upper-left bounding box column coordinate. I{(int)} 3319 @param row: Upper-left bounding box row coordinate. I{(int)} 3320 @param width: Bounding box width (number of columns). I{(int)} 3321 @param height: Bounding box height (number of rows). I{(int)} 3322 @param data: The values to put back. It must be the same array as in previous 3323 L{DataField.elliptic_area_extract}(). I{(const-gdouble*)} 3324 @return: 3325 """ 3326 return None
3327 - def circular_area_fill( col , row , radius , value ):
3328 """ 3329 Fills an elliptic region of a data field with given value. 3330 3331 3332 @param col: Row index of circular area centre. I{(int)} 3333 @param row: Column index of circular area centre. I{(int)} 3334 @param radius: Circular area radius (in pixels). Any value is allowed, although 3335 to get areas that do not deviate from true circles after 3336 pixelization too much, half-integer values are recommended, 3337 integer values are NOT recommended. I{(float)} 3338 @param value: Value to be entered. I{(float)} 3339 @return: The number of filled values. 3340 3341 """ 3342 return None
3343 - def circular_area_extract( col , row , radius , data ):
3344 """ 3345 Extracts values from a circular region of a data field. 3346 3347 3348 @param col: Row index of circular area centre. I{(int)} 3349 @param row: Column index of circular area centre. I{(int)} 3350 @param radius: Circular area radius (in pixels). See 3351 L{DataField.circular_area_extract_with_pos}() for caveats. I{(float)} 3352 @param data: Location to store the extracted values to. See 3353 L{DataField.circular_area_extract_with_pos}(). I{(gdouble*)} 3354 @return: The number of extracted values. It can be zero when the inside of 3355 the circle does not intersect with the data field. 3356 3357 """ 3358 return None
3359 - def UNIMPLEMENTED_circular_area_extract_with_pos( col , row , radius , data , xpos , ypos ):
3360 """ 3361 Extracts values with positions from a circular region of a data field. 3362 3363 The row and column indices stored to B{C{xpos}} and B{C{ypos}} are relative to the 3364 area centre, i.e. to (B{C{col}}, B{C{row}}). The central pixel will therefore have 3365 0 at the corresponding position in both B{C{xpos}} and B{C{ypos}}. 3366 3367 Since: 2.2 3368 3369 @param col: Row index of circular area centre. I{(int)} 3370 @param row: Column index of circular area centre. I{(int)} 3371 @param radius: Circular area radius (in pixels). Any value is allowed, although 3372 to get areas that do not deviate from true circles after 3373 pixelization too much, half-integer values are recommended, 3374 integer radii are NOT recommended. I{(float)} 3375 @param data: Location to store the extracted values to. Its size has to be 3376 sufficient to contain all the extracted values. As a conservative 3377 estimate (2*floor(B{C{radius}})+1)^2 can be used, or the size can be 3378 calculated with L{DataField.get_circular_area_size}(). I{(gdouble*)} 3379 @param xpos: Location to store relative column indices of values in B{C{data}} to, 3380 the size requirements are the same as for B{C{data}}. I{(int)} 3381 @param ypos: Location to store relative tow indices of values in B{C{data}} to, 3382 the size requirements are the same as for B{C{data}}. I{(int)} 3383 @return: The number of extracted values. It can be zero when the inside of 3384 the circle does not intersect with the data field. 3385 3386 3387 """ 3388 return None
3389 - def circular_area_unextract( col , row , radius , data ):
3390 """ 3391 Puts values back to a circular region of a data field. 3392 3393 This method does the reverse of L{DataField.circular_area_extract}() 3394 allowing to implement pixel-wise filters on circular areas. Values from 3395 B{C{data}} are put back to the same positions 3396 L{DataField.circular_area_extract}() took them from. 3397 3398 @param col: Row index of circular area centre. I{(int)} 3399 @param row: Column index of circular area centre. I{(int)} 3400 @param radius: Circular area radius (in pixels). I{(float)} 3401 @param data: The values to put back. It must be the same array as in previous 3402 L{DataField.circular_area_unextract}(). I{(const-gdouble*)} 3403 @return: 3404 """ 3405 return None
3406 - def normalize( ):
3407 """ 3408 Normalizes data in a data field to range 0.0 to 1.0. 3409 3410 It is equivalent to L{DataField.renormalize}(B{C{data_field}}, 1.0, 0.0); 3411 3412 If B{C{data_field}} is filled with only one value, it is changed to 0.0. 3413 3414 @return: 3415 """ 3416 return None
3417 - def renormalize( range , offset ):
3418 """ 3419 Transforms data in a data field with linear function to given range. 3420 3421 When B{C{range}} is positive, the new data range is (B{C{offset}}, B{C{offset}}+B{C{range}}); 3422 when B{C{range}} is negative, the new data range is (B{C{offset}}-B{C{range}}, B{C{offset}}). 3423 In neither case the data are flipped, negative range only means different 3424 selection of boundaries. 3425 3426 When B{C{range}} is zero, this method is equivalent to 3427 L{DataField.fill}(B{C{data_field}}, B{C{offset}}). 3428 3429 @param range: New data interval size. I{(float)} 3430 @param offset: New data interval offset. I{(float)} 3431 @return: 3432 """ 3433 return None
3434 - def area_renormalize( col , row , width , height , range , offset ):
3435 """ 3436 Transforms data in a part of a data field with linear function to given 3437 range. 3438 3439 When B{C{range}} is positive, the new data range is (B{C{offset}}, B{C{offset}}+B{C{range}}); 3440 when B{C{range}} is negative, the new data range is (B{C{offset}}-B{C{range}}, B{C{offset}}). 3441 In neither case the data are flipped, negative range only means different 3442 selection of boundaries. 3443 3444 When B{C{range}} is zero, this method is equivalent to 3445 L{DataField.fill}(B{C{data_field}}, B{C{offset}}). 3446 3447 Since: 2.45 3448 3449 @param col: Upper-left column coordinate. I{(int)} 3450 @param row: Upper-left row coordinate. I{(int)} 3451 @param width: Area width (number of columns). I{(int)} 3452 @param height: Area height (number of rows). I{(int)} 3453 @param range: New data interval size. I{(float)} 3454 @param offset: New data interval offset. I{(float)} 3455 @return: 3456 """ 3457 return None
3458 - def threshold( threshval , bottom , top ):
3459 """ 3460 Tresholds values of a data field. 3461 3462 Values smaller than B{C{threshold}} are set to value B{C{bottom}}, values higher 3463 than B{C{threshold}} or equal to it are set to value B{C{top}} 3464 3465 3466 @param threshval: Threshold value. I{(float)} 3467 @param bottom: Lower replacement value. I{(float)} 3468 @param top: Upper replacement value. I{(float)} 3469 @return: The total number of values above threshold. 3470 3471 """ 3472 return None
3473 - def area_threshold( col , row , width , height , threshval , bottom , top ):
3474 """ 3475 Tresholds values of a rectangular part of a data field. 3476 3477 Values smaller than B{C{threshold}} are set to value B{C{bottom}}, values higher 3478 than B{C{threshold}} or equal to it are set to value B{C{top}} 3479 3480 3481 @param col: Upper-left column coordinate. I{(int)} 3482 @param row: Upper-left row coordinate. I{(int)} 3483 @param width: Area width (number of columns). I{(int)} 3484 @param height: Area height (number of rows). I{(int)} 3485 @param threshval: Threshold value. I{(float)} 3486 @param bottom: Lower replacement value. I{(float)} 3487 @param top: Upper replacement value. I{(float)} 3488 @return: The total number of values above threshold. 3489 3490 """ 3491 return None
3492 - def clamp( bottom , top ):
3493 """ 3494 Limits data field values to a range. 3495 3496 3497 @param bottom: Lower limit value. I{(float)} 3498 @param top: Upper limit value. I{(float)} 3499 @return: The number of changed values, i.e., values that were outside 3500 [B{C{bottom}}, B{C{top}}]. 3501 3502 """ 3503 return None
3504 - def area_clamp( col , row , width , height , bottom , top ):
3505 """ 3506 Limits values in a rectangular part of a data field to a range. 3507 3508 3509 @param col: Upper-left column coordinate. I{(int)} 3510 @param row: Upper-left row coordinate. I{(int)} 3511 @param width: Area width (number of columns). I{(int)} 3512 @param height: Area height (number of rows). I{(int)} 3513 @param bottom: Lower limit value. I{(float)} 3514 @param top: Upper limit value. I{(float)} 3515 @return: The number of changed values, i.e., values that were outside 3516 [B{C{bottom}}, B{C{top}}]. 3517 3518 """ 3519 return None
3520 - def area_gather( result , buffer , hsize , vsize , average , col , row , width , height ):
3521 """ 3522 Sums or averages values in reactangular areas around each sample in a data 3523 field. 3524 3525 When the gathered area extends out of calculation area, only samples from 3526 their intersection are taken into the local sum (or average). 3527 3528 There are no restrictions on values of B{C{hsize}} and B{C{vsize}} with regard to 3529 B{C{width}} and B{C{height}}, but they have to be positive. 3530 3531 The result is calculated by the means of two-dimensional rolling sums. 3532 One one hand it means the calculation time depends linearly on 3533 (B{C{width}} + B{C{hsize}})*(B{C{height}} + B{C{vsize}}) instead of 3534 B{C{width}}*B{C{hsize}}*B{C{height}}*B{C{vsize}}. On the other hand it means absolute rounding 3535 errors of all output values are given by the largest input values, that is 3536 relative precision of results small in absolute value may be poor. 3537 3538 @param result: A data field to put the result to, it may be B{C{data_field}} itself. I{(L{DataField})} 3539 @param buffer: A data field to use as a scratch area, its size must be at least 3540 B{C{width}}*B{C{height}}. May be B{C{NULL}} to allocate a private temporary 3541 buffer. I{(L{DataField})} 3542 @param col: Upper-left column coordinate. I{(int)} 3543 @param row: Upper-left row coordinate. I{(int)} 3544 @param width: Area width (number of columns). I{(int)} 3545 @param height: Area height (number of rows). I{(int)} 3546 @param hsize: Horizontal size of gathered area. The area is centered around 3547 each sample if B{C{hsize}} is odd, it extends one pixel more to the 3548 right if B{C{hsize}} is even. I{(int)} 3549 @param vsize: Vertical size of gathered area. The area is centered around 3550 each sample if B{C{vsize}} is odd, it extends one pixel more down 3551 if B{C{vsize}} is even. I{(int)} 3552 @param average: B{C{True}} to divide resulting sums by the number of involved samples 3553 to get averages instead of sums. I{(bool)} 3554 @return: 3555 """ 3556 return None
3557 - def convolve( kernel_field ):
3558 """ 3559 Convolves a data field with given kernel. 3560 3561 @param kernel_field: Kenrel field to convolve B{C{data_field}} with. I{(L{DataField})} 3562 @return: 3563 """ 3564 return None
3565 - def area_convolve( kernel_field , col , row , width , height ):
3566 """ 3567 Convolves a rectangular part of a data field with given kernel. 3568 3569 @param kernel_field: Kenrel field to convolve B{C{data_field}} with. I{(L{DataField})} 3570 @param col: Upper-left column coordinate. I{(int)} 3571 @param row: Upper-left row coordinate. I{(int)} 3572 @param width: Area width (number of columns). I{(int)} 3573 @param height: Area height (number of rows). I{(int)} 3574 @return: 3575 """ 3576 return None
3577 - def convolve_1d( kernel_line , orientation ):
3578 """ 3579 Convolves a data field with given linear kernel. 3580 3581 Since: 2.4 3582 3583 @param kernel_line: Kenrel line to convolve B{C{data_field}} with. I{(L{DataLine})} 3584 @param orientation: Filter orientation (see L{DataField.area_convolve_1d}()). I{(Orientation)} 3585 @return: 3586 """ 3587 return None
3588 - def area_convolve_1d( kernel_line , orientation , col , row , width , height ):
3589 """ 3590 Convolves a rectangular part of a data field with given linear kernel. 3591 3592 For large separable kernels it can be more efficient to use a sequence of 3593 horizontal and vertical convolutions instead one 2D convolution. 3594 3595 Since: 2.4 3596 3597 @param kernel_line: Kernel line to convolve B{C{data_field}} with. I{(L{DataLine})} 3598 @param orientation: Filter orientation (B{C{ORIENTATION_HORIZONTAL}} for 3599 row-wise convolution, B{C{ORIENTATION_VERTICAL}} for 3600 column-wise convolution). I{(Orientation)} 3601 @param col: Upper-left column coordinate. I{(int)} 3602 @param row: Upper-left row coordinate. I{(int)} 3603 @param width: Area width (number of columns). I{(int)} 3604 @param height: Area height (number of rows). I{(int)} 3605 @return: 3606 """ 3607 return None
3608 - def filter_median( size ):
3609 """ 3610 Filters a data field with median filter. 3611 3612 @param size: Size of area to take median of. I{(int)} 3613 @return: 3614 """ 3615 return None
3616 - def area_filter_median( size , col , row , width , height ):
3617 """ 3618 Filters a rectangular part of a data field with median filter. 3619 3620 @param size: Size of area to take median of. I{(int)} 3621 @param col: Upper-left column coordinate. I{(int)} 3622 @param row: Upper-left row coordinate. I{(int)} 3623 @param width: Area width (number of columns). I{(int)} 3624 @param height: Area height (number of rows). I{(int)} 3625 @return: 3626 """ 3627 return None
3628 - def filter_mean( size ):
3629 """ 3630 Filters a data field with mean filter of size B{C{size}}. 3631 3632 @param size: Averaged area size. I{(int)} 3633 @return: 3634 """ 3635 return None
3636 - def area_filter_mean( size , col , row , width , height ):
3637 """ 3638 Filters a rectangular part of a data field with mean filter of size B{C{size}}. 3639 3640 This method is a simple L{DataField.area_gather}() wrapper. 3641 3642 @param size: Averaged area size. I{(int)} 3643 @param col: Upper-left column coordinate. I{(int)} 3644 @param row: Upper-left row coordinate. I{(int)} 3645 @param width: Area width (number of columns). I{(int)} 3646 @param height: Area height (number of rows). I{(int)} 3647 @return: 3648 """ 3649 return None
3650 - def filter_conservative( size ):
3651 """ 3652 Filters a data field with conservative denoise filter. 3653 3654 @param size: Filtered area size. I{(int)} 3655 @return: 3656 """ 3657 return None
3658 - def area_filter_conservative( size , col , row , width , height ):
3659 """ 3660 Filters a rectangular part of a data field with conservative denoise filter. 3661 3662 @param size: Filtered area size. I{(int)} 3663 @param col: Upper-left column coordinate. I{(int)} 3664 @param row: Upper-left row coordinate. I{(int)} 3665 @param width: Area width (number of columns). I{(int)} 3666 @param height: Area height (number of rows). I{(int)} 3667 @return: 3668 """ 3669 return None
3670 - def filter_laplacian( ):
3671 """ 3672 Filters a data field with Laplacian filter. 3673 3674 @return: 3675 """ 3676 return None
3677 - def area_filter_laplacian( col , row , width , height ):
3678 """ 3679 Filters a rectangular part of a data field with Laplacian filter. 3680 3681 @param col: Upper-left column coordinate. I{(int)} 3682 @param row: Upper-left row coordinate. I{(int)} 3683 @param width: Area width (number of columns). I{(int)} 3684 @param height: Area height (number of rows). I{(int)} 3685 @return: 3686 """ 3687 return None
3689 """ 3690 Filters a data field with Laplacian of Gaussians filter. 3691 3692 Since: 2.23 3693 3694 @return: 3695 """ 3696 return None
3697 - def area_filter_laplacian_of_gaussians( col , row , width , height ):
3698 """ 3699 Filters a rectangular part of a data field 3700 with Laplacian of Gaussians filter. 3701 3702 Since: 2.23 3703 3704 @param col: Upper-left column coordinate. I{(int)} 3705 @param row: Upper-left row coordinate. I{(int)} 3706 @param width: Area width (number of columns). I{(int)} 3707 @param height: Area height (number of rows). I{(int)} 3708 @return: 3709 """ 3710 return None
3711 - def filter_sobel( orientation ):
3712 """ 3713 Filters a data field with a directional Sobel filter. 3714 3715 @param orientation: Filter orientation. I{(Orientation)} 3716 @return: 3717 """ 3718 return None
3719 - def area_filter_sobel( orientation , col , row , width , height ):
3720 """ 3721 Filters a rectangular part of a data field with a directional Sobel filter. 3722 3723 @param orientation: Filter orientation. I{(Orientation)} 3724 @param col: Upper-left column coordinate. I{(int)} 3725 @param row: Upper-left row coordinate. I{(int)} 3726 @param width: Area width (number of columns). I{(int)} 3727 @param height: Area height (number of rows). I{(int)} 3728 @return: 3729 """ 3730 return None
3731 - def filter_sobel_total( ):
3732 """ 3733 Filters a data field with total Sobel filter. 3734 3735 Since: 2.31 3736 3737 @return: 3738 """ 3739 return None
3740 - def filter_prewitt( orientation ):
3741 """ 3742 Filters a data field with Prewitt filter. 3743 3744 @param orientation: Filter orientation. I{(Orientation)} 3745 @return: 3746 """ 3747 return None
3748 - def area_filter_prewitt( orientation , col , row , width , height ):
3749 """ 3750 Filters a rectangular part of a data field with a directional Prewitt 3751 filter. 3752 3753 @param orientation: Filter orientation. I{(Orientation)} 3754 @param col: Upper-left column coordinate. I{(int)} 3755 @param row: Upper-left row coordinate. I{(int)} 3756 @param width: Area width (number of columns). I{(int)} 3757 @param height: Area height (number of rows). I{(int)} 3758 @return: 3759 """ 3760 return None
3761 - def filter_prewitt_total( ):
3762 """ 3763 Filters a data field with total Prewitt filter. 3764 3765 Since: 2.31 3766 3767 @return: 3768 """ 3769 return None
3770 - def filter_slope( xder , yder ):
3771 """ 3772 Calculates x and y derivaties for an entire field. 3773 3774 The derivatives are calculated as the simple symmetrical differences (in 3775 physical units, not pixel-wise), except at the edges where the differences 3776 are one-sided. 3777 3778 Since: 2.37 3779 3780 @param xder: Data field where the x-derivarive is to be stored, or B{C{NULL}} if you 3781 are only interested in the y-derivarive. I{(L{DataField})} 3782 @param yder: Data field where the y-derivarive is to be stored, or B{C{NULL}} if you 3783 are only interested in the x-derivarive. I{(L{DataField})} 3784 @return: 3785 """ 3786 return None
3787 - def filter_dechecker( ):
3788 """ 3789 Filters a data field with 5x5 checker pattern removal filter. 3790 3791 Since: 2.1 3792 3793 @return: 3794 """ 3795 return None
3796 - def area_filter_dechecker( col , row , width , height ):
3797 """ 3798 Filters a rectangular part of a data field with 5x5 checker pattern removal 3799 filter. 3800 3801 Since: 2.1 3802 3803 @param col: Upper-left column coordinate. I{(int)} 3804 @param row: Upper-left row coordinate. I{(int)} 3805 @param width: Area width (number of columns). I{(int)} 3806 @param height: Area height (number of rows). I{(int)} 3807 @return: 3808 """ 3809 return None
3810 - def filter_gaussian( sigma ):
3811 """ 3812 Filters a data field with a Gaussian filter. 3813 3814 Since: 2.4 3815 3816 @param sigma: The sigma parameter of the Gaussian. I{(float)} 3817 @return: 3818 """ 3819 return None
3820 - def area_filter_gaussian( sigma , col , row , width , height ):
3821 """ 3822 Filters a rectangular part of a data field with a Gaussian filter. 3823 3824 The Gausian is normalized, i.e. it is sum-preserving. 3825 3826 Since: 2.4 3827 3828 @param sigma: The sigma parameter of the Gaussian. I{(float)} 3829 @param col: Upper-left column coordinate. I{(int)} 3830 @param row: Upper-left row coordinate. I{(int)} 3831 @param width: Area width (number of columns). I{(int)} 3832 @param height: Area height (number of rows). I{(int)} 3833 @return: 3834 """ 3835 return None
3836 - def filter_minimum( size ):
3837 """ 3838 Filters a data field with minimum filter. 3839 3840 @param size: Neighbourhood size for minimum search. I{(int)} 3841 @return: 3842 """ 3843 return None
3844 - def area_filter_minimum( size , col , row , width , height ):
3845 """ 3846 Filters a rectangular part of a data field with minimum filter. 3847 3848 This operation is often called erosion filter. 3849 3850 @param size: Neighbourhood size for minimum search. I{(int)} 3851 @param col: Upper-left column coordinate. I{(int)} 3852 @param row: Upper-left row coordinate. I{(int)} 3853 @param width: Area width (number of columns). I{(int)} 3854 @param height: Area height (number of rows). I{(int)} 3855 @return: 3856 """ 3857 return None
3858 - def filter_maximum( size ):
3859 """ 3860 Filters a data field with maximum filter. 3861 3862 @param size: Neighbourhood size for maximum search. I{(int)} 3863 @return: 3864 """ 3865 return None
3866 - def area_filter_maximum( size , col , row , width , height ):
3867 """ 3868 Filters a rectangular part of a data field with maximum filter. 3869 3870 This operation is often called dilation filter. 3871 3872 @param size: Neighbourhood size for maximum search. I{(int)} 3873 @param col: Upper-left column coordinate. I{(int)} 3874 @param row: Upper-left row coordinate. I{(int)} 3875 @param width: Area width (number of columns). I{(int)} 3876 @param height: Area height (number of rows). I{(int)} 3877 @return: 3878 """ 3879 return None
3880 - def area_filter_min_max( kernel , filtertype , col , row , width , height ):
3881 """ 3882 Applies a morphological operation with a flat structuring element to a 3883 part of a data field. 3884 3885 Morphological operations with flat structuring elements can be expressed 3886 using minimum (erosion) and maximum (dilation) filters that are the basic 3887 operations this function can perform. 3888 3889 The kernel field is a mask that defines the shape of the flat structuring 3890 element. It is reflected for all maximum operations (dilation). For 3891 symmetrical kernels this does not matter. You can use 3892 L{DataField.elliptic_area_fill}() to create a true circular (or 3893 elliptical) kernel. 3894 3895 The kernel is implicitly centered, i.e. it will be applied symmetrically to 3896 avoid unexpected data movement. Even-sized kernels (generally not 3897 recommended) will extend farther towards the top left image corner for 3898 minimum (erosion) and towards the bottom right corner for maximum (dilation) 3899 operations due to the reflection. If you need off-center structuring 3900 elements you can add empty rows or columns to one side of the kernel to 3901 counteract the symmetrisation. 3902 3903 The operation is linear-time in kernel size for any convex kernel. Note 3904 L{DataField.area_filter_minimum}() and 3905 L{DataField.area_filter_maximum}(), which are limited to square 3906 structuring elements, are much faster for large sizes of the squares. 3907 3908 The exterior is always handled as B{C{EXTERIOR_BORDER_EXTEND}}. 3909 3910 Since: 2.43 3911 3912 @param kernel: Data field defining the flat structuring element. I{(L{DataField})} 3913 @param filtertype: The type of filter to apply. I{(MinMaxFilterType)} 3914 @param col: Upper-left column coordinate. I{(int)} 3915 @param row: Upper-left row coordinate. I{(int)} 3916 @param width: Area width (number of columns). I{(int)} 3917 @param height: Area height (number of rows). I{(int)} 3918 @return: 3919 """ 3920 return None
3921 - def area_filter_disc_asf( radius , closing , col , row , width , height ):
3922 return None
3923 - def filter_rms( size ):
3924 """ 3925 Filters a data field with RMS filter. 3926 3927 @param size: Area size. I{(int)} 3928 @return: 3929 """ 3930 return None
3931 - def area_filter_rms( size , col , row , width , height ):
3932 """ 3933 Filters a rectangular part of a data field with RMS filter of size B{C{size}}. 3934 3935 RMS filter computes root mean square in given area. 3936 3937 @param size: Area size. I{(int)} 3938 @param col: Upper-left column coordinate. I{(int)} 3939 @param row: Upper-left row coordinate. I{(int)} 3940 @param width: Area width (number of columns). I{(int)} 3941 @param height: Area height (number of rows). I{(int)} 3942 @return: 3943 """ 3944 return None
3945 - def filter_kuwahara( ):
3946 """ 3947 Filters a data field with Kuwahara filter. 3948 3949 @return: 3950 """ 3951 return None
3952 - def area_filter_kuwahara( col , row , width , height ):
3953 """ 3954 Filters a rectangular part of a data field with a Kuwahara 3955 (edge-preserving smoothing) filter. 3956 3957 @param col: Upper-left column coordinate. I{(int)} 3958 @param row: Upper-left row coordinate. I{(int)} 3959 @param width: Area width (number of columns). I{(int)} 3960 @param height: Area height (number of rows). I{(int)} 3961 @return: 3962 """ 3963 return None
3964 - def filter_canny( threshold ):
3965 """ 3966 Filters a rectangular part of a data field with canny edge detector filter. 3967 3968 @param threshold: Slope detection threshold (range 0..1). I{(float)} 3969 @return: 3970 """ 3971 return None
3972 - def shade( target_field , theta , phi ):
3973 """ 3974 Shades a data field. 3975 3976 @param target_field: A data field to put the shade to. It will be resized to 3977 match B{C{data_field}}. I{(L{DataField})} 3978 @param theta: Shading angle (in radians, from north pole). I{(float)} 3979 @param phi: Shade orientation in xy plane (in radians, counterclockwise). I{(float)} 3980 @return: 3981 """ 3982 return None
3983 - def filter_harris( y_gradient , result , neighbourhood , alpha ):
3984 return None
3985 - def fractal_partitioning( xresult , yresult , interpolation ):
3986 """ 3987 Computes data for log-log plot by partitioning. 3988 3989 Data lines B{C{xresult}} and B{C{yresult}} will be resized to the output size and 3990 they will contain corresponding values at each position. 3991 3992 @param xresult: Data line to store x-values for log-log plot to. I{(L{DataLine})} 3993 @param yresult: Data line to store y-values for log-log plot to. I{(L{DataLine})} 3994 @param interpolation: Interpolation type. I{(InterpolationType)} 3995 @return: 3996 """ 3997 return None
3998 - def fractal_cubecounting( xresult , yresult , interpolation ):
3999 """ 4000 Computes data for log-log plot by cube counting. 4001 4002 Data lines B{C{xresult}} and B{C{yresult}} will be resized to the output size and 4003 they will contain corresponding values at each position. 4004 4005 @param xresult: Data line to store x-values for log-log plot to. I{(L{DataLine})} 4006 @param yresult: Data line to store y-values for log-log plot to. I{(L{DataLine})} 4007 @param interpolation: Interpolation type. I{(InterpolationType)} 4008 @return: 4009 """ 4010 return None
4011 - def fractal_triangulation( xresult , yresult , interpolation ):
4012 """ 4013 Computes data for log-log plot by triangulation. 4014 4015 Data lines B{C{xresult}} and B{C{yresult}} will be resized to the output size and 4016 they will contain corresponding values at each position. 4017 4018 @param xresult: Data line to store x-values for log-log plot to. I{(L{DataLine})} 4019 @param yresult: Data line to store y-values for log-log plot to. I{(L{DataLine})} 4020 @param interpolation: Interpolation type. I{(InterpolationType)} 4021 @return: 4022 """ 4023 return None
4024 - def fractal_psdf( xresult , yresult , interpolation ):
4025 """ 4026 Computes data for log-log plot by spectral density method. 4027 4028 Data lines B{C{xresult}} and B{C{yresult}} will be resized to the output size and 4029 they will contain corresponding values at each position. 4030 4031 @param xresult: Data line to store x-values for log-log plot to. I{(L{DataLine})} 4032 @param yresult: Data line to store y-values for log-log plot to. I{(L{DataLine})} 4033 @param interpolation: Interpolation type. I{(InterpolationType)} 4034 @return: 4035 """ 4036 return None
4037 - def fractal_correction( mask_field , interpolation ):
4038 """ 4039 Replaces data under mask with interpolated values using fractal 4040 interpolation. 4041 4042 @param mask_field: Mask of places to be corrected. I{(L{DataField})} 4043 @param interpolation: Interpolation type. I{(InterpolationType)} 4044 @return: 4045 """ 4046 return None
4047 - def grains_mark_curvature( grain_field , threshval , below ):
4048 """ 4049 Marks data that are above/below curvature threshold. 4050 4051 @param grain_field: Data field to store the resulting mask to. I{(L{DataField})} 4052 @param threshval: Relative curvature threshold, in percents. I{(float)} 4053 @param below: If B{C{True}}, data below threshold are marked, otherwise data above 4054 threshold are marked. I{(bool)} 4055 @return: 4056 """ 4057 return None
4058 - def grains_mark_watershed( grain_field , locate_steps , locate_thresh , locate_dropsize , wshed_steps , wshed_dropsize , prefilter , below ):
4059 """ 4060 Performs watershed algorithm. 4061 4062 @param grain_field: Result of marking (mask). I{(L{DataField})} 4063 @param locate_steps: Locating algorithm steps. I{(int)} 4064 @param locate_thresh: Locating algorithm threshold. I{(int)} 4065 @param locate_dropsize: Locating drop size. I{(float)} 4066 @param wshed_steps: Watershed steps. I{(int)} 4067 @param wshed_dropsize: Watershed drop size. I{(float)} 4068 @param prefilter: Use prefiltering. I{(bool)} 4069 @param below: If B{C{True}}, valleys are marked, otherwise mountains are marked. I{(bool)} 4070 @return: 4071 """ 4072 return None
4073 - def grains_remove_grain( col , row ):
4074 """ 4075 Removes one grain at given position. 4076 4077 4078 @param col: Column inside a grain. I{(int)} 4079 @param row: Row inside a grain. I{(int)} 4080 @return: B{C{True}} if a grain was actually removed (i.e., (B{C{col}},B{C{row}}) was 4081 inside a grain). 4082 4083 """ 4084 return None
4085 - def grains_extract_grain( col , row ):
4086 """ 4087 Removes all grains except that one at given position. 4088 4089 If there is no grain at (B{C{col}}, B{C{row}}), all grains are removed. 4090 4091 4092 @param col: Column inside a grain. I{(int)} 4093 @param row: Row inside a grain. I{(int)} 4094 @return: B{C{True}} if a grain remained (i.e., (B{C{col}},B{C{row}}) was inside a grain). 4095 4096 """ 4097 return None
4098 - def grains_remove_by_number( number ):
4099 """ 4100 Removes grain identified by B{C{number}}. 4101 4102 Since: 2.35 4103 4104 @param number: Grain number was filled by L{DataField.number_grains}(). I{(int)} 4105 @return: 4106 """ 4107 return None
4108 - def grains_remove_by_size( size ):
4109 """ 4110 Removes all grains below specified area. 4111 4112 @param size: Grain area threshold, in square pixels. I{(int)} 4113 @return: 4114 """ 4115 return None
4116 - def grains_remove_by_height( grain_field , threshval , below ):
4117 """ 4118 Removes grains that are higher/lower than given threshold value. 4119 4120 @param grain_field: Field of marked grains (mask) I{(L{DataField})} 4121 @param threshval: Relative height threshold, in percents. I{(float)} 4122 @param below: If B{C{True}}, grains below threshold are removed, otherwise grains above 4123 threshold are removed. I{(bool)} 4124 @return: 4125 """ 4126 return None
4128 """ 4129 Removes all grains that touch field borders. 4130 4131 Since: 2.30 4132 4133 @return: 4134 """ 4135 return None
4136 - def UNIMPLEMENTED_grains_watershed_init( grain_field , locate_steps , locate_thresh , locate_dropsize , wshed_steps , wshed_dropsize , prefilter , below ):
4137 """ 4138 Initializes the watershed algorithm. 4139 4140 This iterator reports its state as B{C{WatershedStateType}}. 4141 4142 4143 @param grain_field: Result of marking (mask). I{(L{DataField})} 4144 @param locate_steps: Locating algorithm steps. I{(int)} 4145 @param locate_thresh: Locating algorithm threshold. I{(int)} 4146 @param locate_dropsize: Locating drop size. I{(float)} 4147 @param wshed_steps: Watershed steps. I{(int)} 4148 @param wshed_dropsize: Watershed drop size. I{(float)} 4149 @param prefilter: Use prefiltering. I{(bool)} 4150 @param below: If B{C{True}}, valleys are marked, otherwise mountains are marked. I{(bool)} 4151 @return: A new watershed iterator. 4152 4153 """ 4154 return None
4155 - def grains_mark_height( grain_field , threshval , below ):
4156 """ 4157 Marks data that are above/below height threshold. 4158 4159 @param grain_field: Data field to store the resulting mask to. I{(L{DataField})} 4160 @param threshval: Relative height threshold, in percents. I{(float)} 4161 @param below: If B{C{True}}, data below threshold are marked, otherwise data above 4162 threshold are marked. I{(bool)} 4163 @return: 4164 """ 4165 return None
4166 - def grains_mark_slope( grain_field , threshval , below ):
4167 """ 4168 Marks data that are above/below slope threshold. 4169 4170 @param grain_field: Data field to store the resulting mask to. I{(L{DataField})} 4171 @param threshval: Relative slope threshold, in percents. I{(float)} 4172 @param below: If B{C{True}}, data below threshold are marked, otherwise data above 4173 threshold are marked. I{(bool)} 4174 @return: 4175 """ 4176 return None
4177 - def otsu_threshold( ):
4178 """ 4179 Finds Otsu's height threshold for a data field. 4180 4181 The Otsu's threshold is optimal in the sense that it minimises the 4182 inter-class variances of two classes of pixels: above and below theshold. 4183 4184 Since: 2.37 4185 4186 @return: 4187 """ 4188 return None
4189 - def grains_add( add_field ):
4190 """ 4191 Adds B{C{add_field}} grains to B{C{grain_field}}. 4192 4193 Note: This function is equivalent to 4194 |[ 4195 L{DataField.max_of_fields}(grain_field, grain_field, add_field); 4196 ]| 4197 4198 @param add_field: Field of marked grains (mask) to be added. I{(L{DataField})} 4199 @return: 4200 """ 4201 return None
4202 - def grains_intersect( intersect_field ):
4203 """ 4204 Performs intersection betweet two grain fields, 4205 result is stored in B{C{grain_field}}. 4206 4207 Note: This function is equivalent to 4208 |[ 4209 L{DataField.min_of_fields}(grain_field, grain_field, intersect_field); 4210 ]| 4211 4212 @param intersect_field: Field of marked grains (mask). I{(L{DataField})} 4213 @return: 4214 """ 4215 return None
4216 - def grains_invert( ):
4217 """ 4218 Inverts a data field representing a mask. 4219 4220 All non-positive values are transformed to 1.0. All positive values are 4221 transformed to 0.0. 4222 4223 Since: 2.43 4224 4225 @return: 4226 """ 4227 return None
4228 - def UNIMPLEMENTED_grains_autocrop( symmetrically , left , right , up , down ):
4229 """ 4230 Removes empty border rows and columns from a data field representing a mask. 4231 4232 If there are border rows and columns filled completely with non-positive 4233 values the size of the data field is reduced, removing these rows. The 4234 parameter B{C{symmetrically}} controls whether the size reduction is maximum 4235 possible or symmetrical. 4236 4237 When there is no positive value in the field the field size is reduced to 4238 the smallest possible. This means 1x1 for B{C{symmetrical}} being B{C{False}} and 4239 even original dimensions to 2 for B{C{symmetrical}} being B{C{True}}. 4240 4241 Since: 2.43 4242 4243 @param symmetrically: B{C{True}} to remove borders symmetrically, i.e the same number 4244 of pixels from left and right, and also top and bottom. 4245 B{C{False}} to remove as many empty rows and columns as possible. I{(bool)} 4246 @param left: Location to store how many column were removed from the left, or 4247 B{C{NULL}}. I{(guint*)} 4248 @param right: Location to store how many column were removed from the right, or 4249 B{C{NULL}}. I{(guint*)} 4250 @param up: Location to store how many row were removed from the top, or B{C{NULL}}. I{(guint*)} 4251 @param down: Location to store how many row were removed from the bottom, or 4252 B{C{NULL}}. I{(guint*)} 4253 @return: B{C{True}} if the field size was reduced at all. Detailed information 4254 about the reduction can be obtained from B{C{left}}, B{C{right}}, B{C{up}} and 4255 B{C{down}}. 4256 4257 4258 """ 4259 return None
4260 - def number_grains( grains ):
4261 """ 4262 Create a tuple of integer grain numbers in the data field representing a 4263 mask. 4264 4265 4266 @return: tuple of grain numbers for each piel 4267 4268 """ 4269 return None
4270 - def number_grains_periodic( grains ):
4271 """ 4272 Numbers grains in a periodic mask data field. 4273 4274 This function differs from L{DataField.number_grains}() by the assumption 4275 of periodicity, i.e. grains can touch across the opposite field edges. 4276 4277 Since: 2.38 4278 4279 @param grains: Zero-filled array of integers of equal size to B{C{mask_field}} to put 4280 grain numbers to. Empty space will be left 0, pixels inside a 4281 grain will be set to grain number. Grains are numbered 4282 sequentially 1, 2, 3, ... I{(gint*)} 4283 @return: The number of last grain (note they are numbered from 1). 4284 4285 4286 """ 4287 return None
4288 - def get_grain_bounding_boxes( ngrains , grains , bboxes ):
4289 """ 4290 Find bounding boxes of all grains. 4291 4292 Since: 2.3 4293 4294 @param ngrains: The number of grains as returned by 4295 L{DataField.number_grains}(). I{(int)} 4296 @param grains: Grain numbers filled with L{DataField.number_grains}(). I{(const-gint*)} 4297 @param bboxes: Array of size at least 4*(B{C{ngrains}}+1) to fill with grain bounding 4298 boxes (as usual zero does not correspond to any grain, grains 4299 start from 1). The bounding boxes are stored as quadruples of 4300 indices: (xmin, ymin, width, height). It can be B{C{NULL}} to allocate 4301 a new array. I{(gint*)} 4302 @return: Either B{C{bboxes}} (if it was not B{C{NULL}}), or a newly allocated array 4303 of size 4(B{C{ngrains}} + 1). 4304 4305 4306 """ 4307 return None
4308 - def grains_get_distribution( grain_field , distribution , ngrains , grains , quantity , nstats ):
4309 """ 4310 Computes distribution of requested grain characteristics. 4311 4312 Puts number of grains vs. grain value data into B{C{distribution}}, units, scales 4313 and offsets of B{C{distribution}} are updated accordingly. 4314 4315 Note the B{C{i}}-th bin is [B{C{i}}*B{C{dx}}+B{C{off}},(B{C{i}}+1)*B{C{dx}}+B{C{off}}] so the central value 4316 you probably want to use for plotting is (B{C{i}}+0.5)*B{C{dx}}+B{C{off}} (where B{C{dx}} is 4317 the B{C{distribution}} data line pixel size, B{C{off}} is its offset). 4318 4319 4320 @param grain_field: Data field (mask) of marked grains. Note if you pass 4321 non-B{C{NULL}} B{C{grains}} all grain information is taken from it and 4322 B{C{grain_field}} can be even B{C{NULL}} then. I{(L{DataField})} 4323 @param distribution: Data line to store grain distribution to. I{(L{DataLine})} 4324 @param grains: Grain numbers filled with L{DataField.number_grains}() if you 4325 have it, or B{C{NULL}} (the function then finds grain numbers itself 4326 which is not efficient for repeated use on the same grain field). I{(const-gint*)} 4327 @param ngrains: The number of grains as returned by 4328 L{DataField.number_grains}(). Ignored in B{C{grains}} is B{C{NULL}}. I{(int)} 4329 @param quantity: The quantity to calculate. I{(GrainQuantity)} 4330 @param nstats: The number of samples to take on the distribution function. If 4331 nonpositive, a suitable resolution is determined automatically. I{(int)} 4332 @return: A data line with the distribution: B{C{distribution}} itself if it was 4333 not B{C{NULL}}, otherwise a newly created B{C{DataLine}} caller must 4334 destroy. If there are no grains, B{C{NULL}} is returned and 4335 B{C{distribution}} is not changed. 4336 4337 """ 4338 return None
4339 - def grains_get_values( values , ngrains , grains , quantity ):
4340 """ 4341 Obtains values of one grain quantity for all grains. 4342 4343 The zeroth value corresponds to the empty space between grains and isn't 4344 meaningful in general. 4345 4346 4347 @param quantity: Grain quantity. I{(GrainQuantity)} 4348 @return: tuple of values of the grain quantity 4349 4350 """ 4351 return None
4352 - def UNIMPLEMENTED_grains_get_quantities( values , quantities , nquantities , ngrains , grains ):
4353 """ 4354 Calculates multiple characteristics of grains simultaneously. 4355 4356 See L{DataField.grains_get_values}() for some discussion. This function 4357 is more efficient if several grain quantities need to be calculated since 4358 L{DataField.grains_get_values}() can do lot of repeated work in such case. 4359 4360 Since: 2.22 4361 4362 @param values: Array of B{C{nquantities}} pointers to blocks of length B{C{ngrains}}+1 to 4363 put the calculated grain values to. Each block corresponds to one 4364 requested quantity. B{C{NULL}} can be passed to allocate and return a 4365 new array. I{(gdouble**)} 4366 @param quantities: Array of B{C{nquantities}} items that specify the requested 4367 B{C{GrainQuantity}} to put to corresponding items in B{C{values}}. 4368 Quantities can repeat. I{(const-GrainQuantity*)} 4369 @param nquantities: The number of requested different grain values. I{(int)} 4370 @param grains: Grain numbers filled with L{DataField.number_grains}(). I{(const-gint*)} 4371 @param ngrains: The number of grains as returned by 4372 L{DataField.number_grains}(). I{(int)} 4373 @return: B{C{values}} itself if it was not B{C{NULL}}, otherwise a newly allocated 4374 array that caller has to free with g_free(), including the 4375 contained arrays. 4376 4377 4378 """ 4379 return None
4380 - def area_grains_tgnd( target_line , col , row , width , height , below , nstats ):
4381 """ 4382 Calculates threshold grain number distribution. 4383 4384 This function is a simple L{DataField.area_grains_tgnd_range}() that 4385 calculates the distribution in the full range. 4386 4387 @param target_line: A data line to store the distribution to. It will be 4388 resampled to the requested width. I{(L{DataLine})} 4389 @param col: Upper-left column coordinate. I{(int)} 4390 @param row: Upper-left row coordinate. I{(int)} 4391 @param width: Area width (number of columns). I{(int)} 4392 @param height: Area height (number of rows). I{(int)} 4393 @param below: If B{C{True}}, valleys are marked, otherwise mountains are marked. I{(bool)} 4394 @param nstats: The number of samples to take on the distribution function. If 4395 nonpositive, a suitable resolution is determined automatically. I{(int)} 4396 @return: 4397 """ 4398 return None
4399 - def area_grains_tgnd_range( target_line , col , row , width , height , min , max , below , nstats ):
4400 """ 4401 Calculates threshold grain number distribution in given height range. 4402 4403 This is the number of grains for each of B{C{nstats}} equidistant height 4404 threshold levels. For large B{C{nstats}} this function is much faster than the 4405 equivalent number of L{DataField.grains_mark_height}() calls. 4406 4407 @param target_line: A data line to store the distribution to. It will be 4408 resampled to the requested width. I{(L{DataLine})} 4409 @param col: Upper-left column coordinate. I{(int)} 4410 @param row: Upper-left row coordinate. I{(int)} 4411 @param width: Area width (number of columns). I{(int)} 4412 @param height: Area height (number of rows). I{(int)} 4413 @param min: Minimum threshold value. I{(float)} 4414 @param max: Maximum threshold value. I{(float)} 4415 @param below: If B{C{True}}, valleys are marked, otherwise mountains are marked. I{(bool)} 4416 @param nstats: The number of samples to take on the distribution function. If 4417 nonpositive, a suitable resolution is determined automatically. I{(int)} 4418 @return: 4419 """ 4420 return None
4421 - def grains_splash_water( minima , locate_steps , locate_dropsize ):
4422 return None
4424 """ 4425 Performs Euclidean distance transform of a data field with grains. 4426 4427 Each non-zero value will be replaced with Euclidean distance to the grain 4428 boundary, measured in pixels. 4429 4430 See also L{DataField.grain_simple_dist_trans}() for simple distance 4431 transforms such as city-block or chessboard. 4432 4433 Since: 2.36 4434 4435 @return: 4436 """ 4437 return None
4438 - def grain_simple_dist_trans( dtype , from_border ):
4439 """ 4440 Performs a distance transform of a data field with grains. 4441 4442 Each non-zero value will be replaced with a distance to the grain boundary, 4443 measured in pixels. 4444 4445 Note this function can calculate the Euclidean distance transform only since 4446 2.43. Use L{DataField.grain_distance_transform}() for the EDT if you need 4447 compatibility with older versions. 4448 4449 Since: 2.41 4450 4451 @param dtype: Type of simple distance to use. I{(DistanceTransformType)} 4452 @param from_border: B{C{True}} to consider image edges to be grain boundaries. I{(bool)} 4453 @return: 4454 """ 4455 return None
4456 - def grains_shrink( amount , dtype , from_border ):
4457 """ 4458 Erodes a data field containing mask by specified amount using a distance 4459 measure. 4460 4461 Non-zero pixels in B{C{data_field}} will be replaced with zeroes if they are not 4462 farther than B{C{amount}} from the grain boundary as defined by B{C{dtype}}. 4463 4464 Since: 2.43 4465 4466 @param amount: How much the grains should be reduced, in pixels. It is inclusive, 4467 i.e. pixels that are B{C{amount}} far from the border will be removed. I{(float)} 4468 @param dtype: Type of simple distance to use. I{(DistanceTransformType)} 4469 @param from_border: B{C{True}} to consider image edges to be grain boundaries. 4470 B{C{False}} to reduce grains touching field boundaries only along 4471 the boundaries. I{(bool)} 4472 @return: 4473 """ 4474 return None
4475 - def grains_grow( amount , dtype , prevent_merging ):
4476 """ 4477 Dilates a data field containing mask by specified amount using a distance 4478 measure. 4479 4480 Non-positive pixels in B{C{data_field}} will be replaced with ones if they are 4481 not farther than B{C{amount}} from the grain boundary as defined by B{C{dtype}}. 4482 4483 Since: 2.43 4484 4485 @param amount: How much the grains should be expanded, in pixels. It is 4486 inclusive, i.e. exterior pixels that are B{C{amount}} far from the 4487 border will be filled. I{(float)} 4488 @param dtype: Type of simple distance to use. I{(DistanceTransformType)} 4489 @param prevent_merging: B{C{True}} to prevent grain merging, i.e. the growth stops 4490 where two grains would merge. B{C{False}} to simply expand the 4491 grains, without regard to grain connectivity. I{(bool)} 4492 @return: 4493 """ 4494 return None
4495 - def fill_voids( nonsimple ):
4496 """ 4497 Fills voids in grains in a data field representing a mask. 4498 4499 Voids in grains are zero pixels in B{C{data_field}} from which no path exists 4500 through other zero pixels to the field boundary. The paths are considered 4501 in 8-connectivity because grains themselves are considered in 4502 4-connectivity. 4503 4504 Since: 2.37 4505 4506 @param nonsimple: Pass B{C{True}} to fill also voids that are not simple-connected 4507 (e.g. ring-like). This can result in grain merging if a small 4508 grain is contained within a void. Pass B{C{False}} to fill only 4509 simple-connected grains. I{(bool)} 4510 @return: B{C{True}} if any voids were filled at all, B{C{False}} if no change was 4511 made. 4512 4513 4514 """ 4515 return None
4516 - def UNIMPLEMENTED_waterpour( result , grains ):
4517 """ 4518 Performs the classical Vincent watershed segmentation of a data field. 4519 4520 The segmentation always results in the entire field being masked with the 4521 exception of thin (8-connectivity) lines separating the segments (grains). 4522 4523 Compared to L{DataField.grains_mark_watershed}(), this algorithm is very 4524 fast. However, when used alone, it typically results in a serious 4525 oversegmentation as each local minimum gives raise to a grain. Furthermore, 4526 the full segmentation means that also pixels which would be considered 4527 outside any grain in the topographical sense will be assigned to some 4528 catchment basin. Therefore, pre- or postprocessing is usually necessary, 4529 using the gradient image or a more sophisticated method. 4530 4531 The function does not assign pixels with value B{C{HUGE_VAL}} or larger to any 4532 segment. This can be used to pre-mark certain areas explicitly as 4533 boundaries. 4534 4535 Since the algorithm numbers the grains as a side effect, you can pass a 4536 B{C{grains}} array and get the grain numbers immediatelly, avoiding the 4537 relatively (although not drastically) expensive 4538 L{DataField.number_grains}() call. 4539 4540 Since: 2.37 4541 4542 @param result: Data field that will be filled with the resulting mask. It will be 4543 resized to the dimensions of B{C{data_field}} and its properties set 4544 accordingly. I{(L{DataField})} 4545 @param grains: Optionally, an array with the same number of items as B{C{data_field}}. 4546 If non-B{C{NULL}}, it will be filled with grain numbers in the same 4547 manner as L{DataField.number_grains}(). Pass B{C{NULL}} to ignore. I{(gint*)} 4548 @return: The number of segments (grains) in the result, excluding the 4549 separators, i.e. the same convention as in 4550 L{DataField.number_grains}() is used. 4551 4552 4553 """ 4554 return None
4555 - def mark_extrema( extrema , maxima ):
4556 return None
4557 - def hough_line( x_gradient , y_gradient , result , hwidth , overlapping ):
4558 return None
4559 - def hough_circle( x_gradient , y_gradient , result , radius ):
4560 return None
4561 - def hough_line_strenghten( x_gradient , y_gradient , hwidth , threshold ):
4562 return None
4563 - def hough_circle_strenghten( x_gradient , y_gradient , radius , threshold ):
4564 return None
4565 - def UNIMPLEMENTED_get_local_maxima_list( xdata , ydata , zdata , ndata , skip , threshold , subpixel ):
4566 return None
4567 - def hough_polar_line_to_datafield( rho , theta , px1 , px2 , py1 , py2 ):
4568 return None
4569 - def a_1dfft( iin , rout , iout , orientation , windowing , direction , interpolation , preserverms , level ):
4570 """ 4571 Transforms all rows or columns in a data field with Fast Fourier Transform. 4572 4573 If requested a windowing and/or leveling is applied to preprocess data to 4574 obtain reasonable results. 4575 4576 @param iin: Imaginary input data field. It can be B{C{NULL}} for real-to-complex 4577 transform which can be somewhat faster than complex-to-complex 4578 transform. I{(L{DataField})} 4579 @param rout: Real output data field, it will be resized to area size. I{(L{DataField})} 4580 @param iout: Imaginary output data field, it will be resized to area size. I{(L{DataField})} 4581 @param orientation: Orientation: pass B{C{ORIENTATION_HORIZONTAL}} to 4582 transform rows, B{C{ORIENTATION_VERTICAL}} to transform 4583 columns. I{(Orientation)} 4584 @param windowing: Windowing type. I{(WindowingType)} 4585 @param direction: FFT direction. I{(TransformDirection)} 4586 @param interpolation: Interpolation type. 4587 Ignored since 2.8 as no resampling is performed. I{(InterpolationType)} 4588 @param preserverms: B{C{True}} to preserve RMS while windowing. I{(bool)} 4589 @param level: 0 to perform no leveling, 1 to subtract mean value, 2 to subtract 4590 line (the number can be interpreted as the first polynomial degree 4591 to keep, but only the enumerated three values are available). I{(int)} 4592 @return: 4593 """ 4594 return None
4595 - def area_1dfft( iin , rout , iout , col , row , width , height , orientation , windowing , direction , interpolation , preserverms , level ):
4596 """ 4597 Transforms all rows or columns in a rectangular part of a data field with 4598 Fast Fourier Transform. 4599 4600 If requested a windowing and/or leveling is applied to preprocess data to 4601 obtain reasonable results. 4602 4603 @param iin: Imaginary input data field. It can be B{C{NULL}} for real-to-complex 4604 transform which can be somewhat faster than complex-to-complex 4605 transform. I{(L{DataField})} 4606 @param rout: Real output data field, it will be resized to area size. I{(L{DataField})} 4607 @param iout: Imaginary output data field, it will be resized to area size. I{(L{DataField})} 4608 @param col: Upper-left column coordinate. I{(int)} 4609 @param row: Upper-left row coordinate. I{(int)} 4610 @param width: Area width (number of columns), must be at least 2 for horizontal 4611 transforms. I{(int)} 4612 @param height: Area height (number of rows), must be at least 2 for vertical 4613 transforms. I{(int)} 4614 @param orientation: Orientation: pass B{C{ORIENTATION_HORIZONTAL}} to 4615 transform rows, B{C{ORIENTATION_VERTICAL}} to transform 4616 columns. I{(Orientation)} 4617 @param windowing: Windowing type. I{(WindowingType)} 4618 @param direction: FFT direction. I{(TransformDirection)} 4619 @param interpolation: Interpolation type. 4620 Ignored since 2.8 as no resampling is performed. I{(InterpolationType)} 4621 @param preserverms: B{C{True}} to preserve RMS while windowing. I{(bool)} 4622 @param level: 0 to perform no leveling, 1 to subtract mean value, 2 to subtract 4623 lines (the number can be interpreted as the first polynomial degree 4624 to keep, but only the enumerated three values are available). I{(int)} 4625 @return: 4626 """ 4627 return None
4628 - def a_1dfft_raw( iin , rout , iout , orientation , direction ):
4629 """ 4630 Transforms all rows or columns in a data field with Fast Fourier Transform. 4631 4632 No leveling, windowing nor scaling is performed. 4633 4634 Since 2.8 the dimensions need not to be from the set of sizes returned 4635 by L{gwy_fft_find_nice_size}(). 4636 4637 Since: 2.1 4638 4639 @param iin: Imaginary input data field. It can be B{C{NULL}} for real-to-complex 4640 transform. I{(L{DataField})} 4641 @param rout: Real output data field, it will be resized to B{C{rin}} size. I{(L{DataField})} 4642 @param iout: Imaginary output data field, it will be resized to B{C{rin}} size. I{(L{DataField})} 4643 @param orientation: Orientation: pass B{C{ORIENTATION_HORIZONTAL}} to 4644 transform rows, B{C{ORIENTATION_VERTICAL}} to transform 4645 columns. I{(Orientation)} 4646 @param direction: FFT direction. I{(TransformDirection)} 4647 @return: 4648 """ 4649 return None
4650 - def a_2dfft( iin , rout , iout , windowing , direction , interpolation , preserverms , level ):
4651 """ 4652 Calculates 2D Fast Fourier Transform of a rectangular a data field. 4653 4654 If requested a windowing and/or leveling is applied to preprocess data to 4655 obtain reasonable results. 4656 4657 Lateral dimensions, offsets and units are unchanged. See 4658 L{DataField.fft_postprocess}() for that. 4659 4660 @param iin: Imaginary input data field. It can be B{C{NULL}} for real-to-complex 4661 transform which can be somewhat faster than complex-to-complex 4662 transform. I{(L{DataField})} 4663 @param rout: Real output data field, it will be resized to area size. I{(L{DataField})} 4664 @param iout: Imaginary output data field, it will be resized to area size. I{(L{DataField})} 4665 @param windowing: Windowing type. I{(WindowingType)} 4666 @param direction: FFT direction. I{(TransformDirection)} 4667 @param interpolation: Interpolation type. I{(InterpolationType)} 4668 @param preserverms: B{C{True}} to preserve RMS while windowing. I{(bool)} 4669 @param level: 0 to perform no leveling, 1 to subtract mean value, 2 to subtract 4670 plane (the number can be interpreted as the first polynomial degree 4671 to keep, but only the enumerated three values are available). I{(int)} 4672 @return: 4673 """ 4674 return None
4675 - def area_2dfft( iin , rout , iout , col , row , width , height , windowing , direction , interpolation , preserverms , level ):
4676 """ 4677 Calculates 2D Fast Fourier Transform of a rectangular area of a data field. 4678 4679 If requested a windowing and/or leveling is applied to preprocess data to 4680 obtain reasonable results. 4681 4682 @param iin: Imaginary input data field. It can be B{C{NULL}} for real-to-complex 4683 transform which can be somewhat faster than complex-to-complex 4684 transform. I{(L{DataField})} 4685 @param rout: Real output data field, it will be resized to area size. I{(L{DataField})} 4686 @param iout: Imaginary output data field, it will be resized to area size. I{(L{DataField})} 4687 @param col: Upper-left column coordinate. I{(int)} 4688 @param row: Upper-left row coordinate. I{(int)} 4689 @param width: Area width (number of columns), must be at least 2. I{(int)} 4690 @param height: Area height (number of rows), must be at least 2. I{(int)} 4691 @param windowing: Windowing type. I{(WindowingType)} 4692 @param direction: FFT direction. I{(TransformDirection)} 4693 @param interpolation: Interpolation type. 4694 Ignored since 2.8 as no resampling is performed. I{(InterpolationType)} 4695 @param preserverms: B{C{True}} to preserve RMS while windowing. I{(bool)} 4696 @param level: 0 to perform no leveling, 1 to subtract mean value, 2 to subtract 4697 plane (the number can be interpreted as the first polynomial degree 4698 to keep, but only the enumerated three values are available). I{(int)} 4699 @return: 4700 """ 4701 return None
4702 - def a_2dfft_raw( iin , rout , iout , direction ):
4703 """ 4704 Calculates 2D Fast Fourier Transform of a data field. 4705 4706 No leveling, windowing nor scaling is performed. 4707 4708 Since 2.8 the dimensions need not to be from the set of sizes returned 4709 by L{gwy_fft_find_nice_size}(). 4710 4711 Lateral dimensions, offsets and units are unchanged. See 4712 L{DataField.fft_postprocess}() for that. 4713 4714 Since: 2.1 4715 4716 @param iin: Imaginary input data field. It can be B{C{NULL}} for real-to-complex 4717 transform. I{(L{DataField})} 4718 @param rout: Real output data field, it will be resized to B{C{rin}} size. I{(L{DataField})} 4719 @param iout: Imaginary output data field, it will be resized to B{C{rin}} size. I{(L{DataField})} 4720 @param direction: FFT direction. I{(TransformDirection)} 4721 @return: 4722 """ 4723 return None
4724 - def a_2dfft_humanize( ):
4725 """ 4726 Rearranges 2D FFT output to a human-friendly form. 4727 4728 Top-left, top-right, bottom-left and bottom-right sub-rectangles are swapped 4729 to obtain a humanized 2D FFT output with (0,0) in the centre. 4730 4731 More precisely, for even field dimensions the equally-sized blocks starting 4732 with the Nyquist frequency and with the zero frequency (constant component) 4733 will exchange places. For odd field dimensions, the block containing the 4734 zero frequency is one item larger and the constant component will actually 4735 end up in the exact centre. 4736 4737 Also note if both dimensions are even, this function is involutory and 4738 identical to L{DataField.2dfft_dehumanize}(). However, if any dimension 4739 is odd, L{DataField.2dfft_humanize}() and 4740 L{DataField.2dfft_dehumanize}() are different, therefore they must be 4741 paired properly. 4742 4743 @return: 4744 """ 4745 return None
4746 - def a_2dfft_dehumanize( ):
4747 """ 4748 Rearranges 2D FFT output back from the human-friendly form. 4749 4750 Top-left, top-right, bottom-left and bottom-right sub-rectangles are swapped 4751 to reshuffle a humanized 2D FFT output back into the natural positions. 4752 4753 See L{DataField.2dfft_humanize}() for discussion. 4754 4755 Since: 2.8 4756 4757 @return: 4758 """ 4759 return None
4760 - def fft_postprocess( humanize ):
4761 """ 4762 Updates units, dimensions and offsets for a 2D FFT-processed field. 4763 4764 The field is expected to have dimensions and units of the original 4765 direct-space data. The lateral units and resolutions are updated to 4766 correspond to its Fourier transform. 4767 4768 If B{C{humanize}} is B{C{True}} L{DataField.2dfft_humanize}() is applied to the 4769 field data and the lateral offsets are set accordingly. Otherwise the 4770 offsets are cleared. 4771 4772 Value units are kept intact. 4773 4774 Since: 2.38 4775 4776 @param humanize: B{C{True}} to rearrange data to have the frequency origin in the 4777 centre. I{(bool)} 4778 @return: 4779 """ 4780 return None
4781 - def fft_filter_1d( result_field , weights , orientation , interpolation ):
4782 """ 4783 Performs 1D FFT filtering of a data field. 4784 4785 @param result_field: A data field to store the result to. It will be resampled 4786 to B{C{data_field}}'s size. I{(L{DataField})} 4787 @param weights: Filter weights for the lower half of the spectrum (the other 4788 half is symmetric). Its size can be arbitrary, it will be 4789 interpolated. I{(L{DataLine})} 4790 @param orientation: Filter direction. I{(Orientation)} 4791 @param interpolation: The interpolation to use for resampling. I{(InterpolationType)} 4792 @return: 4793 """ 4794 return None
4795 - def UNIMPLEMENTED_cwt( interpolation , scale , wtype ):
4796 """ 4797 Computes a continuous wavelet transform (CWT) at given 4798 scale and using given wavelet. 4799 4800 @param interpolation: Interpolation type. 4801 Ignored since 2.8 as no resampling is performed. I{(InterpolationType)} 4802 @param scale: Wavelet scale. I{(float)} 4803 @param wtype: Wavelet type. I{(2DCWTWaveletType)} 4804 @return: 4805 """ 4806 return None
4807 - def area_fit_plane( mask , col , row , width , height , pa , pbx , pby ):
4808 """ 4809 Fits a plane through a rectangular part of a data field. 4810 4811 The coefficients can be used for plane leveling using the same relation 4812 as in L{DataField.fit_plane}(), counting indices from area top left 4813 corner. 4814 4815 @param mask: Mask of values to take values into account, or B{C{NULL}} for full 4816 B{C{data_field}}. Values equal to 0.0 and below cause corresponding 4817 B{C{data_field}} samples to be ignored, values equal to 1.0 and above 4818 cause inclusion of corresponding B{C{data_field}} samples. The behaviour 4819 for values inside (0.0, 1.0) is undefined (it may be specified 4820 in the future). I{(L{DataField})} 4821 @param col: Upper-left column coordinate. I{(int)} 4822 @param row: Upper-left row coordinate. I{(int)} 4823 @param width: Area width (number of columns). I{(int)} 4824 @param height: Area height (number of rows). I{(int)} 4825 @param pa: Where constant coefficient should be stored (or B{C{NULL}}). I{(float)} 4826 @param pbx: Where x plane coefficient should be stored (or B{C{NULL}}). I{(float)} 4827 @param pby: Where y plane coefficient should be stored (or B{C{NULL}}). I{(float)} 4828 @return: 4829 """ 4830 return None
4831 - def fit_plane( pa , pbx , pby ):
4832 """ 4833 Fits a plane through a data field. 4834 4835 The coefficients can be used for plane leveling using relation 4836 data[i] := data[i] - (pa + pby*i + pbx*j); 4837 4838 @param pa: Where constant coefficient should be stored (or B{C{NULL}}). I{(float)} 4839 @param pbx: Where x plane coefficient should be stored (or B{C{NULL}}). I{(float)} 4840 @param pby: Where y plane coefficient should be stored (or B{C{NULL}}). I{(float)} 4841 @return: 4842 """ 4843 return None
4844 - def UNIMPLEMENTED_fit_facet_plane( mfield , masking , pa , pbx , pby ):
4845 """ 4846 Calculates the inclination of a plane close to the dominant plane in a data 4847 field. 4848 4849 The dominant plane is determined by taking into account larger local slopes 4850 with exponentially smaller weight. 4851 4852 This is the basis of so-called facet levelling algorithm. Usually, the 4853 plane found by this method is subtracted using L{DataField.plane_level}() 4854 and the entire process is repeated until it converges. A convergence 4855 criterion may be sufficiently small values of the x and y plane 4856 coefficients. Note that since L{DataField.plane_level}() uses pixel-based 4857 lateral coordinates, the coefficients must be divided by 4858 L{DataField.get_xmeasure}(data_field) and 4859 L{DataField.get_ymeasure}(data_field) to obtain physical plane 4860 coefficients. 4861 4862 Since: 2.37 4863 4864 @param mfield: Mask specifying which values to take into account/exclude, or B{C{NULL}}. I{(L{DataField})} 4865 @param masking: Masking mode to use. I{(MaskingType)} 4866 @param pa: Where constant coefficient should be stored (or B{C{NULL}}). I{(gdouble*)} 4867 @param pbx: Where x plane coefficient should be stored. I{(gdouble*)} 4868 @param pby: Where y plane coefficient should be stored. I{(gdouble*)} 4869 @return: B{C{True}} if any plane was actually fitted; B{C{False}} if there was an 4870 insufficient number of unmasked pixels. 4871 4872 4873 """ 4874 return None
4875 - def plane_level( a , bx , by ):
4876 """ 4877 Subtracts plane from a data field. 4878 4879 See L{DataField.fit_plane}() for details. 4880 4881 @param a: Constant coefficient. I{(float)} 4882 @param bx: X plane coefficient. I{(float)} 4883 @param by: Y plane coefficient. I{(float)} 4884 @return: 4885 """ 4886 return None
4887 - def plane_rotate( xangle , yangle , interpolation ):
4888 """ 4889 Performs rotation of plane along x and y axis. 4890 4891 @param xangle: Rotation angle in x direction (rotation along y axis, in radians). I{(float)} 4892 @param yangle: Rotation angle in y direction (rotation along x axis, in radians). I{(float)} 4893 @param interpolation: Interpolation type (can be only of two-point type). I{(InterpolationType)} 4894 @return: 4895 """ 4896 return None
4897 - def fit_lines( col , row , width , height , degree , exclude , orientation ):
4898 """ 4899 Independently levels profiles on each row/column in a data field. 4900 4901 Lines that have no intersection with area selected by B{C{ulcol}}, B{C{ulrow}}, 4902 B{C{brcol}}, B{C{brrow}} are always leveled as a whole. Lines that have intersection 4903 with selected area, are leveled using polynomial coefficients computed only 4904 from data inside (or outside for B{C{exclude}} = B{C{True}}) the area. 4905 4906 @param col: Upper-left column coordinate. I{(int)} 4907 @param row: Upper-left row coordinate. I{(int)} 4908 @param width: Area width (number of columns). I{(int)} 4909 @param height: Area height (number of rows). I{(int)} 4910 @param degree: Fitted polynomial degree. I{(int)} 4911 @param exclude: If B{C{True}}, outside of area selected by B{C{ulcol}}, B{C{ulrow}}, B{C{brcol}}, 4912 B{C{brrow}} will be used for polynomial coefficients computation, 4913 instead of inside. I{(bool)} 4914 @param orientation: Line orientation. I{(Orientation)} 4915 @return: 4916 """ 4917 return None
4918 - def fit_polynom( col_degree , row_degree , coeffs ):
4919 """ 4920 Fits a two-dimensional polynomial to a data field. 4921 4922 4923 @param col_degree: Degree of polynomial to fit column-wise (x-coordinate). I{(int)} 4924 @param row_degree: Degree of polynomial to fit row-wise (y-coordinate). I{(int)} 4925 @param coeffs: An array of size (B{C{row_degree}}+1)*(B{C{col_degree}}+1) to store the 4926 coefficients to, or B{C{NULL}} (a fresh array is allocated then), 4927 see L{DataField.area_fit_polynom}() for details. I{(gdouble*)} 4928 @return: Either B{C{coeffs}} if it was not B{C{NULL}}, or a newly allocated array 4929 with coefficients. 4930 4931 """ 4932 return None
4933 - def area_fit_polynom( col , row , width , height , col_degree , row_degree , coeffs ):
4934 """ 4935 Fits a two-dimensional polynomial to a rectangular part of a data field. 4936 4937 The coefficients are stored by row into B{C{coeffs}}, like data in a datafield. 4938 Row index is y-degree, column index is x-degree. 4939 4940 Note naive x^n y^m polynomial fitting is numerically unstable, therefore 4941 this method works only up to B{C{col_degree}} = B{C{row_degree}} = 6. 4942 4943 4944 @param col: Upper-left column coordinate. I{(int)} 4945 @param row: Upper-left row coordinate. I{(int)} 4946 @param width: Area width (number of columns). I{(int)} 4947 @param height: Area height (number of rows). I{(int)} 4948 @param col_degree: Degree of polynomial to fit column-wise (x-coordinate). I{(int)} 4949 @param row_degree: Degree of polynomial to fit row-wise (y-coordinate). I{(int)} 4950 @param coeffs: An array of size (B{C{row_degree}}+1)*(B{C{col_degree}}+1) to store the 4951 coefficients to, or B{C{NULL}} (a fresh array is allocated then). I{(gdouble*)} 4952 @return: Either B{C{coeffs}} if it was not B{C{NULL}}, or a newly allocated array 4953 with coefficients. 4954 4955 """ 4956 return None
4957 - def subtract_polynom( col_degree , row_degree , coeffs ):
4958 """ 4959 Subtracts a two-dimensional polynomial from a data field. 4960 4961 @param col_degree: Degree of polynomial to subtract column-wise (x-coordinate). I{(int)} 4962 @param row_degree: Degree of polynomial to subtract row-wise (y-coordinate). I{(int)} 4963 @param coeffs: An array of size (B{C{row_degree}}+1)*(B{C{col_degree}}+1) with coefficients, 4964 see L{DataField.area_fit_polynom}() for details. I{(const-gdouble*)} 4965 @return: 4966 """ 4967 return None
4968 - def area_subtract_polynom( col , row , width , height , col_degree , row_degree , coeffs ):
4969 """ 4970 Subtracts a two-dimensional polynomial from a rectangular part of a data 4971 field. 4972 4973 @param col: Upper-left column coordinate. I{(int)} 4974 @param row: Upper-left row coordinate. I{(int)} 4975 @param width: Area width (number of columns). I{(int)} 4976 @param height: Area height (number of rows). I{(int)} 4977 @param col_degree: Degree of polynomial to subtract column-wise (x-coordinate). I{(int)} 4978 @param row_degree: Degree of polynomial to subtract row-wise (y-coordinate). I{(int)} 4979 @param coeffs: An array of size (B{C{row_degree}}+1)*(B{C{col_degree}}+1) with coefficients, 4980 see L{DataField.area_fit_polynom}() for details. I{(const-gdouble*)} 4981 @return: 4982 """ 4983 return None
4984 - def UNIMPLEMENTED_fit_legendre( col_degree , row_degree , coeffs ):
4985 """ 4986 Fits two-dimensional Legendre polynomial to a data field. 4987 4988 See L{DataField.area_fit_legendre}() for details. 4989 4990 4991 @param col_degree: Degree of polynomial to fit column-wise (x-coordinate). I{(int)} 4992 @param row_degree: Degree of polynomial to fit row-wise (y-coordinate). I{(int)} 4993 @param coeffs: An array of size (B{C{row_degree}}+1)*(B{C{col_degree}}+1) to store the 4994 coefficients to, or B{C{NULL}} (a fresh array is allocated then). I{(gdouble*)} 4995 @return: Either B{C{coeffs}} if it was not B{C{NULL}}, or a newly allocated array 4996 with coefficients. 4997 4998 """ 4999 return None
5000 - def UNIMPLEMENTED_area_fit_legendre( col , row , width , height , col_degree , row_degree , coeffs ):
5001 """ 5002 Fits two-dimensional Legendre polynomial to a rectangular part of a data 5003 field. 5004 5005 The B{C{col_degree}} and B{C{row_degree}} parameters limit the maximum powers of x and 5006 y exactly as if simple powers were fitted, therefore if you do not intend to 5007 interpret contents of B{C{coeffs}} youself, the only difference is that this 5008 method is much more numerically stable. 5009 5010 The coefficients are organized exactly like in 5011 L{DataField.area_fit_polynom}(), but they are not coefficients of 5012 x^n y^m, instead they are coefficients of P_n(x) P_m(x), where P are 5013 Legendre polynomials. The polynomials are evaluated in coordinates where 5014 first row (column) corresponds to -1.0, and the last row (column) to 1.0. 5015 5016 Note the polynomials are normal Legendre polynomials that are not exactly 5017 orthogonal on a discrete point set (if their degrees are equal mod 2). 5018 5019 5020 @param col: Upper-left column coordinate. I{(int)} 5021 @param row: Upper-left row coordinate. I{(int)} 5022 @param width: Area width (number of columns). I{(int)} 5023 @param height: Area height (number of rows). I{(int)} 5024 @param col_degree: Degree of polynomial to fit column-wise (x-coordinate). I{(int)} 5025 @param row_degree: Degree of polynomial to fit row-wise (y-coordinate). I{(int)} 5026 @param coeffs: An array of size (B{C{row_degree}}+1)*(B{C{col_degree}}+1) to store the 5027 coefficients to, or B{C{NULL}} (a fresh array is allocated then). I{(gdouble*)} 5028 @return: Either B{C{coeffs}} if it was not B{C{NULL}}, or a newly allocated array 5029 with coefficients. 5030 5031 """ 5032 return None
5033 - def subtract_legendre( col_degree , row_degree , coeffs ):
5034 """ 5035 Subtracts a two-dimensional Legendre polynomial fit from a data field. 5036 5037 @param col_degree: Degree of polynomial to subtract column-wise (x-coordinate). I{(int)} 5038 @param row_degree: Degree of polynomial to subtract row-wise (y-coordinate). I{(int)} 5039 @param coeffs: An array of size (B{C{row_degree}}+1)*(B{C{col_degree}}+1) with coefficients, 5040 see L{DataField.area_fit_legendre}() for details. I{(const-gdouble*)} 5041 @return: 5042 """ 5043 return None
5044 - def area_subtract_legendre( col , row , width , height , col_degree , row_degree , coeffs ):
5045 """ 5046 Subtracts a two-dimensional Legendre polynomial fit from a rectangular part 5047 of a data field. 5048 5049 Due to the transform of coordinates to [-1,1] x [-1,1], this method can be 5050 used on an area of dimensions different than the area the coefficients were 5051 calculated for. 5052 5053 @param col: Upper-left column coordinate. I{(int)} 5054 @param row: Upper-left row coordinate. I{(int)} 5055 @param width: Area width (number of columns). I{(int)} 5056 @param height: Area height (number of rows). I{(int)} 5057 @param col_degree: Degree of polynomial to subtract column-wise (x-coordinate). I{(int)} 5058 @param row_degree: Degree of polynomial to subtract row-wise (y-coordinate). I{(int)} 5059 @param coeffs: An array of size (B{C{row_degree}}+1)*(B{C{col_degree}}+1) with coefficients, 5060 see L{DataField.area_fit_legendre}() for details. I{(const-gdouble*)} 5061 @return: 5062 """ 5063 return None
5064 - def UNIMPLEMENTED_fit_poly_max( max_degree , coeffs ):
5065 """ 5066 Fits two-dimensional polynomial with limited total degree to a data field. 5067 5068 See L{DataField.area_fit_poly_max}() for details. 5069 5070 5071 @param max_degree: Maximum total polynomial degree, that is the maximum of m+n 5072 in x^n y^m terms. I{(int)} 5073 @param coeffs: An array of size (B{C{max_degree}}+1)*(B{C{max_degree}}+2)/2 to store the 5074 coefficients to, or B{C{NULL}} (a fresh array is allocated then). I{(gdouble*)} 5075 @return: Either B{C{coeffs}} if it was not B{C{NULL}}, or a newly allocated array 5076 with coefficients. 5077 5078 """ 5079 return None
5080 - def UNIMPLEMENTED_area_fit_poly_max( col , row , width , height , max_degree , coeffs ):
5081 """ 5082 Fits two-dimensional polynomial with limited total degree to a rectangular 5083 part of a data field. 5084 5085 See L{DataField.area_fit_legendre}() for description. This function 5086 differs by limiting the total maximum degree, while 5087 L{DataField.area_fit_legendre}() limits the maximum degrees in horizontal 5088 and vertical directions independently. 5089 5090 5091 @param col: Upper-left column coordinate. I{(int)} 5092 @param row: Upper-left row coordinate. I{(int)} 5093 @param width: Area width (number of columns). I{(int)} 5094 @param height: Area height (number of rows). I{(int)} 5095 @param max_degree: Maximum total polynomial degree, that is the maximum of m+n 5096 in x^n y^m terms. I{(int)} 5097 @param coeffs: An array of size (B{C{max_degree}}+1)*(B{C{max_degree}}+2)/2 to store the 5098 coefficients to, or B{C{NULL}} (a fresh array is allocated then). I{(gdouble*)} 5099 @return: Either B{C{coeffs}} if it was not B{C{NULL}}, or a newly allocated array 5100 with coefficients. 5101 5102 """ 5103 return None
5104 - def subtract_poly_max( max_degree , coeffs ):
5105 """ 5106 Subtracts a two-dimensional polynomial with limited total degree from 5107 a data field. 5108 5109 @param max_degree: Maximum total polynomial degree, that is the maximum of m+n 5110 in x^n y^m terms. I{(int)} 5111 @param coeffs: An array of size (B{C{row_degree}}+1)*(B{C{col_degree}}+2)/2 with 5112 coefficients, see L{DataField.area_fit_poly_max}() for details. I{(const-gdouble*)} 5113 @return: 5114 """ 5115 return None
5116 - def area_subtract_poly_max( col , row , width , height , max_degree , coeffs ):
5117 """ 5118 Subtracts a two-dimensional polynomial with limited total degree from a 5119 rectangular part of a data field. 5120 5121 Due to the transform of coordinates to [-1,1] x [-1,1], this method can be 5122 used on an area of dimensions different than the area the coefficients were 5123 calculated for. 5124 5125 @param col: Upper-left column coordinate. I{(int)} 5126 @param row: Upper-left row coordinate. I{(int)} 5127 @param width: Area width (number of columns). I{(int)} 5128 @param height: Area height (number of rows). I{(int)} 5129 @param max_degree: Maximum total polynomial degree, that is the maximum of m+n 5130 in x^n y^m terms. I{(int)} 5131 @param coeffs: An array of size (B{C{row_degree}}+1)*(B{C{col_degree}}+2)/2 with 5132 coefficients, see L{DataField.area_fit_poly_max}() for details. I{(const-gdouble*)} 5133 @return: 5134 """ 5135 return None
5136 - def fit_poly( mask_field , nterms , term_powers , exclude , coeffs ):
5137 """ 5138 Fit a given set of polynomial terms to a data field. 5139 5140 Since: 2.11 5141 5142 @param mask_field: Mask of values to take values into account, or B{C{NULL}} for full 5143 B{C{data_field}}. Values equal to 0.0 and below cause corresponding 5144 B{C{data_field}} samples to be ignored, values equal to 1.0 and above 5145 cause inclusion of corresponding B{C{data_field}} samples. The behaviour 5146 for values inside (0.0, 1.0) is undefined (it may be specified 5147 in the future). I{(L{DataField})} 5148 @param nterms: The number of polynomial terms to take into account (half the 5149 number of items in B{C{term_powers}}). I{(int)} 5150 @param term_powers: Array of size 2*B{C{nterms}} describing the terms to fit. Each 5151 terms is described by a couple of powers (powerx, powery). I{(const-gint*)} 5152 @param exclude: Interpret values B{C{w}} in the mask as 1.0-B{C{w}}. I{(bool)} 5153 @param coeffs: Array of size B{C{nterms}} to store the coefficients to, or B{C{NULL}} to 5154 allocate a new array. I{(gdouble*)} 5155 @return: Either B{C{coeffs}} if it was not B{C{NULL}}, or a newly allocated array 5156 with coefficients. 5157 5158 5159 """ 5160 return None
5161 - def area_fit_poly( mask_field , col , row , width , height , nterms , term_powers , exclude , coeffs ):
5162 """ 5163 Fit a given set of polynomial terms to a rectangular part of a data field. 5164 5165 The polynomial coefficients correspond to normalized coordinates that 5166 are always from the interval [-1,1] where -1 corresponds to the left/topmost 5167 pixel and 1 corresponds to the bottom/rightmost pixel of the area. 5168 5169 Since: 2.11 5170 5171 @param mask_field: Mask of values to take values into account, or B{C{NULL}} for full 5172 B{C{data_field}}. Values equal to 0.0 and below cause corresponding 5173 B{C{data_field}} samples to be ignored, values equal to 1.0 and above 5174 cause inclusion of corresponding B{C{data_field}} samples. The behaviour 5175 for values inside (0.0, 1.0) is undefined (it may be specified 5176 in the future). I{(L{DataField})} 5177 @param col: Upper-left column coordinate. I{(int)} 5178 @param row: Upper-left row coordinate. I{(int)} 5179 @param width: Area width (number of columns). I{(int)} 5180 @param height: Area height (number of rows). I{(int)} 5181 @param nterms: The number of polynomial terms to take into account (half the 5182 number of items in B{C{term_powers}}). I{(int)} 5183 @param term_powers: Array of size 2*B{C{nterms}} describing the terms to fit. Each 5184 terms is described by a couple of powers (powerx, powery). I{(const-gint*)} 5185 @param exclude: Interpret values B{C{w}} in the mask as 1.0-B{C{w}}. I{(bool)} 5186 @param coeffs: Array of size B{C{nterms}} to store the coefficients to, or B{C{NULL}} to 5187 allocate a new array. I{(gdouble*)} 5188 @return: Either B{C{coeffs}} if it was not B{C{NULL}}, or a newly allocated array 5189 with coefficients. 5190 5191 5192 """ 5193 return None
5194 - def subtract_poly( nterms , term_powers , coeffs ):
5195 """ 5196 Subtract a given set of polynomial terms from a data field. 5197 5198 Since: 2.11 5199 5200 @param nterms: The number of polynomial terms to take into account (half the 5201 number of items in B{C{term_powers}}). I{(int)} 5202 @param term_powers: Array of size 2*B{C{nterms}} describing the fitter terms. Each 5203 terms is described by a couple of powers (powerx, powery). I{(const-gint*)} 5204 @param coeffs: Array of size B{C{nterms}} to store with the coefficients. I{(const-gdouble*)} 5205 @return: 5206 """ 5207 return None
5208 - def area_subtract_poly( col , row , width , height , nterms , term_powers , coeffs ):
5209 """ 5210 Subtract a given set of polynomial terms from a rectangular part of a data 5211 field. 5212 5213 Since: 2.11 5214 5215 @param col: Upper-left column coordinate. I{(int)} 5216 @param row: Upper-left row coordinate. I{(int)} 5217 @param width: Area width (number of columns). I{(int)} 5218 @param height: Area height (number of rows). I{(int)} 5219 @param nterms: The number of polynomial terms to take into account (half the 5220 number of items in B{C{term_powers}}). I{(int)} 5221 @param term_powers: Array of size 2*B{C{nterms}} describing the fitted terms. Each 5222 terms is described by a couple of powers (powerx, powery). I{(const-gint*)} 5223 @param coeffs: Array of size B{C{nterms}} to store with the coefficients. I{(const-gdouble*)} 5224 @return: 5225 """ 5226 return None
5227 - def UNIMPLEMENTED_area_fit_local_planes( size , col , row , width , height , nresults , types , results ):
5228 """ 5229 Fits a plane through neighbourhood of each sample in a rectangular part 5230 of a data field. 5231 5232 The sample is always in the origin of its local (x,y) coordinate system, 5233 even if the neighbourhood is not centered about it (e.g. because sample 5234 is on the edge of data field). Z-coordinate is however not centered, 5235 that is B{C{PLANE_FIT_A}} is normal mean value. 5236 5237 5238 @param size: Neighbourhood size (must be at least 2). It is centered around 5239 each pixel, unless B{C{size}} is even when it sticks to the right. I{(int)} 5240 @param col: Upper-left column coordinate. I{(int)} 5241 @param row: Upper-left row coordinate. I{(int)} 5242 @param width: Area width (number of columns). I{(int)} 5243 @param height: Area height (number of rows). I{(int)} 5244 @param nresults: The number of requested quantities. I{(int)} 5245 @param types: The types of requested quantities. I{(const-PlaneFitQuantity*)} 5246 @param results: An array to store quantities to, may be B{C{NULL}} to allocate a new 5247 one which must be freed by caller then. If any item is B{C{NULL}}, 5248 a new data field is allocated for it, existing data fields 5249 are resized to B{C{width}} x B{C{height}}. I{(DataField**)} 5250 @return: An array of data fields with requested quantities, that is 5251 B{C{results}} unless it was B{C{NULL}} and a new array was allocated. 5252 5253 """ 5254 return None
5255 - def area_local_plane_quantity( size , col , row , width , height , type , result ):
5256 """ 5257 Convenience function to get just one quantity from 5258 L{DataField.area_fit_local_planes}(). 5259 5260 5261 @param size: Neighbourhood size. I{(int)} 5262 @param col: Upper-left column coordinate. I{(int)} 5263 @param row: Upper-left row coordinate. I{(int)} 5264 @param width: Area width (number of columns). I{(int)} 5265 @param height: Area height (number of rows). I{(int)} 5266 @param type: The type of requested quantity. I{(PlaneFitQuantity)} 5267 @param result: A data field to store result to, or B{C{NULL}} to allocate a new one. I{(L{DataField})} 5268 @return: B{C{result}} if it isn't B{C{NULL}}, otherwise a newly allocated data field. 5269 5270 """ 5271 return None
5272 - def UNIMPLEMENTED_fit_local_planes( size , nresults , types , results ):
5273 """ 5274 Fits a plane through neighbourhood of each sample in a data field. 5275 5276 See L{DataField.area_fit_local_planes}() for details. 5277 5278 5279 @param size: Neighbourhood size. I{(int)} 5280 @param nresults: The number of requested quantities. I{(int)} 5281 @param types: The types of requested quantities. I{(const-PlaneFitQuantity*)} 5282 @param results: An array to store quantities to. I{(DataField**)} 5283 @return: An array of data fields with requested quantities. 5284 5285 """ 5286 return None
5287 - def local_plane_quantity( size , type , result ):
5288 """ 5289 Convenience function to get just one quantity from 5290 L{DataField.fit_local_planes}(). 5291 5292 5293 @param size: Neighbourhood size. I{(int)} 5294 @param type: The type of requested quantity. I{(PlaneFitQuantity)} 5295 @param result: A data field to store result to, or B{C{NULL}} to allocate a new one. I{(L{DataField})} 5296 @return: B{C{result}} if it isn't B{C{NULL}}, otherwise a newly allocated data field. 5297 5298 """ 5299 return None
5300 - def get_max( ):
5301 """ 5302 Finds the maximum value of a data field. 5303 5304 This quantity is cached. 5305 5306 5307 @return: The maximum value. 5308 5309 """ 5310 return None
5311 - def get_min( ):
5312 """ 5313 Finds the minimum value of a data field. 5314 5315 This quantity is cached. 5316 5317 5318 @return: The minimum value. 5319 5320 """ 5321 return None
5322 - def get_min_max( min , max ):
5323 """ 5324 Finds minimum and maximum values of a data field. 5325 5326 @param min: Location to store minimum to. I{(float)} 5327 @param max: Location to store maximum to. I{(float)} 5328 @return: 5329 """ 5330 return None
5331 - def get_avg( ):
5332 """ 5333 Computes average value of a data field. 5334 5335 This quantity is cached. 5336 5337 5338 @return: The average value. 5339 5340 """ 5341 return None
5342 - def get_rms( ):
5343 """ 5344 Computes root mean square value of a data field. 5345 5346 This quantity is cached. 5347 5348 5349 @return: The root mean square value. 5350 5351 """ 5352 return None
5353 - def get_sum( ):
5354 """ 5355 Sums all values in a data field. 5356 5357 This quantity is cached. 5358 5359 5360 @return: The sum of all values. 5361 5362 """ 5363 return None
5364 - def get_median( ):
5365 """ 5366 Computes median value of a data field. 5367 5368 This quantity is cached. 5369 5370 5371 @return: The median value. 5372 5373 """ 5374 return None
5375 - def get_surface_area( ):
5376 """ 5377 Computes surface area of a data field. 5378 5379 This quantity is cached. 5380 5381 5382 @return: The surface area. 5383 5384 """ 5385 return None
5386 - def get_variation( ):
5387 """ 5388 Computes the total variation of a data field. 5389 5390 See L{DataField.area_get_variation}() for the definition. 5391 5392 This quantity is cached. 5393 5394 Since: 2.38 5395 5396 @return: The variation. 5397 5398 5399 """ 5400 return None
5401 - def get_entropy( ):
5402 """ 5403 Computes the entropy of a data field. 5404 5405 See L{DataField.area_get_entropy}() for the definition. 5406 5407 This quantity is cached. 5408 5409 Since: 2.42 5410 5411 @return: The value distribution entropy. 5412 5413 5414 """ 5415 return None
5416 - def get_entropy_2d( yfield ):
5417 """ 5418 Computes the entropy of a two-dimensional point cloud. 5419 5420 Each pair of corresponding B{C{xfield}} and B{C{yfield}} pixels is assumed to 5421 represent the coordinates (B{C{x}},B{C{y}}) of a point in plane. Hence they must have 5422 the same dimensions. 5423 5424 Since: 2.44 5425 5426 @param yfield: A data field containing the B{C{y}}-coordinates. I{(L{DataField})} 5427 @return: The two-dimensional distribution entropy. 5428 5429 5430 """ 5431 return None
5432 - def area_get_max( mask , col , row , width , height ):
5433 """ 5434 Finds the maximum value in a rectangular part of a data field. 5435 5436 5437 @param mask: Mask specifying which values to take into account/exclude, or B{C{NULL}}. I{(L{DataField})} 5438 @param col: Upper-left column coordinate. I{(int)} 5439 @param row: Upper-left row coordinate. I{(int)} 5440 @param width: Area width (number of columns). I{(int)} 5441 @param height: Area height (number of rows). I{(int)} 5442 @return: The maximum value. When the number of samples to calculate 5443 maximum of is zero, -B{C{G_MAXDOUBLE}} is returned. 5444 5445 """ 5446 return None
5447 - def area_get_min( mask , col , row , width , height ):
5448 """ 5449 Finds the minimum value in a rectangular part of a data field. 5450 5451 5452 @param mask: Mask specifying which values to take into account/exclude, or B{C{NULL}}. I{(L{DataField})} 5453 @param col: Upper-left column coordinate. I{(int)} 5454 @param row: Upper-left row coordinate. I{(int)} 5455 @param width: Area width (number of columns). I{(int)} 5456 @param height: Area height (number of rows). I{(int)} 5457 @return: The minimum value. When the number of samples to calculate 5458 minimum of is zero, -B{C{G_MAXDOUBLE}} is returned. 5459 5460 """ 5461 return None
5462 - def UNIMPLEMENTED_area_get_min_max( mask , col , row