Doxygen Source Code Documentation
ShowPlane.m File Reference
Go to the source code of this file.
Functions | |
default is the current figure WriteIV if this string is not the planes that are displayed on the graph are written to an inventor format file units mm or tesscon default is tesscon if you specify then the xyz coordinates are transformed to tesscon before writing them out * | The (0/1) default is 0, flag for overwriting existing.iv file%%Output Parameters:%err:0 No Problem%:1 Mucho Problems%%PatchHandles:the handle to the patches displayed on the figure%%More Info:%see Plane_Equation%%%%Author:Ziad Saad%Date:Thu Oct 22 20:19:36 CDT 1998%Define the function name for easy referencingFuncName= 'ShowPlane';%initailize return variableserr=1;%check on the size of input dataif(nargin==1), Opt.Fig=[];Opt.OvrWrite=0;Opt.WriteIV= '';endif(~isfield(Opt,'OvrWrite')|isempty(Opt.OvrWrite)), Opt.OvrWrite=0;endif(size(EqPlane, 2)~=4), err=ErrEval(FuncName,'Err_Bad size for EqPlane' |
pop up a figure | if (~isfield(Opt,'Fig')|isempty(Opt.Fig)) |
end | figure (Opt.Fig) |
for (i=1:1:Nplanes) | |
ztmp (2) | |
ztmp (3) | |
ztmp (4) | |
form the four points on the plane | Node (inode+1,:) |
elseif (EqPlane(i, 2)~=0) | |
ytmp (1) | |
ytmp (2) | |
ytmp (3) | |
ytmp (4) | |
elseif (EqPlane(i, 1)~=0) | |
xtmp (1) | |
xtmp (2) | |
xtmp (3) | |
xtmp (4) | |
end verify that all points are on plane for debugging only | sum (EqPlane.*[Node(inode+1,:) 1])%sum(EqPlane.*[Node(inode+2 |
end verify that all points are on plane for debugging only for the patch | Pat (i,:) |
write to file | if (isfield(Opt,'WriteIV')&~isempty(Opt.WriteIV)) |
write to file | fprintf (1,'Saving patches to iv file%s...\n', Opt.WriteIV) |
if (~isfield(Opt,'units')|isempty(Opt.units)) | |
Variables | |
function [err, PatchHandles] | |
default is the current figure WriteIV if this string is not | empty |
default is the current figure WriteIV if this string is not the planes that are displayed on the graph are written to an inventor format file units mm or tesscon default is tesscon if you specify | mm |
return | |
end | Nplanes = size(EqPlane,1) |
Nnodes = 4.* Nplanes | |
pop up a figure Opt | Fig = gcf |
get the axis roperties of the figure | Xlim = get(gca,'Xlim') |
Ylim = get(gca,'ylim') | |
Zlim = get(gca,'Zlim') | |
inode = 0 | |
Node = zeros(Nnodes,3) | |
Pat = zeros(Nplanes,4) | |
ztmp = zeros(1,4) | |
end Now display those patches | vc = 0:1./Nnodes:(1-1./Nnodes) |
tcolor = [vc' (1-vc)' vc'] | |
PatchHandles | |
Opt OptIV | BaseCol = tcolor |
Opt | units = 'tesscon' |
Opt OptIV | OvrWrite = Opt.OvrWrite |
Opt OptIV | verbose = 0 |
exclude redundant last node end | err = WriteInv21Surf(Opt.WriteIV,Node,Pat,Opt.OptIV) 0 |
Function Documentation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Referenced by SUMA_UniqueInt(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Variable Documentation
|
Definition at line 137 of file ShowPlane.m. |
|
Definition at line 1 of file ShowPlane.m. |
|
Definition at line 145 of file ShowPlane.m. |
|
Definition at line 64 of file ShowPlane.m. |
|
Initial value: ShowPlane (EqPlane,Opt) % % [err,PatchHandles] = ShowPlane (EqPlane,Opt) % %Purpose: % This function displays a plane with equation ax + by + cz +d = 0 % The plane is defined by one sqaure patch % The planes span the current axis limits of the figure. % %Input Parameters: % EqPlane is a Nx4 matrix containing the equation of the plane containing each % triplet in Triplets. The plane passing by triplet i is speicifed in % EqPlane(i,:) the plane would be % EqPlane(i,1)x + EqPlane(i,2)y + EqPlane(i,3)z + EqPlane(i,4) = 0 % Opt is the options structure % .Fig is a handle to the figure you want the planes displayed in Definition at line 1 of file ShowPlane.m. |
|
Definition at line 123 of file ShowPlane.m. Referenced by SUMA_MemberFaceSets(), and SUMA_Paint_SO_ROIplanes(). |
|
|
Definition at line 60 of file ShowPlane.m. |
|
Referenced by SUMA_1DROI_to_DrawnROI(), and SUMA_OpenDrawnROI_1D(). |
|
Definition at line 59 of file ShowPlane.m. |
|
Definition at line 140 of file ShowPlane.m. |
|
Definition at line 76 of file ShowPlane.m. |
|
Initial value: patch('vertices',Node,'faces',Pat,...
'FaceVertexCData',tcolor,'FaceColor','flat')
Definition at line 131 of file ShowPlane.m. |
|
Definition at line 146 of file ShowPlane.m. |
|
Definition at line 129 of file ShowPlane.m. |
|
Definition at line 139 of file ShowPlane.m. Referenced by NI_set_units(). |
|
Definition at line 128 of file ShowPlane.m. Referenced by free_PCOR_voxel_corr(), free_voxel_corr(), get_coef(), get_lsqfit(), get_pcor(), get_pcor_thresh_coef(), get_variance(), new_PCOR_voxel_corr(), new_voxel_corr(), parevec_(), PCOR_get_coef(), PCOR_get_lsqfit(), PCOR_get_mcor(), PCOR_get_pcor(), PCOR_get_pcor_and_coef(), PCOR_get_perc(), PCOR_get_stdev(), PCOR_get_variance(), PCOR_UPDATE(), and update_voxel_corr(). |
|
Definition at line 141 of file ShowPlane.m. |
|
Definition at line 70 of file ShowPlane.m. |
|
Definition at line 71 of file ShowPlane.m. |
|
Definition at line 72 of file ShowPlane.m. |
|
Definition at line 77 of file ShowPlane.m. |