_overlaps_common
Functions to identify overlaps between regions, not related to table specs.
_is_overlapping_1D_int(line1, line2)
¶
Given two integer intervals, find whether they overlap
This is the same as is_overlapping_1D
(based on
https://stackoverflow.com/a/70023212/19085332), for integer-valued
intervals.
PARAMETER | DESCRIPTION |
---|---|
line1 |
The boundaries of the first interval , written as
|
line2 |
The boundaries of the second interval , written as
|
Source code in fractal_tasks_core/roi/_overlaps_common.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
|
_is_overlapping_3D_int(box1, box2)
¶
Given two three-dimensional integer boxes, find whether they overlap.
This is the same as is_overlapping_3D (based on https://stackoverflow.com/a/70023212/19085332), for integer-valued boxes.
PARAMETER | DESCRIPTION |
---|---|
box1 |
The boundaries of the first box, written as
|
box2 |
The boundaries of the second box, written as
|
Source code in fractal_tasks_core/roi/_overlaps_common.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
|
is_overlapping_1D(line1, line2, tol=1e-10)
¶
Given two intervals, finds whether they overlap.
This is based on https://stackoverflow.com/a/70023212/19085332, and we additionally use a finite tolerance for floating-point comparisons.
PARAMETER | DESCRIPTION |
---|---|
line1 |
The boundaries of the first interval, written as
|
line2 |
The boundaries of the second interval, written as
|
tol |
Finite tolerance for floating-point comparisons.
TYPE:
|
Source code in fractal_tasks_core/roi/_overlaps_common.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|
is_overlapping_2D(box1, box2, tol=1e-10)
¶
Given two rectangular boxes, finds whether they overlap.
This is based on https://stackoverflow.com/a/70023212/19085332, and we additionally use a finite tolerance for floating-point comparisons.
PARAMETER | DESCRIPTION |
---|---|
box1 |
The boundaries of the first rectangle, written as
|
box2 |
The boundaries of the second rectangle, written as
|
tol |
Finite tolerance for floating-point comparisons.
TYPE:
|
Source code in fractal_tasks_core/roi/_overlaps_common.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|
is_overlapping_3D(box1, box2, tol=1e-10)
¶
Given two three-dimensional boxes, finds whether they overlap.
This is based on https://stackoverflow.com/a/70023212/19085332, and we additionally use a finite tolerance for floating-point comparisons.
PARAMETER | DESCRIPTION |
---|---|
box1 |
The boundaries of the first box, written as
|
box2 |
The boundaries of the second box, written as
|
tol |
Finite tolerance for floating-point comparisons.
TYPE:
|
Source code in fractal_tasks_core/roi/_overlaps_common.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|