diff --git a/test/test10_PyNutil_web.json b/test/test10_PyNutil_web.json new file mode 100644 index 0000000000000000000000000000000000000000..81a2f918ae4d0722187e92ac1a8eaaee82721db2 --- /dev/null +++ b/test/test10_PyNutil_web.json @@ -0,0 +1,9 @@ +{ + "volume_path": "allen2017", + "label_path": "PyNutil/annotation_volumes/allen2017_colours.csv", + "segmentation_folder": "PyNutil/test_data/PyTest_web", + "alignment_json": "PyNutil/test_data/PyNutil_test.waln", + "nonlinear": true, + "colour": [0, 0, 0], + "points_json_path": "PyNutil/outputs/test.json" +} diff --git a/testOOP.py b/testOOP.py index 90f075eecbe8d3ea312387b17c7087a5f2dcb7c6..03b7a21c63b90dbb80c6b5bda8befa7ce0313a7f 100644 --- a/testOOP.py +++ b/testOOP.py @@ -2,7 +2,7 @@ from PyNutil import PyNutil import os os.chdir("..") -pnt = PyNutil(settings_file=r"PyNutil/test/test9_PyNutil_linear_only.json") +pnt = PyNutil(settings_file=r"PyNutil/test/test10_PyNutil_web.json") ##Use flat can be set to True if you want to use the flat file # instead of the visualign json (this is only useful for testing and will be removed) @@ -10,7 +10,7 @@ pnt.get_coordinates(object_cutoff=0, use_flat=False) pnt.quantify_coordinates() -pnt.save_analysis("PyNutil/outputs/test9_PyNutil_linear_noflat_fix") +pnt.save_analysis("PyNutil/outputs/test10_PyNutil_web") # remove name, r, g, b, from pixel_ # add to region_areas df diff --git a/test_data/PyNutil_test.json b/test_data/PyNutil_test.json new file mode 100644 index 0000000000000000000000000000000000000000..8b7002dbba1689111842adf884734c811e57a3aa --- /dev/null +++ b/test_data/PyNutil_test.json @@ -0,0 +1,285 @@ +{ + "name": "PyNutil_test.waln", + "target": "ABA_Mouse_CCFv3_2017_25um", + "target-resolution": [ + 456, + 528, + 320 + ], + "slices": [ + { + "filename": "PyNutil_test/test_s001.dzip", + "width": 1500, + "height": 1000, + "snr": 1, + "format": "png", + "current": 0, + "tilesize": 254, + "overlap": 1, + "mode": 0, + "ouv": [ + -5.145275115966797, + 361.8014440433213, + 331.1490739071843, + 456, + 0, + 0, + 0, + 0, + -320 + ], + "markers": [ + [ + 440.0000000000001, + 289, + 450, + 323 + ] + ], + "nr": 1, + "anchoring": [ + -5.145275115966797, + 361.8014440433213, + 331.1490739071843, + 456, + 0, + 0, + 0, + 0, + -320 + ] + }, + { + "filename": "PyNutil_test/test_s002.dzip", + "width": 1500, + "height": 1000, + "snr": 2, + "format": "png", + "current": 0, + "tilesize": 254, + "overlap": 1, + "mode": 0, + "ouv": [ + -3.8589563369750977, + 318.7157039711191, + 340.24552914037605, + 456, + 0, + 0, + 0, + 0, + -320 + ], + "markers": [ + [ + 636.8098159509204, + 603.4958601655935, + 672.6993865030674, + 593.3762649494021 + ], + [ + 902.9868982011025, + 615.5567336628567, + 843.8650306748466, + 610.8555657773691 + ], + [ + 561.2609204260139, + 750.3661510917975, + 558.5889570552147, + 775.5289788408462 + ] + ], + "nr": 2, + "anchoring": [ + -3.8589563369750977, + 318.7157039711191, + 340.24552914037605, + 456, + 0, + 0, + 0, + 0, + -320 + ] + }, + { + "filename": "PyNutil_test/test_s003.dzip", + "width": 1500, + "height": 1000, + "snr": 3, + "format": "png", + "current": 0, + "tilesize": 254, + "overlap": 1, + "mode": 0, + "ouv": [ + -2.8942172527313232, + 275.6299638989171, + 350.0189942541106, + 456, + 0, + 0, + 0, + 0, + -320 + ], + "markers": [ + [ + 761.0429447852762, + 629.2548298068077, + 741, + 500 + ], + [ + 204.29447852760745, + 613.6154553817848, + 365.3374233128834, + 612.695492180313 + ], + [ + 482.6376861494953, + 714.9876920193675, + 623.0061349693251, + 747.0101195952162 + ], + [ + 434.00208292806684, + 606.7676930120547, + 578.8343558282207, + 601.6559337626494 + ], + [ + 959.8159509202455, + 636.6145354185834, + 980.0613496932516, + 628.3348666053357 + ], + [ + 957.8161415293836, + 523.3987679117937, + 953.3742331288344, + 547.3781048758049 + ] + ], + "nr": 3, + "anchoring": [ + -2.8942172527313232, + 275.6299638989171, + 350.0189942541106, + 456, + 0, + 0, + 0, + 0, + -320 + ] + }, + { + "filename": "PyNutil_test/test_s004.dzip", + "width": 1500, + "height": 1000, + "snr": 4, + "format": "png", + "current": 0, + "tilesize": 254, + "overlap": 1, + "mode": 0, + "ouv": [ + -3.0282087922096252, + 232.54422382671487, + 364.1366059225139, + 456, + 0, + 0, + 0, + 0, + -320 + ], + "markers": [ + [ + 522.6993865030674, + 712.9714811407543, + 530.6338374725239, + 715.7313707451705 + ], + [ + 630.6438500513034, + 523.1833943062713, + 550.3067484662577, + 519.7792088316469 + ], + [ + 916.4047791164191, + 534.1886045162021, + 962.5766871165645, + 523.4590616375344 + ], + [ + 950.8076359295408, + 705.46368100121, + 925, + 668 + ], + [ + 1096.1208774051677, + 649.3153717520049, + 1115, + 675 + ], + [ + 1030.2378410339393, + 594.2011916220456, + 1065.644171779141, + 604.4158233670653 + ] + ], + "nr": 4, + "anchoring": [ + -3.0282087922096252, + 232.54422382671487, + 364.1366059225139, + 456, + 0, + 0, + 0, + 0, + -320 + ] + }, + { + "filename": "PyNutil_test/test_s005.dzip", + "width": 1500, + "height": 1000, + "snr": 5, + "format": "png", + "current": 0, + "tilesize": 254, + "overlap": 1, + "mode": 0, + "ouv": [ + -0.6163610816001892, + 189.45848375451277, + 374.2485759765199, + 456, + 0, + 0, + 0, + 0, + -320 + ], + "nr": 5, + "anchoring": [ + -0.6163610816001892, + 189.45848375451277, + 374.2485759765199, + 456, + 0, + 0, + 0, + 0, + -320 + ] + } + ] +} \ No newline at end of file diff --git a/test_data/PyNutil_test.waln b/test_data/PyNutil_test.waln new file mode 100644 index 0000000000000000000000000000000000000000..a14a8306d5014c41f469a3fc079d636914761454 --- /dev/null +++ b/test_data/PyNutil_test.waln @@ -0,0 +1 @@ +{"atlas":"ABA_Mouse_CCFv3_2017_25um","sections":[{"filename":"PyNutil_test/test_s001.dzip","width":1500,"height":1000,"snr":1,"format":"png","current":0,"tilesize":254,"overlap":1,"mode":0,"ouv":[-5.145275115966797,361.8014440433213,331.1490739071843,456,0,0,0,0,-320],"markers":[[440.0000000000001,289,450,323]]},{"filename":"PyNutil_test/test_s002.dzip","width":1500,"height":1000,"snr":2,"format":"png","current":0,"tilesize":254,"overlap":1,"mode":0,"ouv":[-3.8589563369750977,318.7157039711191,340.24552914037605,456,0,0,0,0,-320],"markers":[[636.8098159509204,603.4958601655935,672.6993865030674,593.3762649494021],[902.9868982011025,615.5567336628567,843.8650306748466,610.8555657773691],[561.2609204260139,750.3661510917975,558.5889570552147,775.5289788408462]]},{"filename":"PyNutil_test/test_s003.dzip","width":1500,"height":1000,"snr":3,"format":"png","current":0,"tilesize":254,"overlap":1,"mode":0,"ouv":[-2.8942172527313232,275.6299638989171,350.0189942541106,456,0,0,0,0,-320],"markers":[[761.0429447852762,629.2548298068077,741,500],[204.29447852760745,613.6154553817848,365.3374233128834,612.695492180313],[482.6376861494953,714.9876920193675,623.0061349693251,747.0101195952162],[434.00208292806684,606.7676930120547,578.8343558282207,601.6559337626494],[959.8159509202455,636.6145354185834,980.0613496932516,628.3348666053357],[957.8161415293836,523.3987679117937,953.3742331288344,547.3781048758049]]},{"filename":"PyNutil_test/test_s004.dzip","width":1500,"height":1000,"snr":4,"format":"png","current":0,"tilesize":254,"overlap":1,"mode":0,"ouv":[-3.0282087922096252,232.54422382671487,364.1366059225139,456,0,0,0,0,-320],"markers":[[522.6993865030674,712.9714811407543,530.6338374725239,715.7313707451705],[630.6438500513034,523.1833943062713,550.3067484662577,519.7792088316469],[916.4047791164191,534.1886045162021,962.5766871165645,523.4590616375344],[950.8076359295408,705.46368100121,925,668],[1096.1208774051677,649.3153717520049,1115,675],[1030.2378410339393,594.2011916220456,1065.644171779141,604.4158233670653]]},{"filename":"PyNutil_test/test_s005.dzip","width":1500,"height":1000,"snr":5,"format":"png","current":0,"tilesize":254,"overlap":1,"mode":0,"ouv":[-0.6163610816001892,189.45848375451277,374.2485759765199,456,0,0,0,0,-320]}],"bucket":"ewb-3d1dc41f-4256-4db5-bc75-0642369e1354"} \ No newline at end of file diff --git a/test_data/PyTest_web/segmentations/test_s001.dzip b/test_data/PyTest_web/segmentations/test_s001.dzip new file mode 100644 index 0000000000000000000000000000000000000000..6fd7541509fba723713298bacc354b7515e675d3 Binary files /dev/null and b/test_data/PyTest_web/segmentations/test_s001.dzip differ diff --git a/test_data/PyTest_web/segmentations/test_s002.dzip b/test_data/PyTest_web/segmentations/test_s002.dzip new file mode 100644 index 0000000000000000000000000000000000000000..4cc2f30574ee0e8f66de7983f48cc57c5d8002ae Binary files /dev/null and b/test_data/PyTest_web/segmentations/test_s002.dzip differ diff --git a/test_data/PyTest_web/segmentations/test_s003.dzip b/test_data/PyTest_web/segmentations/test_s003.dzip new file mode 100644 index 0000000000000000000000000000000000000000..5508a29a747a8af6880888d93b825e3dfe8750f1 Binary files /dev/null and b/test_data/PyTest_web/segmentations/test_s003.dzip differ diff --git a/test_data/PyTest_web/segmentations/test_s004.dzip b/test_data/PyTest_web/segmentations/test_s004.dzip new file mode 100644 index 0000000000000000000000000000000000000000..30a16304e2f8c4542f89581ed792bdf35c20a70f Binary files /dev/null and b/test_data/PyTest_web/segmentations/test_s004.dzip differ diff --git a/test_data/PyTest_web/segmentations/test_s005.dzip b/test_data/PyTest_web/segmentations/test_s005.dzip new file mode 100644 index 0000000000000000000000000000000000000000..e5539ce88ff11c6b7ccc05e28ac638f2feaa4438 Binary files /dev/null and b/test_data/PyTest_web/segmentations/test_s005.dzip differ