diff --git a/VisuAlignWarpVec.py b/PyNutil/visualign_deformations.py similarity index 100% rename from VisuAlignWarpVec.py rename to PyNutil/visualign_deformations.py diff --git a/workflows/basic_workflow.py b/workflows/folder_of_segmentations_to_meshview.py similarity index 69% rename from workflows/basic_workflow.py rename to workflows/folder_of_segmentations_to_meshview.py index 61e4a9f237b335a813974cfff0ae14e26b6ca196..d90da81591fe38eb281b091cd06d0f0dc65be3a7 100644 --- a/workflows/basic_workflow.py +++ b/workflows/folder_of_segmentations_to_meshview.py @@ -10,14 +10,14 @@ sys.path.append('..') from PyNutil.PyNutil import FolderToAtlasSpace, labelPoints, WritePointsToMeshview -segmentation_folder = "test_data/oneSection15/" -alignment_json = "test_data/C68_nonlinear.json" +segmentation_folder = "../test_data/oneSection15/" +alignment_json = "../test_data/C68_nonlinear.json" #now we can use our function to convert the folder of segmentations to points points = FolderToAtlasSpace(segmentation_folder,alignment_json, pixelID=[255, 0, 255], nonLinear=True) #first we need to find the label file for the volume -label_path = "annotation_volumes//allen2022_colours.csv" +label_path = "../annotation_volumes//allen2022_colours.csv" #then the path to the volume -volume_path = "annotation_volumes//annotation_10_reoriented.nrrd" +volume_path = "../annotation_volumes//annotation_10_reoriented.nrrd" #read the label file label_df = pd.read_csv(label_path) #read the annotation volume, it also has a header but we don't need it @@ -25,4 +25,7 @@ data, header = nrrd.read(volume_path) #now we can get the labels for each point labels = labelPoints(points, data, scale_factor=2.5) #save points to a meshview json -WritePointsToMeshview(points, labels,"outputs/points.json", label_df) +WritePointsToMeshview(points, labels,"../outputs/points.json", label_df) + +#while we havent added it here it would be good to next quantify the number of cells for each label. +