Export multiple Matlab surfaces to a single Avizo© (VSG) compatible surface

Version 1.0.0.0 (2.25 KB) by Sheng Yue
Export multiple Matlab surfaces to a single Avizo© (VSG) compatible surface ((HyperSurface 0.1 ASCII
367 Downloads
Updated 28 Nov 2011

View License

writeAvizoSurfMulti save several surfaces defined by vertices and triangular
faces to a single Avizo?(VSG) compatible surface (HyperSurface 0.1 ASCII).

Usage:
writeAvizoSurfMulti(faceList,vertexList,filename,idList, colourList,colourExterior);
writeAvizoSurfMulti(faceList,vertexList,filename,idList, colourList);
writeAvizoSurfMulti(faceList,vertexList,filename,idList);
writeAvizoSurfMulti(faceList,vertexList,filename);
writeAvizoSurfMulti(faceList,vertexList);

Parameters:
faceList- A cell array of triangular faces, each cell is a n by 3
vertexList- A cell array of vertices, each cell is a n by 3
filename- the filename for exported surface
- Default value: ExportedAvizoSurface.surf
idList- A cell array of surface labels.
colourList- A cell array of surface colour;
colourExterior- the colour of the background
- Default value: [0.8 0.8 0.8];
Example:
[xx yy zz] = ellipsoid(0,0,0,50,40,30,30);
Tissue01 = surf2patch(xx,yy,zz,'triangles');
Tissue02 = Tissue01;
Tissue02.vertices = Tissue02.vertices*1.6 + 100;
Tissue03 = Tissue01;
Tissue03.vertices = Tissue03.vertices*0.8 -50;
vertexList = {Tissue01.vertices; Tissue02.vertices; Tissue03.vertices}
faceList = {Tissue01.faces; Tissue02.faces; Tissue03.faces}
idList = {'Tissue01'; 'Tissue02'; 'Tissue03'}
colourList = {[1 0 0]; [ 0 1 0]; [ 0 1 1]}
filename = 'ExportedSurfaces.surf';
colourExterior = [1 0.8 0.4];
writeAvizoSurfMulti(faceList,vertexList,filename,idList, colourList,colourExterior)

Author: Sheng Yue
Email:sheng.yue.84@gmail.com
Created:24 November 2011
Version:1.0

Cite As

Sheng Yue (2024). Export multiple Matlab surfaces to a single Avizo© (VSG) compatible surface (https://www.mathworks.com/matlabcentral/fileexchange/33962-export-multiple-matlab-surfaces-to-a-single-avizo-vsg-compatible-surface), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0