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

Problem solving nonlinear issues

- Revert padding change as it did not fix the bug
- Create black atlas maps from nonlinear alignment.json to investigate error
- found that regions that differ between black atlas maps and VisuAlign atlas maps give different numerical output in reports (e.g. s005).
parent 6eae355a
No related branches found
No related tags found
No related merge requests found
......@@ -224,8 +224,14 @@ def flat_to_dataframe(
if (image_vector is not None) and (volume is not None):
image = generate_target_slice(image_vector, volume)
image = np.float64(image)
random_number = np.random.randint(0,1000)
outim = ((image==0) * 255).astype(np.uint8)
cv2.imwrite(f"{random_number}_linear.jpg", outim)
if triangulation is not None:
image = warp_image(image, triangulation, rescaleXY)
outim = ((image==0) * 255).astype(np.uint8)
cv2.imwrite(f"{random_number}_warped.jpg", outim)
elif file.endswith(".flat"):
image = read_flat_file(file)
elif file.endswith(".seg"):
......
workflows/127_linear.jpg

12.6 KiB

workflows/127_warped.jpg

12.7 KiB

workflows/131_linear.jpg

9.99 KiB

workflows/519_linear.jpg

9.81 KiB

workflows/519_warped.jpg

9.92 KiB

workflows/741_linear.jpg

10.5 KiB

workflows/741_warped.jpg

10.2 KiB

workflows/886_linear.jpg

9.77 KiB

workflows/886_warped.jpg

9.06 KiB

......@@ -13,14 +13,15 @@ from PyNutil import PyNutil
###The label_path is the path to the corresponding atlas .csv
###The object_cutoff is a cut-off for min object size
### get_coordinates, if use_flat=True, place flat files in folder titled "flat_files" at same level as "segmentations" folder
#This does not use BrainGlobe API.
pnt = PyNutil(
segmentation_folder="../tests/test_data/linear_allen_mouse/",
alignment_json="../tests/test_data/linear_allen_mouse/alignment_linear.json",
segmentation_folder="../tests/test_data/nonlinear_allen_mouse/",
alignment_json="../tests/test_data/nonlinear_allen_mouse/alignment.json",
colour=[0, 0, 0],
atlas_path="../tests/test_data/allen_mouse_2017_atlas/annotation_25_reoriented_2017.nrrd",
label_path="../tests/test_data/allen_mouse_2017_atlas//allen2017_colours.csv",
)
pnt.get_coordinates(object_cutoff=0, use_flat=False)
pnt.quantify_coordinates()
pnt.save_analysis("../test_result/test_linear_allen_mouse")
pnt.save_analysis("../test_result/test_nonlinear_allen_mouse_noflat_24_02_25")
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