Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
scale mesh points before mapping to new anatomical space (#62)
Browse files Browse the repository at this point in the history
Co-authored-by: Will Graham <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Aug 21, 2023
1 parent 5dd3890 commit fc4e4cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bg_atlasgen/wrapup.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,15 @@ def wrapup_atlas_from_data(
for mesh_id, meshfile in meshes_dict.items():
mesh = mio.read(meshfile)

if scale_meshes:
# Scale the mesh to the desired resolution, BEFORE transforming:
mesh.points *= resolution

# Reorient points:
mesh.points = space_convention.map_points_to(
descriptors.ATLAS_ORIENTATION, mesh.points
)

# Scale the mesh to be in microns, if necessary:
if scale_meshes:
mesh.points *= resolution

# Save in meshes dir:
mio.write(mesh_dest_dir / f"{mesh_id}.obj", mesh)

Expand Down

0 comments on commit fc4e4cb

Please sign in to comment.