Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

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

elseif EqPlane(i, 1)~  = 0  ) 
 

elseif EqPlane(i, 2)~  = 0  ) 
 

end figure Opt.  Fig  ) 
 

for = 1:1:Nplanes  ) 
 

write to file fprintf ,
'Saving patches to iv file%s...\n ,
Opt.  WriteIV
 

if isfield(Opt,'units')|isempty(Opt.units)  ) 
 

write to file if isfield(Opt,'WriteIV')&~isempty(Opt.WriteIV)   ) 
 

pop up a figure if isfield(Opt,'Fig')|isempty(Opt.Fig)  ) 
 

form the four points on the plane Node inode 1,
 

end verify that all points are on plane for debugging only for the patch Pat ,
 

end verify that all points are on plane for debugging only sum EqPlane.*  [Node(inode+1,:) 1]  ) 
 

Referenced by alter_MCW_pbar(), backward_solve_inplace(), baseline_mean(), basis_evaluation(), basis_write_iresp(), basis_write_sresp(), basym(), bgrat(), blackman_window(), bpser(), calc_sspe(), calculate_results(), center_of_mass(), cl1_fort(), Compute1DSummedAreaTable(), Compute2DSummedAreaTable(), compute_choleski(), compute_node_areas(), compute_node_vols(), ComputeD0(), ComputeWtfactors(), convci(), CORREL_main(), cumchn(), cumfnc(), delayed_lsqfit(), dist_fn(), DoBIntraCode(), DoIntraCode(), DrawSubWindow(), dt1(), EDIT_aver_fvol(), EDIT_cluster_array(), EDIT_filter_volume(), ENTROPY_compute(), ENTROPY_datablock(), filter(), find_base_value(), forward_solve_inplace(), gaminv(), get_best_shift(), get_lsqfit(), get_octant_clips(), grat1(), gratio(), hamming_window(), init_indep_var_matrix(), initialize(), InitNormalTables(), linear_filter_extend(), linear_filter_trend(), linear_filter_zero(), lsqfit(), main(), MASKAVE_main(), matrix_multiply(), matrix_norm(), matrix_psinv(), matrix_singvals(), matrix_sumabs(), Max_func(), MCW_inverse_histogram_sh(), MCW_pbar_to_mri(), mean_array(), mri_brainormalize(), mri_edit_image(), mri_entropy16(), mri_entropy8(), mri_get_cmass_2D(), mri_get_cmass_3D(), mri_psinv(), mri_sharpen(), PBAR_resize_CB(), PCOR_get_lsqfit(), PCOR_get_perc(), PDF_normalize(), pfit(), plot_line(), process(), Put_image(), qh_rotatepoints(), REORDER_main(), SHM_string_to_key(), startup_lsqfit(), STATS_tsfunc(), string_to_key(), sum32(), surf_ave_radius(), THD_mean_brick(), THD_rms_brick(), THRESH_compute(), threshold_data(), tnonc_s2p(), vector_dot(), vector_dotself(), vector_multiply(), vector_multiply_subtract(), VOLREG_main(), vpBicubicFilter(), vpGaussianFilter(), and vpLinearFilter().

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  ) 
 

xtmp  ) 
 

xtmp  ) 
 

xtmp  ) 
 

xtmp  ) 
 

Referenced by SUMA_UniqueInt().

ytmp  ) 
 

ytmp  ) 
 

ytmp  ) 
 

ytmp  ) 
 

ztmp  ) 
 

ztmp  ) 
 

ztmp  ) 
 


Variable Documentation

Opt OptIV BaseCol = tcolor
 

Definition at line 137 of file ShowPlane.m.

default is the current figure WriteIV if this string is not empty
 

Definition at line 1 of file ShowPlane.m.

exclude redundant last node end err = WriteInv21Surf(Opt.WriteIV,Node,Pat,Opt.OptIV) 0
 

Definition at line 145 of file ShowPlane.m.

pop up a figure Opt Fig = gcf
 

Definition at line 64 of file ShowPlane.m.

function[err, PatchHandles]
 

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.

inode = 0
 

Definition at line 123 of file ShowPlane.m.

Referenced by SUMA_MemberFaceSets(), and SUMA_Paint_SO_ROIplanes().

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
 

Definition at line 1 of file ShowPlane.m.

Referenced by AFNI_initialize_controller(), AFNI_new_fim_menu(), bisect_(), calculate_results(), check_fill_seq(), cinvit_(), combak_(), comlr2_(), comlr_(), COMPRESS_add_suffix(), COMPRESS_filename(), COMPRESS_fopen_read(), COMPRESS_fopen_write(), cortb_(), DC_rgb_to_ovrgb(), DMAT_pow(), DMAT_svdrot_new(), DMAT_x_xt(), DMAT_xt_x(), DRAW_2D_circle(), DRAW_2D_expand(), DRAW_3D_expand(), DRAW_3D_sphere(), drive_MCW_grapher(), drive_MCW_imseq(), elmbak_(), eltran_(), FFT_action(), FFT_selection(), get_siemens_extra_info(), GRA_fim_CB(), hqr2_(), hqr_(), init_indep_var_matrix(), init_mat(), invit_(), main(), mcw_load(), mri_dup2D_mode(), mri_warp3d_align_one(), NI_stat_decode(), ortbak_(), ortran_(), PC_read_opts(), PLUG_setup_widgets(), RENAME_main(), REORDER_main(), Resample(), SER_addto_vector_textmode(), STATS_tsfunc(), SUMA_ver2date(), svd_double(), THD_open_3D(), THD_set_storage_mode(), THD_set_write_compression(), THD_set_write_order(), tsturm_(), UC_read_opts(), UTL_ConvertTimetoFloat(), and VL_command_line().

Nnodes = 4.* Nplanes
 

Definition at line 60 of file ShowPlane.m.

Node = zeros(Nnodes,3)
 

Referenced by SUMA_1DROI_to_DrawnROI(), and SUMA_OpenDrawnROI_1D().

end Nplanes = size(EqPlane,1)
 

Definition at line 59 of file ShowPlane.m.

Opt OptIV OvrWrite = Opt.OvrWrite
 

Definition at line 140 of file ShowPlane.m.

Pat = zeros(Nplanes,4)
 

Definition at line 76 of file ShowPlane.m.

PatchHandles
 

Initial value:

 patch('vertices',Node,'faces',Pat,...
          'FaceVertexCData',tcolor,'FaceColor','flat')

Definition at line 131 of file ShowPlane.m.

return
 

Definition at line 146 of file ShowPlane.m.

tcolor = [vc' (1-vc)' vc']
 

Definition at line 129 of file ShowPlane.m.

end Opt OptIV units = 'tesscon'
 

Definition at line 139 of file ShowPlane.m.

Referenced by NI_set_units().

end Now display those patches vc = 0:1./Nnodes:(1-1./Nnodes)
 

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().

Opt OptIV verbose = 0
 

Definition at line 141 of file ShowPlane.m.

get the axis roperties of the figure Xlim = get(gca,'Xlim')
 

Definition at line 70 of file ShowPlane.m.

Ylim = get(gca,'ylim')
 

Definition at line 71 of file ShowPlane.m.

Zlim = get(gca,'Zlim')
 

Definition at line 72 of file ShowPlane.m.

ztmp = zeros(1,4)
 

Definition at line 77 of file ShowPlane.m.

 

Powered by Plone

This site conforms to the following standards: