Hi I've successfully created the triangulation. Absolutely wonderful!!!
Instead of using all 15M+ voxels, I coarsened it first and used the coarse grid to create the triangulation as you suggested. I immediately wrote out the grid to the 'ucd' format. Now, I can read it in normally and refine it as much as I want. Many thanks to all of you. = I've got a few more questions: I have three material properties that I need to set. I've been able to set one of them as the cell's material id takes just the one. How do I set the other two? Also, because the Triangulation was generated explicitly, the output is blocky/pixelated/voxelated. Is there a way to smoothen the surfaces? Many thanks, Ted On 8 December 2010 14:00, Wolfgang Bangerth <[email protected]> wrote: > > > For the example I gave above, which is 3x2x2, the example points are: > > .... > > ... > > 2 0 0 > > 3 0 0 > > 0 1 0 > > ... > > ... > > > > Each coordinate above represents a voxel. So, essentially, each voxel is > a > > cell !?! > > So let's assume that each voxel in your mesh has its front bottom left > corner > at the coordinates you give above (I don't know if that's what you want, > but > let's assume; it shouldn't be hard to make these points the center of the > cell, or multiply all of this by a certain factor Delta x to account for > the > proper size of voxels). For simplicity allow me to also forget about the > z-coordinate and assume that we are only dealing with a 2d mesh. Then the > first of your cells has vertices > 2 0 > 2 1 > 3 0 > 3 1 > The second of the cells above has vertices > 3 0 > 3 1 > 4 0 > 4 1 > And so on, and so forth. So you will want to create all of these vertices > in > one big array, and everytime you add one to the array you should check > whether you already have it. In the example above, the first two vertices > of > the second cell you already have, so in the end for these two cells, you > only > need the following six vertices: > 2 0 > 2 1 > 3 0 > 3 1 > 4 0 > 4 1 > At the same time as you add, you need to record for each cell which > vertices > they are composed of. For the first cell you will find the following: > 0 1 2 3 > because none of the vertices of this cell were already in the array. For > the > second cell you will find > 2 3 4 5 > This way, as you loop over your set of MRI points, you will build up a > global > list of vertices and a list of 4-tuples indicating the four vertices of > each > cell. > > Best > W. > > -- > ------------------------------------------------------------------------- > Wolfgang Bangerth email: [email protected] > www: http://www.math.tamu.edu/~bangerth/ > >
_______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
