diff --git a/README.md b/README.md index 2bb29e4..48f812e 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,10 @@ A command-line tool to work with volume data. -info information: dimensions, data type, pixel size -threshold float int threshold(level,direction) -volume calculate volume +-new create a new volume with dimx,dimy,dimz,pixx,pixy,pixz,offx,offy,offz -zigzag print volume values in zigzag order -decompose str decompose(basename) a volume with many values into volumes with one single value --strokeMesh str set the vertices of the mesh (text format) at input path to value=max+1 +-strokeMesh str set the surface of the mesh (text format) at input path to value=max+1; mesh needs to be in voxel coordinates -surfaceNets level path extract isosurface from the volume at the indicated level using the surface nets algorithm, save at the indicated path -sampleMesh str1 str2 sampleMesh(mesh_path, result_path) save the volume values at the vertices of the mesh pointed by the file path to the result path diff --git a/main.c b/main.c index fb4bf2e..354b40c 100644 --- a/main.c +++ b/main.c @@ -1861,7 +1861,8 @@ void strokeMesh(char *path) sz.y=max.y-min.y; sz.z=max.z-min.z; */ - + +/* // transform vertex coordinates to voxel indices printf("offset: %f, %f, %f\n",h->srow_x[3],h->srow_y[3],h->srow_z[3]); printf("pixdim: %f, %f, %f\n",pixdim[0],pixdim[1],pixdim[2]); @@ -1871,7 +1872,8 @@ void strokeMesh(char *path) p[i].y=(p[i].y-h->srow_y[3])/pixdim[1]; p[i].z=(p[i].z-h->srow_z[3])/pixdim[2]; } - +*/ + // scan triangles for(l=0;ldim[1]; @@ -2572,9 +2573,9 @@ int saveMaskedVolume_Text(char *path, char *maskpath){ printf("volume: min:%f max:%f \n",min(),max()); - for(i=0;ipixdim[1],m.p[i].y*hdr->pixdim[2],m.p[i].z*hdr->pixdim[3]); +// fprintf(f,"%f %f %f\n",m.p[i].x*hdr->pixdim[1],m.p[i].y*hdr->pixdim[2],m.p[i].z*hdr->pixdim[3]); + fprintf(f,"%f %f %f\n",m.p[i].x,m.p[i].y,m.p[i].z); for(i=0;i