@@ -523,7 +523,7 @@ def export_classes(classes: list[str]) -> None:
523
523
fps = list (output_fp .rglob ("*.dcm" ))
524
524
session_classes = classes
525
525
session_classes .remove ("background" )
526
- session_fp = Path ("./tmp/session-data/session.json" )
526
+ session_fp = Path ("./tmp/session-data/clean/de-identified-files/ session.json" )
527
527
with session_fp .open () as file :
528
528
session_file = json .load (file )
529
529
for entry_key in session_file :
@@ -603,7 +603,7 @@ async def align_classes(classes: list[str]) -> None:
603
603
604
604
@app .post ("/session" , name = "session" )
605
605
async def handle_session_button_click (session_dict : dict [str , Any ]) -> None :
606
- session_fp = Path ("./tmp/session-data/session.json" )
606
+ session_fp = Path ("./tmp/session-data/clean/de-identified-files/ session.json" )
607
607
with session_fp .open ("w" ) as file :
608
608
json .dump (session_dict , file )
609
609
@@ -1088,7 +1088,7 @@ def export_session(
1088
1088
self , # noqa: ANN101
1089
1089
session : dict [str , dict [str , str ]],
1090
1090
) -> None :
1091
- session_fp = Path (self . clean_data_dp + " /session.json" )
1091
+ session_fp = Path ("./tmp/session-data/clean/de-identified-files /session.json" )
1092
1092
with session_fp .open ("w" ) as file :
1093
1093
json .dump (session , file )
1094
1094
@@ -1111,7 +1111,7 @@ def dicom_deidentifier( # noqa: PLR0912, PLR0915
1111
1111
if session_filepath is None or not Path (session_filepath ).is_file ():
1112
1112
session = {}
1113
1113
else :
1114
- with Path ("./tmp/session-data/session.json" ).open () as file :
1114
+ with Path ("./tmp/session-data/clean/de-identified-files/ session.json" ).open () as file :
1115
1115
session = json .load (file )
1116
1116
if Path ("./tmp/session-data/user-options.json" ).is_file ():
1117
1117
with Path ("./tmp/session-data/user-options.json" ).open () as file :
@@ -1212,9 +1212,9 @@ async def handle_submit_button_click(user_options: UserOptionsClass) -> list[Any
1212
1212
with user_fp .open ("w" ) as file :
1213
1213
json .dump (user_options , file )
1214
1214
session , dicom_pair_fps = dicom_deidentifier (
1215
- session_filepath = "./tmp/session-data/session.json" ,
1215
+ session_filepath = "./tmp/session-data/clean/de-identified-files/ session.json" ,
1216
1216
)
1217
- session_fp = Path ("./tmp/session-data/session.json" )
1217
+ session_fp = Path ("./tmp/session-data/clean/de-identified-files/ session.json" )
1218
1218
with session_fp .open ("w" ) as file :
1219
1219
json .dump (session , file )
1220
1220
if user_options ["annotation" ]: # type: ignore[index]
0 commit comments