diff --git a/PyNutil/coordinate_processing.py b/PyNutil/coordinate_processing.py deleted file mode 100644 index 6633273ceb97d5b8b1484db6a9a0cc6952abcc1d..0000000000000000000000000000000000000000 --- a/PyNutil/coordinate_processing.py +++ /dev/null @@ -1,19 +0,0 @@ -from .coordinate_extraction import folder_to_atlas_space -from .counting_and_load import label_points - - -def extract_coordinates(segmentation_folder, alignment_json, atlas_labels, pixel_id, non_linear, object_cutoff, atlas_volume, use_flat): - return folder_to_atlas_space( - segmentation_folder, - alignment_json, - atlas_labels, - pixel_id, - non_linear, - object_cutoff, - atlas_volume, - use_flat, - ) - - -def label_points_group(points, atlas_volume): - return label_points(points, atlas_volume, scale_factor=1) diff --git a/PyNutil/data_analysis.py b/PyNutil/data_analysis.py index ad5fd8d29f2782badd6bafb2ab498f55d8b00f2d..ee8fff70829064808e30eb5db17f3e2bbbf2bd69 100644 --- a/PyNutil/data_analysis.py +++ b/PyNutil/data_analysis.py @@ -1,6 +1,5 @@ import pandas as pd -from .counting_and_load import pixel_count_per_region -from .coordinate_processing import label_points_group +from .counting_and_load import pixel_count_per_region, label_points def quantify_labeled_points( @@ -12,8 +11,8 @@ def quantify_labeled_points( atlas_labels, atlas_volume ): - labeled_points_centroids = label_points_group(centroids, atlas_volume) - labeled_points = label_points_group(pixel_points, atlas_volume) + labeled_points_centroids = label_points(centroids, atlas_volume) + labeled_points = label_points(pixel_points, atlas_volume, scale_factor=1) per_section_df = _quantify_per_section( labeled_points, diff --git a/PyNutil/main.py b/PyNutil/main.py index b4cd48943012c84bfaa15e47e37478c664b54744..3255d35128a6aefcab83a0de76701553e6b3475c 100644 --- a/PyNutil/main.py +++ b/PyNutil/main.py @@ -2,9 +2,10 @@ import json import os from .io.atlas_loader import load_atlas_data, load_custom_atlas -from .coordinate_processing import extract_coordinates, label_points_group from .data_analysis import quantify_labeled_points from .io.file_operations import save_analysis_output +from .coordinate_extraction import folder_to_atlas_space +from .counting_and_load import label_points class PyNutil: @@ -64,7 +65,7 @@ class PyNutil: self.points_len, self.centroids_len, self.segmentation_filenames, - ) = extract_coordinates( + ) = folder_to_atlas_space( self.segmentation_folder, self.alignment_json, self.atlas_labels,