@@ -185,8 +185,8 @@ def test_image_group_bitmask_dimension_validation():
185185 # Add bitmask with incorrect dimensions for frame 0 (256x256 instead of 512x512)
186186 frame_0_incorrect_mask = BitmaskCoordinates (np .zeros ((256 , 256 ), dtype = bool ))
187187 frame_0_incorrect_instance = ObjectInstance (bitmask_object )
188- frame_0_incorrect_instance .set_for_frames (coordinates = frame_0_incorrect_mask , frames = 0 , overwrite = True )
189- label_row .add_object_instance (frame_0_incorrect_instance , force = True )
188+ frame_0_incorrect_instance .set_for_frames (coordinates = frame_0_incorrect_mask , frames = 0 )
189+ label_row .add_object_instance (frame_0_incorrect_instance )
190190
191191 # Should fail on serialization
192192 with pytest .raises (ValueError , match = "Bitmask dimensions don't match the media dimensions" ):
@@ -198,8 +198,8 @@ def test_image_group_bitmask_dimension_validation():
198198
199199 frame_1_incorrect_mask = BitmaskCoordinates (np .zeros ((512 , 512 ), dtype = bool ))
200200 frame_1_incorrect_instance = ObjectInstance (bitmask_object )
201- frame_1_incorrect_instance .set_for_frames (coordinates = frame_1_incorrect_mask , frames = 1 , overwrite = True )
202- label_row .add_object_instance (frame_1_incorrect_instance , force = True )
201+ frame_1_incorrect_instance .set_for_frames (coordinates = frame_1_incorrect_mask , frames = 1 )
202+ label_row .add_object_instance (frame_1_incorrect_instance )
203203
204204 # Should fail on serialization due to frame 1
205205 with pytest .raises (ValueError , match = "Bitmask dimensions don't match the media dimensions" ):
@@ -335,8 +335,8 @@ def test_dicom_bitmask_dimension_validation():
335335 # Add bitmask with incorrect dimensions for slice 0 (256x256 instead of 512x512)
336336 slice_0_incorrect_mask = BitmaskCoordinates (np .zeros ((256 , 256 ), dtype = bool ))
337337 slice_0_incorrect_instance = ObjectInstance (bitmask_object )
338- slice_0_incorrect_instance .set_for_frames (coordinates = slice_0_incorrect_mask , frames = 0 , overwrite = True )
339- label_row .add_object_instance (slice_0_incorrect_instance , force = True )
338+ slice_0_incorrect_instance .set_for_frames (coordinates = slice_0_incorrect_mask , frames = 0 )
339+ label_row .add_object_instance (slice_0_incorrect_instance )
340340
341341 # Should fail on serialization
342342 with pytest .raises (ValueError , match = "Bitmask dimensions don't match the media dimensions" ):
0 commit comments