diff --git a/PyNutil/testing_openflatfile.py b/PyNutil/testing_openflatfile.py index e6e630ef96dd4081959f006f620c895d71bde5ed..f37a324064d62da91763d7698f1ac5defee8992f 100644 --- a/PyNutil/testing_openflatfile.py +++ b/PyNutil/testing_openflatfile.py @@ -32,13 +32,22 @@ with open(base, "rb") as f: image_arr = cv2.resize(image_arr,(9848,12784),interpolation=cv2.INTER_NEAREST) print(image_arr.shape) val,count = np.unique(image_arr, return_counts=True) - print(list(zip(val,count))) # show image with plt.imshow(image_arr) """assign label file values into image array""" -labelfile = pd.read_csv(r"../metadata/annotation_volumes\allen2017_colours.csv") +labelfile = pd.read_csv(r"metadata/annotation_volumes\allen2017_colours.csv") +labelfile[] +print(list(zip(val,count))) + + +temp_copy = labelfile.loc[val.astype(int),:].copy() + +temp_copy['region areas'] = count + +temp_copy.to_csv('../outputs/region_areas_quick_test.csv',sep=';') + allen_id_image = np.zeros((h, w)) # create an empty image array """for ph in range(h): diff --git a/test_data/create_test_data.py b/test_data/create_test_data.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391