From b6fac3928bb4a60e103496759308dafe77842536 Mon Sep 17 00:00:00 2001
From: polarbean <harry.carey95@gmail.com>
Date: Fri, 8 Nov 2024 10:25:18 +0100
Subject: [PATCH] remove redundant code from deformation calculation

---
 PyNutil/processing/visualign_deformations.py | 6 +++---
 workflows/basic_example_custom_atlas.py      | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/PyNutil/processing/visualign_deformations.py b/PyNutil/processing/visualign_deformations.py
index 86a0edb..3cb6317 100644
--- a/PyNutil/processing/visualign_deformations.py
+++ b/PyNutil/processing/visualign_deformations.py
@@ -1,4 +1,4 @@
-"""This code was written by Gergely Csucs and Rembrandt Bakker"""
+"""This code was written by Gergely Csucs, Harry Carey and Rembrandt Bakker"""
 
 import numpy as np
 
@@ -14,8 +14,8 @@ def triangulate(w, h, markers):
     edges = [0] * ((len(markers) + 4) * (len(markers) + 4 - 1) // 2)
     triangles = [Triangle(0, 1, 2, vertices, edges), Triangle(1, 2, 3, vertices, edges)]
     edges[0] = edges[1] = edges[4] = edges[5] = 2
-    markers = list(set(tuple(m) for m in markers))
-    markers = [list(m) for m in markers]
+    # markers = list(set(tuple(m) for m in markers))
+    # markers = [list(m) for m in markers]
 
     for marker in markers:
         x, y = marker[2:4]
diff --git a/workflows/basic_example_custom_atlas.py b/workflows/basic_example_custom_atlas.py
index 3a281d4..da3cd80 100644
--- a/workflows/basic_example_custom_atlas.py
+++ b/workflows/basic_example_custom_atlas.py
@@ -15,12 +15,12 @@ from PyNutil import PyNutil
 ### get_coordinates, if use_flat=True, place flat files in folder titled "flat_files" at same level as "segmentations" folder 
 
 pnt = PyNutil(
-    segmentation_folder="../tests/test_data/linear_allen_mouse/",
-    alignment_json="../tests/test_data/linear_allen_mouse/alignment_linear.json",
+    segmentation_folder="../tests/test_data/nonlinear_allen_mouse/",
+    alignment_json="../tests/test_data/nonlinear_allen_mouse/alignment.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, use_flat=True)
+pnt.get_coordinates(object_cutoff=0, use_flat=False)
 pnt.quantify_coordinates()
-pnt.save_analysis("../test_result/test_linear_allen_mouse")
+pnt.save_analysis("../test_result/test_nonlinear_allen_mouse")
-- 
GitLab