Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fets data prep helper #6

Merged
merged 70 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
e59606f
Implement monitor dset tool
aristizabal95 Sep 21, 2023
42420ac
Show local path. Highlight changes
aristizabal95 Sep 21, 2023
ca7d97e
Focus on prompt when created
aristizabal95 Sep 21, 2023
0d9c21c
Add highlight colors
aristizabal95 Sep 22, 2023
7a543d3
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Sep 22, 2023
f036f8d
Merge branch 'fets-data-prep-helper' of https://github.com/aristizaba…
aristizabal95 Sep 22, 2023
c0431bc
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Sep 22, 2023
0248658
Store previous highlights
aristizabal95 Sep 22, 2023
9a3bada
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Sep 25, 2023
2a727cb
Merge branch 'fets-data-prep-helper' of https://github.com/aristizaba…
aristizabal95 Sep 25, 2023
2138f9c
Add button for copying text
aristizabal95 Sep 26, 2023
d4e1a70
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Sep 26, 2023
0d5edb0
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Sep 26, 2023
1fcb522
Add option to compress review items
aristizabal95 Sep 27, 2023
509eb2a
Implement manual review helpers
aristizabal95 Sep 28, 2023
7fec124
Improve overflow cases
aristizabal95 Sep 28, 2023
0eecb82
Handle review edge case
aristizabal95 Sep 28, 2023
ac8634c
Fix extrat reviewed case to correct path
aristizabal95 Sep 29, 2023
c52c6bb
Fix dataset create getting stuck by signal
aristizabal95 Oct 2, 2023
0e9b01a
remove unused imports
aristizabal95 Oct 2, 2023
0b6866f
Handle edge cases with copy mechanism
aristizabal95 Oct 2, 2023
0c2f404
Only update report if not empty
aristizabal95 Oct 2, 2023
e8bf6e9
Fix monitoring tool updating on subject num change
aristizabal95 Oct 2, 2023
ed0b79d
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Oct 4, 2023
50671e7
Remove forced copy exception. Package images
aristizabal95 Oct 4, 2023
03b16db
Fix monitoring tool displaying the wrong labels path
aristizabal95 Oct 4, 2023
03e6c4f
Make problem-specific changes more explicit
aristizabal95 Oct 4, 2023
298a4df
Fix report watchdog breaking for unusable report
aristizabal95 Oct 4, 2023
e499813
Remove unnecessary comment
aristizabal95 Oct 4, 2023
6a56d9a
Remove realpath dependency
aristizabal95 Oct 4, 2023
f9317e2
Fix wrong logs path displayed
aristizabal95 Oct 6, 2023
63ed745
Handle cases where report_dict is None
aristizabal95 Oct 6, 2023
316b2a1
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Oct 19, 2023
e7cae1a
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Oct 20, 2023
fefb6c4
Fix typo
aristizabal95 Oct 20, 2023
a9762f0
Decouple report submission from generation
aristizabal95 Oct 23, 2023
a9a0afe
Display instructions md. Better reviewed handling
aristizabal95 Oct 24, 2023
270e2db
Handle scenario where partial_report is None
aristizabal95 Oct 31, 2023
77ddd08
Allow multiple read attempts for partial report
aristizabal95 Nov 1, 2023
ae9fd1f
Add brain mask to review tarball
aristizabal95 Nov 3, 2023
c0573f0
use finalized folder for review cases
aristizabal95 Nov 3, 2023
70acf75
move finalized cases to finalized folder
aristizabal95 Nov 3, 2023
40aeab8
Handle permission issues when deleting files
aristizabal95 Nov 7, 2023
666cc4b
Implement TUI for review automation
aristizabal95 Nov 8, 2023
8cbb3e7
Pass label instead of segmentation file
aristizabal95 Nov 8, 2023
b5e8760
Add labels file
aristizabal95 Nov 9, 2023
80c33a4
Stop itk-snap from printint to console
aristizabal95 Nov 9, 2023
a9db77e
Add styles to buttons
aristizabal95 Nov 9, 2023
e8b1d04
Merge pull request #3 from aristizabal95/itk-snap-automation
aristizabal95 Nov 9, 2023
79172c7
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Nov 14, 2023
4ecd0e2
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Nov 14, 2023
47a3185
Remove stages from config
aristizabal95 Nov 14, 2023
39b1ed4
Use stages file on monitoring tool
aristizabal95 Nov 14, 2023
5cd4037
Improve manual_review instructions
aristizabal95 Nov 14, 2023
a2adb60
improve multiple annotations instructions
aristizabal95 Nov 14, 2023
c328abb
Improved Exact match instructions
aristizabal95 Nov 14, 2023
d36af00
Allow for corrections until done
aristizabal95 Nov 14, 2023
4700594
Fix mark as finalized not working
aristizabal95 Nov 16, 2023
8190b4b
Add unhandled error stages
aristizabal95 Nov 16, 2023
166779c
Ignore tarball files created by monitoring tool
aristizabal95 Nov 21, 2023
1bb3c64
Add out parameter for outputing csv files
aristizabal95 Nov 22, 2023
ce9819e
Fix tarball workflow. Add brainmask button
aristizabal95 Nov 28, 2023
7a92d41
Add documentation about brian mask corrections
aristizabal95 Nov 28, 2023
49a9b46
Handle special rollback scenarios
aristizabal95 Nov 30, 2023
eda88f7
Remove unused code
aristizabal95 Dec 6, 2023
ecafd94
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Dec 6, 2023
560cd88
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Dec 6, 2023
48e10b7
Update stages file
aristizabal95 Dec 8, 2023
4e1363b
add input files to tarball
aristizabal95 Dec 11, 2023
52448fa
Merge branch 'data-prep-manual-steps' of https://github.com/aristizab…
aristizabal95 Dec 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cli/medperf/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
test_report_file = "test_report.yaml"
cube_filename = "mlcube.yaml"
params_filename = "parameters.yaml"
stages_filename = "stages.yaml"
additional_path = "workspace/additional_files"
tarball_filename = "tmp.tar.gz"
image_path = "workspace/.image"
Expand Down
3 changes: 1 addition & 2 deletions cli/medperf/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ def wrapper(*args, **kwargs):
config.ui.print(str(e))
except MedperfException as e:
logging.exception(e)
logs_path = storage_path(config.logs_storage)
log_filepath = os.path.join(logs_path, config.log_file)
log_filepath = storage_path(config.log_file)
additional_msg = f"For more information, check the logs at: {log_filepath}"
msg = ". ".join([str(e), additional_msg])
pretty_error(msg)
Expand Down
2 changes: 1 addition & 1 deletion cli/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
typer~=0.6.0
rich~=12.5.0
rich>=12.5.0
PyYAML>6
requests>=2.26.0
pydantic==1.10.2
Expand Down
21 changes: 21 additions & 0 deletions scripts/assets/brainmask.label
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
################################################
# ITK-SnAP Label Description File
# File format:
# IDX -R- -G- -B- -A-- VIS MSH LABEL
# Fields:
# IDX: Zero-based index
# -R-: Red color component (0..255)
# -G-: Green color component (0..255)
# -B-: Blue color component (0..255)
# -A-: Label transparency (0.00 .. 1.00)
# VIS: Label visibility (0 or 1)
# IDX: Label mesh visibility (0 or 1)
# LABEL: Label description
################################################
0 0 0 0 0 0 0 "Background"
1 255 0 0 1 1 1 "Brain Mask"
2 0 255 0 1 1 1 "Label 2"
3 0 0 255 1 1 1 "Label 3"
4 255 255 0 1 1 1 "Label 4"
5 0 255 255 1 1 1 "Label 5"
6 255 0 255 1 1 1 "Label 6"
13 changes: 13 additions & 0 deletions scripts/assets/list_view.tcss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Screen {
align: center middle;
}

