Sometimes I have to put text on a path

Friday, July 25, 2008

matlab .m Convert a volume defined by a surface to a 3D block.

Convert a volume defined by a surface to a binary 3D block.

http://www.mathworks.de/matlabcentral/fileexchange/loadFile.do?objectId=8772&objectType=file

First the surface will be rasterized on the grid. Therefore it calculates the position of points which lie in the surface in a finer resolution as defined by the inputgrid. These points were then tranfered to the point it the inputgrid by using a simple indexing technique. One could also use dsearchn, but this takes to much computational time, however, it can avoid the need of an equidistant grid. After rasterizing the patches the background is fill using imfill. The start point is set to the lower left corner. Afterwards the data block will be inverted. The script tests if the datablock is fully filled and tries to repeat the task slice by slice

No comments:

Post a Comment