Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pierre-Alexandre Broux
s4dl
Commits
4eeb5d83
Commit
4eeb5d83
authored
Mar 26, 2019
by
Sulfyderz
Browse files
[Error Update]:Correcting useless boundary create action.
parent
73ff7c22
Changes
1
Hide whitespace changes
Inline
Side-by-side
s4dl/Show.py
View file @
4eeb5d83
...
...
@@ -3979,10 +3979,13 @@ class Show(object):
for
z
in
listHypRefSegment
:
# on coupe si frontiere pas ok pour rester que dans le segment de reference
if
z
[
'stop'
]
>
(
valueRef
[
'stop'
]
+
tolerance
):
actionsSegmentationBoundaryCreateThr
.
append
(
copy
.
deepcopy
([
z
,
valueRef
[
'stop'
]]))
if
actionsIncremental
:
actionsIncrementalSegmentationBoundaryCreateThrTurn
.
append
(
copy
.
deepcopy
([
z
,
valueRef
[
'stop'
]]))
valueTmp
=
DiarTools
.
splitSegment
(
z
,
valueTmp
,
valueRef
[
'stop'
])
#NEW LALA
if
not
z
[
'start'
]
>=
(
valueRef
[
'stop'
]
-
tolerance
):
#NEW LALA
actionsSegmentationBoundaryCreateThr
.
append
(
copy
.
deepcopy
([
z
,
valueRef
[
'stop'
]]))
if
actionsIncremental
:
actionsIncrementalSegmentationBoundaryCreateThrTurn
.
append
(
copy
.
deepcopy
([
z
,
valueRef
[
'stop'
]]))
valueTmp
=
DiarTools
.
splitSegment
(
z
,
valueTmp
,
valueRef
[
'stop'
])
# Enleve les segments compris dans la marge tolérance (+ ou - tolérance)
if
tolerance
!=
0
:
...
...
@@ -4064,7 +4067,10 @@ class Show(object):
if
tolerance
==
0
:
listHypRefSegment
.
append
(
y
)
elif
tolerance
!=
0
and
y
[
'start'
]
>=
(
valueRef
[
'start'
]
-
tolerance
):
listHypRefSegment
.
append
(
y
)
#NEW LALA
if
not
y
[
'start'
]
>=
(
valueRef
[
'stop'
]
-
tolerance
):
#NEW LALA
listHypRefSegment
.
append
(
y
)
# fusionne entre eux si >1
...
...
@@ -4111,7 +4117,10 @@ class Show(object):
if
tolerance
==
0
:
listIndexHypRefSegment
.
append
(
idx
)
elif
tolerance
!=
0
and
y
[
'start'
]
>=
(
valueRef
[
'start'
]
-
tolerance
):
listIndexHypRefSegment
.
append
(
idx
)
#NEW LALA
if
not
y
[
'start'
]
>=
(
valueRef
[
'stop'
]
-
tolerance
):
#NEW LALA
listIndexHypRefSegment
.
append
(
idx
)
for
idx
,
z
in
enumerate
(
listIndexHypRefSegment
):
# partie affectation
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment