-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e65c5fa
commit 75b9eec
Showing
4 changed files
with
65 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
from pathlib import Path | ||
|
||
|
||
class TestTables: | ||
def test_roi_table(self, ome_zarr_image_v04_path: Path) -> None: | ||
from ngio.core.ngff_image import NgffImage | ||
from ngio.core.roi import WorldCooROI | ||
|
||
ngff_image = NgffImage(ome_zarr_image_v04_path) | ||
|
||
roi_table = ngff_image.table.new( | ||
name="roi_table", | ||
table_type="roi_table", | ||
overwrite=False, | ||
) | ||
roi_table.__repr__() | ||
roi_table.set_rois( | ||
[ | ||
WorldCooROI( | ||
x=0, | ||
y=0, | ||
z=0, | ||
x_length=10, | ||
y_length=10, | ||
z_length=10, | ||
infos={"FieldIndex": "FOV1"}, | ||
) | ||
] | ||
) | ||
|
||
def test_masking_roi_table(self, ome_zarr_image_v04_path: Path) -> None: | ||
from ngio.core.ngff_image import NgffImage | ||
|
||
ngff_image = NgffImage(ome_zarr_image_v04_path) | ||
|
||
masking_roi_table = ngff_image.table.new( | ||
name="masking_roi_table", | ||
table_type="masking_roi_table", | ||
label_image="region", | ||
overwrite=False, | ||
) | ||
masking_roi_table.__repr__() | ||
|
||
def test_feature_table(self, ome_zarr_image_v04_path: Path) -> None: | ||
from ngio.core.ngff_image import NgffImage | ||
|
||
ngff_image = NgffImage(ome_zarr_image_v04_path) | ||
|
||
feature_table = ngff_image.table.new( | ||
name="feat_table", | ||
table_type="feature_table", | ||
label_image="region", | ||
overwrite=True, | ||
) | ||
feature_table.__repr__() |