Skip to content

Commit

Permalink
Fix edge case (neurolabusc/nii2mesh#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Dec 4, 2022
1 parent 7673b29 commit e6f09fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/niimath.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ int show_help( void ) {
printf(" -demean : remove average signal across volumes (requires 4D input)\n");
printf(" -edt : estimate Euler Distance Transform (distance field). Assumes isotropic input\n");
printf(" -floor : round voxels downwards to the nearest integer\n");
printf(" -mesh : meshify requires 'd'ark, 'm'edium, 'b'right or numeric isosurface ('nii2mesh bet -mesh -i d mesh.gii')\n");
printf(" -mod : modulus fractional remainder - same as '-rem' but includes fractions\n");
printf(" -otsu <mode> : binarize image using Otsu's method (mode 1..5; higher yields more bright voxels)\n");
printf(" -power <exponent> : raise the current image by following exponent\n");
Expand Down
2 changes: 1 addition & 1 deletion src/quadric.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ void laplacian_smoothHC(vec3d *verts, vec3i *tris, int nvert, int ntri, double a
triangles[i].v[2] = tris[i].z;
}
int nref = 0;
struct TRef* refs = (struct TRef*) malloc(ntri * 6 * sizeof(struct TRef)); //overprovision initially *ntri * 3, allow room for growth
struct TRef* refs = (struct TRef*) malloc(ntri * 9 * sizeof(struct TRef)); //overprovision initially *ntri * 3, allow room for growth
int ntriOK = ntri;
int vertex_count = nvert;
update_mesh(0, triangles, vertices, refs, &nref, &ntriOK, &vertex_count);
Expand Down

0 comments on commit e6f09fc

Please sign in to comment.