@@ -1187,9 +1187,9 @@ def test_v2s_label(self):
11871187 )
11881188
11891189 def test_v2s_grayscale (self ):
1190- no , fc , _ , _ = v2s (self .dist , [200 , 400 ], 1 )
1190+ no , fc , _ , _ = v2s (self .dist , [200 , 400 ], 2 )
11911191 self .assertAlmostEqual (
1192- sum (elemvolume (no [:, :3 ], fc [:, :3 ])) * 0.0001 , 4.816236473144449 , 3
1192+ sum (elemvolume (no [:, :3 ], fc [:, :3 ])) * 0.0001 , 4.781791110333593 , 3
11931193 )
11941194
11951195 def test_finddisconnsurf (self ):
@@ -1227,10 +1227,10 @@ def test_s2m_plc(self):
12271227 )
12281228
12291229 def test_remeshsurf (self ):
1230- no , fc , _ , _ = v2s (self .dist , 100 , 2 )
1230+ no , fc , _ , _ = v2s (self .dist < 100 , 0.5 , 1 )
12311231 no1 , fc1 = remeshsurf (no , fc , 1 )
12321232 self .assertAlmostEqual (
1233- sum (elemvolume (no [:, :3 ], fc [:, :3 ])) * 0.0001 , 2.034550093898604 , 3
1233+ sum (elemvolume (no [:, :3 ], fc [:, :3 ])) * 0.0001 , 0.1290690532542782 , 3
12341234 )
12351235
12361236 def test_surf2volz (self ):
@@ -1257,12 +1257,12 @@ def test_surf2vol_fill(self):
12571257 vol = surf2vol (
12581258 self .no ,
12591259 self .fc ,
1260- np .arange (19 , 42 , 1 ),
1261- np .arange (19 , 42 , 1 ),
1262- np .arange (19 , 42 , 1 ),
1260+ np .arange (19 , 42 , 0.5 ),
1261+ np .arange (19 , 42 , 0.5 ),
1262+ np .arange (19 , 42 , 0.5 ),
12631263 fill = 1 ,
12641264 )
1265- self .assertAlmostEqual (np .sum (vol .astype (np .float32 )) * 0.001 , 4.903 , 2 )
1265+ self .assertAlmostEqual (np .sum (vol .astype (np .float32 )) * 0.0001 , 3.5536 , 2 )
12661266
12671267 def test_s2v (self ):
12681268 vol = s2v (self .no , self .fc , fill = 1 )
0 commit comments