Skip to content

Commit 2e2fbc2

Browse files
committed
actually not
1 parent 3c1d84a commit 2e2fbc2

File tree

2 files changed

+6
-46
lines changed

2 files changed

+6
-46
lines changed

encord/objects/ontology_labels_impl.py

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,59 +1264,25 @@ def __init__(self, images_data: LabelRowV2.LabelRowReadOnlyDataImagesDataEntry):
12641264
@property
12651265
def title(self) -> str:
12661266
return self._image_data.title
1267-
"""
1268-
Get the title of the image.
1269-
1270-
Returns:
1271-
str: The image title.
1272-
"""
12731267

12741268
@property
12751269
def file_type(self) -> str:
12761270
return self._image_data.file_type
1277-
"""
1278-
Get the file type of the image.
1279-
1280-
Returns:
1281-
str: The image file type.
1282-
"""
12831271

12841272
@property
12851273
def width(self) -> int:
12861274
return self._image_data.width
1287-
"""
1288-
Get the width of the image.
1289-
1290-
Returns:
1291-
int: The image width.
1292-
"""
12931275

12941276
@property
12951277
def height(self) -> int:
12961278
return self._image_data.height
1297-
"""
1298-
Get the height of the image.
1299-
1300-
Returns:
1301-
int: The image height.
1302-
"""
13031279

13041280
@property
13051281
def image_hash(self) -> str:
1306-
"""Get the hash of the image.
1307-
1308-
Returns:
1309-
str: The image hash.
1310-
"""
13111282
return self._image_data.image_hash
13121283

13131284
@property
13141285
def frame_number(self) -> int:
1315-
"""Get the frame number.
1316-
1317-
Returns:
1318-
int: The frame number.
1319-
"""
13201286
return self._image_data.index
13211287

13221288
class FrameView:
@@ -1386,9 +1352,6 @@ def frame(self) -> int:
13861352
def width(self) -> int:
13871353
"""Get the width of the frame.
13881354
1389-
Returns:
1390-
int: The width of the image or image group.
1391-
13921355
Raises:
13931356
LabelRowError: If the width is not set for the data type.
13941357
"""
@@ -1411,9 +1374,6 @@ def width(self) -> int:
14111374
def height(self) -> int:
14121375
"""Get the height of the frame.
14131376
1414-
Returns:
1415-
int: The height of the image or image group.
1416-
14171377
Raises:
14181378
LabelRowError: If the height is not set for the data type.
14191379
"""

tests/objects/test_bitmask_validation.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)