diff --git a/PyNutil/coordinate_extraction.py b/PyNutil/coordinate_extraction.py index a459c0698b4fd805b6d6f3bcc1f5ef182020f453..761d01ed4a4d8cc483f43e73982e0c6b5a655f2e 100644 --- a/PyNutil/coordinate_extraction.py +++ b/PyNutil/coordinate_extraction.py @@ -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"]: diff --git a/testOOP.py b/testOOP.py index 03b7a21c63b90dbb80c6b5bda8befa7ce0313a7f..0cab45c0927c8f278787fa111f8b8609640574c9 100644 --- a/testOOP.py +++ b/testOOP.py @@ -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()