From 621821be85475d30b3c11c1d09de4e0bf5d4721f Mon Sep 17 00:00:00 2001
From: sharoncy <s.c.yates@medisin.uio.no>
Date: Fri, 25 Oct 2024 13:02:55 +0200
Subject: [PATCH] Add test_dataset

---
 .../linear_allen_mouse/alignment_linear.json     |   6 ++++++
 .../segmentations/test_s001.png                  | Bin 0 -> 6768 bytes
 .../segmentations/test_s002.png                  | Bin 0 -> 6768 bytes
 .../segmentations/test_s003.png                  | Bin 0 -> 6768 bytes
 .../segmentations/test_s004.png                  | Bin 0 -> 6768 bytes
 .../segmentations/test_s005.png                  | Bin 0 -> 6768 bytes
 workflows/basic_example_custom_atlas.py          |   6 +++---
 7 files changed, 9 insertions(+), 3 deletions(-)
 create mode 100644 tests/test_data/linear_allen_mouse/alignment_linear.json
 create mode 100644 tests/test_data/linear_allen_mouse/segmentations/test_s001.png
 create mode 100644 tests/test_data/linear_allen_mouse/segmentations/test_s002.png
 create mode 100644 tests/test_data/linear_allen_mouse/segmentations/test_s003.png
 create mode 100644 tests/test_data/linear_allen_mouse/segmentations/test_s004.png
 create mode 100644 tests/test_data/linear_allen_mouse/segmentations/test_s005.png

