Skip to content

Commit

Permalink
voxel2mesh -blocky: Fix triangulation
Browse files Browse the repository at this point in the history
  • Loading branch information
Lestropie committed Dec 2, 2024
1 parent ca0276b commit f666c76
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/surface/algo/image2mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ namespace MR
const auto existing = vox2vertindex.find (voxels[in_vertex]);
if (existing == vox2vertindex.end()) {
triangle_vertices[out_vertex] = vertices.size();
vox2vertindex.insert(std::make_pair(voxels[in_vertex], vertices.size()));
Eigen::Vector3d pos_voxelspace (default_type(voxels[in_vertex][0]) - 0.5, default_type(voxels[in_vertex][1]) - 0.5, default_type(voxels[in_vertex][2]) - 0.5);
vertices.push_back (transform.voxel2scanner * pos_voxelspace);
} else {
Expand Down

0 comments on commit f666c76

Please sign in to comment.