Hi Shireen,I figured out the issue. The help message is not clear.% /Projects/ShapeWorks/ShapeWorks/bin/GenerateBinaryAndDTImagesFromMeshes-------------------------------GenerateBinaryAndDTImagesFromMeshes-------------------------------Compute binary images (i.e. segmentation) and their distance transforms of a given set of meshes (ply format)It uses a parameter file with the following tags- mesh: a list of ply file names for meshes to be processed- origin_x, origin_y, origin_z: the origin in physical units of the resulting distance transform- spacing_x, spacing_y, spacing_z: voxel spacing of the resulting distance transform- size_x, size_y, size_z: the size (rows,cols,slices) of the resulting distance transformWhen I read size I think measurement, as in the bounding box size (physical units). Which is what I was providing, 11,6,16. Especially because the other two inputs are in physical units. However, what is wanted the number of rows, cols, slices in the resulting image, 1100, 600, 1600. So there is a clarity issue.I think because the other inputs are physical units it would be better to have one supply everything in physical units. It could be either relative:origin_x, origin_y, origin_zsize_x, size_y, size_zabsolute:min_x, min_y, min_zmax_x, max_y, max_zBut for both is physical units (and in reality the origin and min are interchangeable). This does a couple of things, assures that all of the geometry is included as one typically knows the extents. Then internally the number of rows, columns, and slices are determined based on the spacing. Further, one can change the spacing and not need to calculate the number of rows, columns, and slices (and risk missing some geometry cause they were off by a decimal place).The other part that is confusing is stating “of the resulting distance transform” so it is for the output which if true then really the user has the ability to subsample a specific area of the mesh. Which is a nice feature but here again is not clear because at least for me I want all of the mesh sampled. Perhaps having something to this affect in the help but also the output message would be helpful.I have one rasterized image and waiting the DT to finish as my resulting image is 1100 x 600 x 1600.Cheers,
Allen
Allen Sanderson
SCI Institute
University of Utah
On Jun 2, 2020, at 9:47 AM, Shireen Elhabian <shireen@sci.utah.edu> wrote:Hi Jadie,<example_surface_1_00.ply>Could you help out with trouble shooting converting the attached mesh to distance transform / binary segmentation? In principle, should be similar to rasterizing femur meshes but it is not obvious what is different about this mesh expect not having triangular faces.thanks and best regards
Shireen
------------------------------------------
Shireen Elhabian, M.Sc., Ph.D.
Research Assistant Professor
School of Computing
Scientific Computing and Imaging Institute
University of Utah
WEB 2815
72 Central Campus Drive, Salt Lake City, UT, 84112
Phone (801) 587-3206
Fax (801) 585-6513
Home Page: http://www.sci.utah.edu/~shireen<example_surface_1_00.vtk>On Jun 1, 2020, at 3:17 PM, Allen Sanderson <allen@sci.utah.edu> wrote:Hi Shireen,I did not use the center of mass to determine the origin as I know the bounding box. I even tried to make the BB slightly larger a some of the polygons are likely on the boundary. That resulted in no voxels.Cheers,Allen
On May 30, 2020, at 10:38 PM, Shireen Elhabian <shireen@sci.utah.edu> wrote:Hi Allen,The rasterization uses the vtkPolyDataToImageStencil filter. I don’t an obvious reason to restricting it to triangular mesh. How about the origin? Did you use the mesh’s center of mass to determine it?Regards
Shireen
------------------------------------------
Shireen Elhabian, M.Sc., Ph.D.
Research Assistant Professor
School of Computing
Scientific Computing and Imaging Institute
University of Utah
WEB 2815
72 Central Campus Drive, Salt Lake City, UT, 84112
Phone (801) 587-3206
Fax (801) 585-6513
Home Page: http://www.sci.utah.edu/~shireenOn May 29, 2020, at 2:54 PM, Allen Sanderson <allen@sci.utah.edu> wrote:<example_surface_1_00.ply><example_surface_1_00.vtk>Attached are the original vtk and ply file if anyone wants to look at them.On May 29, 2020, at 2:41 PM, Allen Sanderson <allen@sci.utah.edu> wrote:Hi Shireen,My VTK files contains polydata which I have converted over to ply files. See the image below from VIsIt of the ply data. However, the rasterization does not seen to be working correctly. I created an xml file based on the extents of the data :<?xml version="1.0" ?><mesh>example_surface_1_00.ply</mesh><origin_x> -5.2</origin_x><origin_y> 0.0</origin_y><origin_z>-15.0</origin_z><size_x>10.4</size_x><size_y> 5.2</size_y><size_z>15.0</size_z><spacing_x>0.01</spacing_x><spacing_y>0.01</spacing_y><spacing_z>0.01</spacing_z>I have tried different spacings, but that did not really change anything. I checked all of the surface normals and they are correct (pointing out of the volume). Does the rasterization strictly want triangles??? There were no complaints.Cheers,<Screen Shot 2020-05-29 at 2.33.02 PM.png>Allen<Screen Shot 2020-05-29 at 2.17.06 PM.png>
On May 28, 2020, at 3:58 PM, Shireen Elhabian <shireen@sci.utah.edu> wrote:Hi Allen,Are your VTK files contain surface (triangular) meshes? Or volumetric meshes? As of now, ShapeWorks tools only support surface meshes. The femur use case (links below) should be a good starting point to see how you could groom/prep surface meshes to compute signed distance transforms as input to the Optimize phase.Though a bit late, happy Eid-ul-Fitr. Years ago I was in Egypt for Eid-ul-Fitr, then spent three weeks traveling around. I had a great time as it was the start of a three month tour around the Mediterranean Sea.Thanks for your greeting! Hope you and your family are safe and healthy.thanks and best regards
Shireen
------------------------------------------
Shireen Elhabian, M.Sc., Ph.D.
Research Assistant Professor
School of Computing
Scientific Computing and Imaging Institute
University of Utah
WEB 2815
72 Central Campus Drive, Salt Lake City, UT, 84112
Phone (801) 587-3206
Fax (801) 585-6513
Home Page: http://www.sci.utah.edu/~shireenOn May 28, 2020, at 3:13 PM, Allen Sanderson <allen@sci.utah.edu> wrote:Hi,It seems this script will process VTK data.ShapeWorks/Examples/Scripts/FullPrepPipeline/FullPipelinePrepRunMeshtoDT.shHowever this sub script:RasterizationVolumeOriginAndSize.shDoes not spit out the two files needed next:# convert meshes to distance transformsif [ $doMeshesToVolumes -eq 1 ]thenorigin_filename=${parentDir}origin_size/origin_sp${spacing}_nb${narrow_band}.txtsize_filename=${parentDir}origin_size/size_sp${spacing}_nb${narrow_band}.txtI see the names in an xml file but not sure what to make of that.So at this point I am pretty lost. As such it would be really good to have a zoom chat so I can understand the pipeline. Especially as parts of the pipeline are not going to be needed - the data is located and oriented. But the bounding box is different. But for now I would just like to have and understand a working pipeline.I can supply two VTK files that can be used for the initial setup. I have time tomorrow anytime to meet.Cheers,AllenAllen SandersonSCI InstituteUniversity of UtahOn May 27, 2020, at 2:49 PM, Allen Sanderson <allen@sci.utah.edu> wrote:Hi Shireen,
Though a bit late, happy Eid-ul-Fitr. Years ago I was in Egypt for Eid-ul-Fitr, then spent three weeks traveling around. I had a great time as it was the start of a three month tour around the Mediterranean Sea.
I am finally working through all of the parts of ShapeWorks. I went through the ellipse example and now working with some of my VTK data. But I am not seeing documentation on starting with VTK files. Just nrrd data. I have files that describe a closed surface (and as a volume elements) that I wanted to use for some initial testing and to familiarize myself with all the tools and steps.
I pinged Cam and Alan but they did not reply or did not know. Any pointers??
Cheers,
Allen
Archive powered by MHonArc 2.6.18.