No BSD License  

4.83333

4.8 | 6 ratings Rate this file 83 Downloads (last 30 days) File Size: 9.29 KB File ID: #8772
image thumbnail

surface2volume

by

 

20 Oct 2005 (Updated )

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

| Watch this File

File Information
Description

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.

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.0.1 (R14SP1)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (8)
07 Feb 2013 abdel amazoz

merci M. Daniel

07 Mar 2010 Steve

I would also like to know how to use it with data in (x,y,z) format. Can you please tell me?

15 Dec 2009 Alex Kararg

Given only the x,y,z coordinates of a surface S how does this function work?

28 Nov 2008 nor ki

nice tool,
but it confuses x with y coordinates in line 172

21 Oct 2008 Sebastian H

Amazing! Fast and reliable. Many, many thanks.

A hint: I had to change the outputFID from 0 to 1, Matlab 7.6 R2008a seems not to accept zero file identifiers for fprintf.

20 Oct 2008 Carlos Platero

I need 3D models

27 Feb 2007 thevan S

Very good and help full

21 Aug 2006 Hyok Jeong

very very good.

Contact us