From 802c278081f48bfb8e4c14d832a326d1ce1ef396 Mon Sep 17 00:00:00 2001 From: lorenzo Date: Fri, 6 Sep 2024 15:37:13 +0200 Subject: [PATCH] add back label DAPI --- .../data/ngff_example/my_image/labels/.zattrs | 4 +- .../my_image/labels/label_DAPI/.zattrs | 59 ++++++++++++++++++ .../my_image/labels/label_DAPI/.zgroup | 3 + .../my_image/labels/label_DAPI/0/.zarray | 25 ++++++++ .../my_image/labels/label_DAPI/0/0/0/0 | Bin 0 -> 16496 bytes .../my_image/labels/label_DAPI/1/.zarray | 25 ++++++++ .../my_image/labels/label_DAPI/1/0/0/0 | Bin 0 -> 6225 bytes ...astik_pixel_classification_segmentation.py | 3 +- 8 files changed, 116 insertions(+), 3 deletions(-) create mode 100644 tests/data/ngff_example/my_image/labels/label_DAPI/.zattrs create mode 100644 tests/data/ngff_example/my_image/labels/label_DAPI/.zgroup create mode 100644 tests/data/ngff_example/my_image/labels/label_DAPI/0/.zarray create mode 100644 tests/data/ngff_example/my_image/labels/label_DAPI/0/0/0/0 create mode 100644 tests/data/ngff_example/my_image/labels/label_DAPI/1/.zarray create mode 100644 tests/data/ngff_example/my_image/labels/label_DAPI/1/0/0/0 diff --git a/tests/data/ngff_example/my_image/labels/.zattrs b/tests/data/ngff_example/my_image/labels/.zattrs index fc77819..208ad2b 100644 --- a/tests/data/ngff_example/my_image/labels/.zattrs +++ b/tests/data/ngff_example/my_image/labels/.zattrs @@ -1,3 +1,5 @@ { - "labels": [] + "labels": [ + "label_DAPI" + ] } \ No newline at end of file diff --git a/tests/data/ngff_example/my_image/labels/label_DAPI/.zattrs b/tests/data/ngff_example/my_image/labels/label_DAPI/.zattrs new file mode 100644 index 0000000..15a8dbf --- /dev/null +++ b/tests/data/ngff_example/my_image/labels/label_DAPI/.zattrs @@ -0,0 +1,59 @@ +{ + "image-label": { + "source": { + "image": "../../" + }, + "version": "0.4" + }, + "multiscales": [ + { + "axes": [ + { + "name": "z", + "type": "space", + "unit": "micrometer" + }, + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ], + "datasets": [ + { + "coordinateTransformations": [ + { + "scale": [ + 1.0, + 0.65, + 0.65 + ], + "type": "scale" + } + ], + "path": "0" + }, + { + "coordinateTransformations": [ + { + "scale": [ + 1.0, + 1.3, + 1.3 + ], + "type": "scale" + } + ], + "path": "1" + } + ], + "name": "label_DAPI", + "version": "0.4" + } + ] +} \ No newline at end of file diff --git a/tests/data/ngff_example/my_image/labels/label_DAPI/.zgroup b/tests/data/ngff_example/my_image/labels/label_DAPI/.zgroup new file mode 100644 index 0000000..3b7daf2 --- /dev/null +++ b/tests/data/ngff_example/my_image/labels/label_DAPI/.zgroup @@ -0,0 +1,3 @@ +{ + "zarr_format": 2 +} \ No newline at end of file diff --git a/tests/data/ngff_example/my_image/labels/label_DAPI/0/.zarray b/tests/data/ngff_example/my_image/labels/label_DAPI/0/.zarray new file mode 100644 index 0000000..6932c4d --- /dev/null +++ b/tests/data/ngff_example/my_image/labels/label_DAPI/0/.zarray @@ -0,0 +1,25 @@ +{ + "chunks": [ + 1, + 540, + 1280 + ], + "compressor": { + "blocksize": 0, + "clevel": 5, + "cname": "lz4", + "id": "blosc", + "shuffle": 1 + }, + "dimension_separator": "/", + "dtype": "(+P=tU%76Cznfb19nK^6%k zJ0hT{EV3gz!y+!IPeq?F>M-iK%qKX?A}BK|)cc*f-4S&3d++<^ed8Zpe&Q_v_1(2v!u%vp;i4flv%>%sQr1U!EC2`B{b6V z>wQ(4rloN&`a91`%lgv8{jKw-+$bzpju>y zj@Hz|6*@szqFkKu)zxe^kecVx81u}xxkftsYa$5q<}yWiM%E#~Md|T4Y6fg|#b!43 zT=owyp#H_1dH*QA-cYY*;77ZBb2oMTMv0VRVLxOjpMBu6;gHQGF750C-?{v45ymZd zPnshZ{{OHAenYun*YDK==Ys3u_c}HI5xs)z;Xh*b->p#pdgy~gUAs&vIQ5%ym7?2rg&R&Cp998M1BmVL!zd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Co$KZs+JApn(vxI(m8<$??P!cEXH!!vWs=Xki6pn!k7N-ku(!_C9_F zNy@suduOV`Yh==Z0gc9`et+z~PAzl)e#37QBc7Z?OAj14fCZC*k-tFo*V6LTQ$Re~ zY&^JJh3b~u4@dtF&#$r$9=z@sci4~`!w*fPQa*4p`SENN*~$ZhjN(ofKpzP@>|xE& zW9CmskSaYQU{nB#LNR#oWWy^#JST~QK#^ZYWgEp}tr#+70Yjskn|oc;e6Yie#;V%% zb51U%MusuvA}_DrqVb{L0Fkm7s!i~rs^EsLHp@{dM~>8KDbG9;pd9c|J`AKn>=f9# zQ;!}!udr1Z$T8|&qZ?2?Fm^PhvECPr*Rq~{_Cqb}*fFD+9-~Z1bRIu`yhj@c#!(PZ zomIXVKD-7!0;4pZKZ4Q#xIj9Be?z1qjHFqdIPs1)1}G;#IhLFNzj1RHpKm9-yfhOZ8@wC(fOl z$T~zp!45<_vV&j9p)hg&d^&|;s2P^~degSV5N{FFz4%4LCl=1xHEN{6z1Co7olJ`!(@bT5aCm5KmOS_+oV4b><8F^1E~a zT}sNUuLclf^+QSa3N0bupBg#HejP#T;oxgU?G)Q;by5dKV z{*2;FOO33vin6la_moN)q>{VKdz2V2Ple+3*C%LiqGkRB>vpjN{Ee%I1KeP)imJRu zQ58l-UCqlq#^$Kr;xLGnF_lIhH(;zJy|rz|L-1fdYh+z0X~*?$N&HU literal 0 HcmV?d00001 diff --git a/tests/test_ilastik_pixel_classification_segmentation.py b/tests/test_ilastik_pixel_classification_segmentation.py index 928c7e6..d433e94 100644 --- a/tests/test_ilastik_pixel_classification_segmentation.py +++ b/tests/test_ilastik_pixel_classification_segmentation.py @@ -26,9 +26,8 @@ def test_ilastik_pixel_classification_segmentation_task(test_data_dir): """ Test the ilastik_pixel_classification_segmentation task. """ - test_data_dir = (Path(__file__).parent / "data/ngff_example/my_image").as_posix() ilastik_model = (Path(__file__).parent / "data/pixel_classifier_2D.ilp").as_posix() - # assert False, test_data_dir + test_data_dir = Path(test_data_dir).as_posix() ilastik_pixel_classification_segmentation( zarr_url=test_data_dir,