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

Source Code for Module gwy

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