File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Tutorials/STC-SEG-103_AIBasedSegmentationIn3DSlicer Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -105,16 +105,18 @@ def test_Slicer4Minute1(self):
105105 if not os .path .exists (zip_path ):
106106 urllib .request .urlretrieve (zip_url , zip_path )
107107
108- # Extrair ZIP se não estiver extraído
109- if not os .path .exists (extract_path ):
110- with zipfile .ZipFile (zip_path , 'r' ) as zip_ref :
111- zip_ref .extractall (slicer .app .temporaryPath )
112-
113108 # Carregar os volumes
114109 prostate_folder = os .path .join (extract_path , "dataset3_ProstateMRI" )
115110 adc_path = os .path .join (prostate_folder , "msd-prostate-01-adc.nrrd" )
116111 t2_path = os .path .join (prostate_folder , "msd-prostate-01-t2.nrrd" )
117112
113+ # Extrair ZIP se não estiver extraído
114+ if not (os .path .exists (adc_path ) and os .path .exists (t2_path )):
115+ with zipfile .ZipFile (zip_path , 'r' ) as zip_ref :
116+ zip_ref .extractall (slicer .app .temporaryPath )
117+
118+
119+
118120 slicer .util .loadVolume (adc_path )
119121 slicer .util .loadVolume (t2_path )
120122
You can’t perform that action at this time.
0 commit comments