ListView {
width: 30;
height: auto;
margin: 2 2;
}

Label {
padding: 1 2;
}
152 changes: 152 additions & 0 deletions scripts/assets/monitor-dset.tcss
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
Screen {
background: $surface-darken-3;
align: center middle;
layers: base dialog;
}

#list-container {
width: 25%;
height: 100%;
dock: left;
background: $primary-background-darken-1
}

ListItem {
padding: 1;
}

#subjects-list {
height: 100%;
}

SubjectDetails {
display: none;
padding: 1 3 1 3;
align: center middle;
content-align: center middle;
align: center middle;
}

#subject-title {
margin: 1;
text-style: bold;
# background: $primary-background-darken-1;
}

#subject-title Static {
text-align: center;
padding: 1;
}

SubjectDetails #review-buttons {
margin: 0 5;
}

SubjectDetails #review-buttons Static {
text-align: center;
}

.warning {
border: tall $warning;
}

SubjectDetails Button {
text-align: center;
width: 100%;
margin: 1;
}

#subject-status {
color: $accent-lighten-3;
}

.subject-item-label {
text-style: bold;
width: auto;
color: $panel-lighten-2;
column-span: 2;
}

.subject-item-content {
column-span: 8;
overflow: scroll;
}

.subject-item-copy {
column-span: 2;
}

SubjectDetails {
overflow-y: scroll;
height: 100%;
}

SubjectDetails CopyableItem {
layout: grid;
grid-size: 12 1;
grid-columns: 1fr;
grid-gutter: 1;
margin: 1;
height: auto;
}

Button.prompt-btn {
margin: 1;
}

#confirm-prompt {
layer: dialog;
align: center middle;
width: 30%;
height: auto;
background: $primary-background-lighten-1;
content-align: center middle;
}

#confirm-details {
content-align: center middle;
padding: 1 0 1 0;
height: auto;
}

#confirm-buttons {
padding: 0 1 0 0;
height: auto;
}

#confirm-approve {
width: 50%;
}

#confirm-deny {
width: 50%;
}

Summary {
padding: 3;
align: center middle;
content-align: center middle;
overflow-y: scroll;
}

Summary Static {
text-align: center;
text-style: bold;
}

#summary-content {
margin: 3 0 1 0;
}

Center.pbar {
height: auto;
}

ListItem.highlight {
background: $secondary-lighten-3;
}

MarkdownViewer {
height: auto;
min-height: 2;
}
21 changes: 21 additions & 0 deletions scripts/assets/postop_gbm.label
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
################################################
# ITK-SnAP Label Description File
# File format:
# IDX -R- -G- -B- -A-- VIS MSH LABEL
# Fields:
# IDX: Zero-based index
# -R-: Red color component (0..255)
# -G-: Green color component (0..255)
# -B-: Blue color component (0..255)
# -A-: Label transparency (0.00 .. 1.00)
# VIS: Label visibility (0 or 1)
# IDX: Label mesh visibility (0 or 1)
# LABEL: Label description
################################################
0 0 0 0 0 0 0 "Background"
1 255 0 0 1 1 1 "Necrotic Tumor Core"
2 0 255 0 1 1 1 "Tumor Infiltration & Edema"
3 0 0 255 1 1 1 "Enhancing Tumor Core"
4 255 255 0 1 1 1 "Resection Cavity"
5 0 255 255 1 1 1 "Label 5"
6 255 0 255 1 1 1 "Label 6"
Loading
Loading