diff --git a/tests/test_data/linear_allen_mouse/alignment_linear.json b/tests/test_data/linear_allen_mouse/alignment_linear.json
new file mode 100644
index 0000000..9c56aa0
--- /dev/null
+++ b/tests/test_data/linear_allen_mouse/alignment_linear.json
@@ -0,0 +1,6 @@
+{"name":"PyNutil_testdataset","target":"ABA_Mouse_CCFv3_2017_25um.cutlas","target-resolution":[456.0, 528.0, 320.0],"slices":[
+{"filename":"test_s001.png","nr":1,"width":1500,"height":1000,"anchoring":[-5.145275115966797, 361.8014440433213, 331.1490739071843, 456.0, 0.0, 0.0, 0.0, 0.0, -320.0]}, 
+{"filename":"test_s002.png","nr":2,"width":1500,"height":1000,"anchoring":[-3.8589563369750977, 318.7157039711191, 340.24552914037605, 456.0, 0.0, 0.0, 0.0, 0.0, -320.0]}, 
+{"filename":"test_s003.png","nr":3,"width":1500,"height":1000,"anchoring":[-2.8942172527313232, 275.6299638989171, 350.0189942541106, 456.0, 0.0, 0.0, 0.0, 0.0, -320.0]}, 
+{"filename":"test_s004.png","nr":4,"width":1500,"height":1000,"anchoring":[-3.0282087922096252, 232.54422382671487, 364.1366059225139, 456.0, 0.0, 0.0, 0.0, 0.0, -320.0]}, 
+{"filename":"test_s005.png","nr":5,"width":1500,"height":1000,"anchoring":[-0.6163610816001892, 189.45848375451277, 374.2485759765199, 456.0, 0.0, 0.0, 0.0, 0.0, -320.0]}]}
\ No newline at end of file
diff --git a/tests/test_data/linear_allen_mouse/segmentations/test_s001.png b/tests/test_data/linear_allen_mouse/segmentations/test_s001.png
new file mode 100644
index 0000000000000000000000000000000000000000..260f98b911f9071cb51e7d5a47bd263866afae6b
GIT binary patch
literal 6768
zcmeAS@N?(olHy`uVBq!ia0y~yV7<e@!2E)P2`J*7vw9N)gOs_ai(^Q|oVT|&_8v9h
zVLkZx;NR_M?l&qQ<i26Na+0`aL_yhiexUM(^uO1cfi%NDk132milf5_#A6I(1Cj~~
zr$8JQ7fB%5(4YZQC?Jpu5@TA#10)?BMm3EF#Au2b%^IU+#AsnTT5F6}pQBBJ(YDcO
zBXP8~4D1{Xz9vEAYB`1jmBz)NckS-iWqcq~Z++nR4hniOXWm_t26cw)jxQbU4UKjS
zsntJzu!^0b;NF=#d)~cE_GYj+dY|uuogM|jyLtClP;b8Be4*xO4}NqggIZ%cJ6<s|
z%rQ4MU%&hJ4Iu`<kK38|^m~&Zya(Ro?FEfMJt&T$mJ3G*CPoJ)245>=bZm8Wka=|A
gd~^n3Fixe^9phF#p7cH7F{oSP>FVdQ&MBb@0Gi}9uK)l5

literal 0
HcmV?d00001

diff --git a/tests/test_data/linear_allen_mouse/segmentations/test_s002.png b/tests/test_data/linear_allen_mouse/segmentations/test_s002.png
new file mode 100644
index 0000000000000000000000000000000000000000..260f98b911f9071cb51e7d5a47bd263866afae6b
GIT binary patch
literal 6768
zcmeAS@N?(olHy`uVBq!ia0y~yV7<e@!2E)P2`J*7vw9N)gOs_ai(^Q|oVT|&_8v9h
zVLkZx;NR_M?l&qQ<i26Na+0`aL_yhiexUM(^uO1cfi%NDk132milf5_#A6I(1Cj~~
zr$8JQ7fB%5(4YZQC?Jpu5@TA#10)?BMm3EF#Au2b%^IU+#AsnTT5F6}pQBBJ(YDcO
zBXP8~4D1{Xz9vEAYB`1jmBz)NckS-iWqcq~Z++nR4hniOXWm_t26cw)jxQbU4UKjS
zsntJzu!^0b;NF=#d)~cE_GYj+dY|uuogM|jyLtClP;b8Be4*xO4}NqggIZ%cJ6<s|
z%rQ4MU%&hJ4Iu`<kK38|^m~&Zya(Ro?FEfMJt&T$mJ3G*CPoJ)245>=bZm8Wka=|A
gd~^n3Fixe^9phF#p7cH7F{oSP>FVdQ&MBb@0Gi}9uK)l5

literal 0
HcmV?d00001

diff --git a/tests/test_data/linear_allen_mouse/segmentations/test_s003.png b/tests/test_data/linear_allen_mouse/segmentations/test_s003.png
new file mode 100644
index 0000000000000000000000000000000000000000..260f98b911f9071cb51e7d5a47bd263866afae6b
GIT binary patch
literal 6768
zcmeAS@N?(olHy`uVBq!ia0y~yV7<e@!2E)P2`J*7vw9N)gOs_ai(^Q|oVT|&_8v9h
zVLkZx;NR_M?l&qQ<i26Na+0`aL_yhiexUM(^uO1cfi%NDk132milf5_#A6I(1Cj~~
zr$8JQ7fB%5(4YZQC?Jpu5@TA#10)?BMm3EF#Au2b%^IU+#AsnTT5F6}pQBBJ(YDcO
zBXP8~4D1{Xz9vEAYB`1jmBz)NckS-iWqcq~Z++nR4hniOXWm_t26cw)jxQbU4UKjS
zsntJzu!^0b;NF=#d)~cE_GYj+dY|uuogM|jyLtClP;b8Be4*xO4}NqggIZ%cJ6<s|
z%rQ4MU%&hJ4Iu`<kK38|^m~&Zya(Ro?FEfMJt&T$mJ3G*CPoJ)245>=bZm8Wka=|A
gd~^n3Fixe^9phF#p7cH7F{oSP>FVdQ&MBb@0Gi}9uK)l5

literal 0
HcmV?d00001

diff --git a/tests/test_data/linear_allen_mouse/segmentations/test_s004.png b/tests/test_data/linear_allen_mouse/segmentations/test_s004.png
new file mode 100644
index 0000000000000000000000000000000000000000..260f98b911f9071cb51e7d5a47bd263866afae6b
GIT binary patch
literal 6768
zcmeAS@N?(olHy`uVBq!ia0y~yV7<e@!2E)P2`J*7vw9N)gOs_ai(^Q|oVT|&_8v9h
zVLkZx;NR_M?l&qQ<i26Na+0`aL_yhiexUM(^uO1cfi%NDk132milf5_#A6I(1Cj~~
zr$8JQ7fB%5(4YZQC?Jpu5@TA#10)?BMm3EF#Au2b%^IU+#AsnTT5F6}pQBBJ(YDcO
zBXP8~4D1{Xz9vEAYB`1jmBz)NckS-iWqcq~Z++nR4hniOXWm_t26cw)jxQbU4UKjS
zsntJzu!^0b;NF=#d)~cE_GYj+dY|uuogM|jyLtClP;b8Be4*xO4}NqggIZ%cJ6<s|
z%rQ4MU%&hJ4Iu`<kK38|^m~&Zya(Ro?FEfMJt&T$mJ3G*CPoJ)245>=bZm8Wka=|A
gd~^n3Fixe^9phF#p7cH7F{oSP>FVdQ&MBb@0Gi}9uK)l5

literal 0
HcmV?d00001

diff --git a/tests/test_data/linear_allen_mouse/segmentations/test_s005.png b/tests/test_data/linear_allen_mouse/segmentations/test_s005.png
new file mode 100644
index 0000000000000000000000000000000000000000..260f98b911f9071cb51e7d5a47bd263866afae6b
GIT binary patch
literal 6768
zcmeAS@N?(olHy`uVBq!ia0y~yV7<e@!2E)P2`J*7vw9N)gOs_ai(^Q|oVT|&_8v9h
zVLkZx;NR_M?l&qQ<i26Na+0`aL_yhiexUM(^uO1cfi%NDk132milf5_#A6I(1Cj~~
zr$8JQ7fB%5(4YZQC?Jpu5@TA#10)?BMm3EF#Au2b%^IU+#AsnTT5F6}pQBBJ(YDcO
zBXP8~4D1{Xz9vEAYB`1jmBz)NckS-iWqcq~Z++nR4hniOXWm_t26cw)jxQbU4UKjS
zsntJzu!^0b;NF=#d)~cE_GYj+dY|uuogM|jyLtClP;b8Be4*xO4}NqggIZ%cJ6<s|
z%rQ4MU%&hJ4Iu`<kK38|^m~&Zya(Ro?FEfMJt&T$mJ3G*CPoJ)245>=bZm8Wka=|A
gd~^n3Fixe^9phF#p7cH7F{oSP>FVdQ&MBb@0Gi}9uK)l5

literal 0
HcmV?d00001

diff --git a/workflows/basic_example_custom_atlas.py b/workflows/basic_example_custom_atlas.py
index a4f8335..5d9b9ed 100644
--- a/workflows/basic_example_custom_atlas.py
+++ b/workflows/basic_example_custom_atlas.py
@@ -14,12 +14,12 @@ from PyNutil import PyNutil
 ###The object_cutoff is a cut-off for min object size
 
 pnt = PyNutil(
-    segmentation_folder="../tests/test_data/nonlinear_allen_mouse/",
-    alignment_json="../tests/test_data/nonlinear_allen_mouse/alignment.json",
+    segmentation_folder="../tests/test_data/linear_allen_mouse/",
+    alignment_json="../tests/test_data/linear_allen_mouse/alignment_linear.json",
     colour=[0, 0, 0],
     atlas_path="../tests/test_data/allen_mouse_2017_atlas/annotation_25_reoriented_2017.nrrd",
     label_path="../tests/test_data/allen_mouse_2017_atlas//allen2017_colours.csv",
 )
 pnt.get_coordinates(object_cutoff=0)
 pnt.quantify_coordinates()
-pnt.save_analysis("../demo_data/test_nonlinear_allen_mouse")
+pnt.save_analysis("../test_result/test_linear_allen_mouse")
-- 
GitLab