Creating a 3D mesh on an Image3D Figure - Mathematica Stack Exchange most recent 30 from mathematica.stackexchange.com 2019-09-22T04:55:55Z https://mathematica.stackexchange.com/feeds/question/133525 https://creativecommons.org/licenses/by-sa/4.0/rdf https://mathematica.stackexchange.com/q/133525 1 Creating a 3D mesh on an Image3D Figure Christa https://mathematica.stackexchange.com/users/43141 2016-12-14T18:46:05Z 2016-12-14T18:46:05Z <p>I have a stack of images that I compile with the Image3D function. The resulting figure is 360x360x93 pixels and named "X". My goal is to mesh the figure. </p> <p>I have defined points that correspond the the corners of the figure and tried to "stick" them on my figure:</p> <pre><code>coord = Join[{{1., 1., 1.}, {360., 1., 1.}, {360., 360., 1.}, {1., 360., 1.}, {1., 1., 93.}, {360., 1., 93.}, {360., 360., 93.}, {1., 360., 93.}}, PixelValuePositions[X, 1]] </code></pre> <p>This returns a massive list of points and doesn't "stick" the points like I'd hoped. I'd like to be able to go on and run the following code to make the mesh:</p> <pre><code>boundaryElements = {TetrahedronElement[{{1, 2, 3, 4}, {5, 6, 7, 8}, {1, 2, 7, 6}, {4, 5, 9, 3}, {1, 4, 5, 6}, {2, 7, 8, 3}}]}; bmesh = ToBoundaryMesh["Coordinates" -&gt; coord, "BoundaryElements" -&gt; boundaryElements]; bmesh["Wireframe"] </code></pre> <p>I've tried many different things to make the points "stick" to my figure but I have been unsuccessful each time. I've also defined a separate variable as the coordinates and used the Join function in the following way:</p> <pre><code>coord2 = Join [coordinates, PixelValuePositions[X,1]] </code></pre> <p>I have been able to create an empty rectangular box of dimensions 360x360x93 and create a mesh of it, but I cannot replicate this on an actual figure.</p>