Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yaoyuping
nnDetection
Commits
197bd815
Commit
197bd815
authored
May 21, 2021
by
mibaumgartner
Browse files
adds paths to full check
parent
be13f9f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
nndet/utils/check.py
nndet/utils/check.py
+10
-4
No files found.
nndet/utils/check.py
View file @
197bd815
...
@@ -191,7 +191,10 @@ def check_data_and_label_splitted(
...
@@ -191,7 +191,10 @@ def check_data_and_label_splitted(
print
(
"Data and label check complete."
)
print
(
"Data and label check complete."
)
def
_full_check
(
case_paths
:
List
[
Path
],
mask_info_path
:
Optional
[
Path
]
=
None
)
->
None
:
def
_full_check
(
case_paths
:
List
[
Path
],
mask_info_path
:
Optional
[
Path
]
=
None
,
)
->
None
:
"""
"""
Performas itk and instance chekcs on provided paths
Performas itk and instance chekcs on provided paths
...
@@ -220,13 +223,16 @@ def _full_check(case_paths: List[Path], mask_info_path: Optional[Path] = None) -
...
@@ -220,13 +223,16 @@ def _full_check(case_paths: List[Path], mask_info_path: Optional[Path] = None) -
for
mi
in
mask_instances
:
for
mi
in
mask_instances
:
if
not
mi
in
info_instances
:
if
not
mi
in
info_instances
:
raise
ValueError
(
f
"Found instance ID
{
mi
}
in mask which is "
raise
ValueError
(
f
"Found instance ID
{
mi
}
in mask which is "
f
"not present in info
{
info_instances
}
"
)
f
"not present in info
{
info_instances
}
in
{
mask_info_path
}
"
)
if
not
len
(
info_instances
)
==
len
(
mask_instances
):
if
not
len
(
info_instances
)
==
len
(
mask_instances
):
raise
ValueError
(
"Found instances in info which are not present in mask: "
raise
ValueError
(
"Found instances in info which are not present in mask: "
f
"mask:
{
mask_instances
}
info
{
info_instances
}
"
)
f
"mask:
{
mask_instances
}
info
{
info_instances
}
in
{
mask_info_path
}
"
)
def
_check_itk_params
(
img_seq
:
Sequence
[
sitk
.
Image
],
paths
:
Sequence
[
Path
])
->
None
:
def
_check_itk_params
(
img_seq
:
Sequence
[
sitk
.
Image
],
paths
:
Sequence
[
Path
],
)
->
None
:
"""
"""
Check Dimension, Origin, Direction and Spacing of a Sequence of images
Check Dimension, Origin, Direction and Spacing of a Sequence of images
...
...
Write
Preview
Markdown
is supported
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