Skip to content
Snippets Groups Projects
Commit 859c8b82 authored by Sharon Christine Yates's avatar Sharon Christine Yates
Browse files

Fix for "per_pixel"

PyNutil only worked for method = "all". Fix so that it works for "per_pixel" and "per_object".
parent 8ffdf33a
No related branches found
No related tags found
No related merge requests found
......@@ -309,6 +309,7 @@ def segmentation_to_atlas_space(
region_areas = get_region_areas(use_flat, atlas_labels, flat_file_atlas, seg_width, seg_height, slice_dict, atlas_volume, triangulation)
y_scale, x_scale = transform_to_registration(seg_height, seg_width, reg_height, reg_width)
centroids, points = None, None
scaled_centroidsX, scaled_centroidsY, scaled_x, scaled_y = None, None, None, None
if method in ["per_object", "all"]:
centroids, scaled_centroidsX, scaled_centroidsY = get_centroids(segmentation, pixel_id, y_scale, x_scale, object_cutoff)
if method in ["per_pixel", "all"]:
......
......@@ -2,11 +2,13 @@ from PyNutil import PyNutil
import os
os.chdir("..")
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)
pnt.get_coordinates(object_cutoff=0, use_flat=False)
pnt.get_coordinates(object_cutoff=0, method="per_pixel")
pnt.quantify_coordinates()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment