I have a CT data set where I have managed to use thresholding to
delineate my object on every slice and I have used bwtraceboundary to
generate a contour (x and y coordinates) around the structure and save
it for each slice. I increment a z value for each CT slice so
basically I
have a Nx3 array of x, y and z coordinates which define my complete
object in 3D.
I want to export this to some 3D package so I can manipulate it and
clean it up and there is a matlab code available to do this, called
surf2stl (stl is a stereolithography file format) but I can't figure
out how to organize my data to feed it to this function.
Should I organize my data in some other way to achieve this?
Here is the help section of the surf2stl code:
SURF2STL Write STL file from surface data.
SURF2STL('filename',X,Y,Z) writes a stereolithography (STL) file
for a surface with geometry defined by three matrix arguments, X,
Y
and Z. X, Y and Z must be two-dimensional arrays with the same
size.
SURF2STL('filename',x,y,Z), uses two vector arguments replacing
the first two matrix arguments, which must have length(x) = n and
length(y) = m where [m,n] = size(Z). Note that x corresponds to
the columns of Z and y corresponds to the rows.
SURF2STL('filename',dx,dy,Z) uses scalar values of dx and dy to
specify the x and y spacing between grid points.
SURF2STL(...,'mode') may be used to specify the output format.
'binary' - writes in STL binary format (default)
'ascii' - writes in STL ASCII format
Example:
surf2stl('test.stl',1,1,peaks);
See also SURF.
Author: Bill McDonald, 02-20-04
Any help will be greatly appreciated. Thanks a lot!!!!!
Zubin.
I hope one of these works
http://www.mathworks.com/matlabcentral/newsreader/create_message?reply_id=711429
http://www.advancedmcode.org/how-to-plot-a-coloured-surface-from-3d-scatter.html
http://www.advancedmcode.org/surface-recostruction-from-scattered-points-cloud-mycrustopen.html
http://www.advancedmcode.org/surface-recostruction-from-scattered-points-cloud-mycrust-robust.html
Thanks.
Zubin <maste...@gmail.com> wrote in message <f2588406-67cf-4632...@u15g2000prd.googlegroups.com>...