Skip to content

AFNI/NIfTI Server

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

Doxygen Source Code Documentation


AFNI_XYZcontinuous2Index.m File Reference

Go to the source code of this file.


Functions

the default is RAI The code
can be either a string or
a vector of 
numbers (see AFNI_CoordChange for more on that)%IndexDim(3 or 1) is an optional parameter used to specify if Indx is Mx3 or Mx1 vector%(see AfniIndex2AfniXYZ for more info)%The default is 3.If you choose to specify IndexDim
 if (nargin > 2) if(~isempty(CoordCode))
 if (nargin==4)
 if (~isempty(IndexDim))
make sure coordinate system
is RAI 
if (ChangeCoord)
The equations that would change
the coordinate system to indices
must take the indces in the
same RAI permutation that
the slices are entered into
to3d 
in (No need to worry about R versus L or A versus P)%determine the ordering map to go from any permutation of RAI to RAI%[maploc(1)
 Indx (:, 2)
 Indx (:, 3)
 Indx (:, maploc(2))
 Indx (:, maploc(3))
Feb Indx (:, 1)
 if (~isempty(ineg))
 Indx (ineg)=0
 if (~isempty(iover))
 Indx (iover, 1)
 Indx (iover, 2)
 Indx (iover, 3)
end if change the Index dimension
from Mx3 to Mx1 
if (ChangeDim &IndexDim==1)

Variables

 function [err, Indx]
the default is RAI The code
can be either a string or
a vector of you must specify
CoordCode(you could use an
empty string to leave CoordCode
to the default)%%Output Parameters
Debug Flag 
DBG = 1
 ChangeCoord = 0
end end ChangeDim = 0
end end initailize return
variables 
err = 1
 Indx = []
make sure coordinate system
is RAI else 
XYZdic = AFNI_CoordChange (CoordCode, 'RAI', XYZmm) XYZmm
end now change dicomm to dmm [err, XYZmm, map] = THD_dicomm_to_3dmm (Info, XYZdic)
The equations that would change
the coordinate system to indices
must take the indces in the
same RAI permutation that
the slices are entered into
to3d 
jnk = find(Info.Orientation == 'R')
 ineg = find(Indx < 0)
 end [iover] = find(Indx(:,1) > Info.DATASET_DIMENSIONS(1)-1)
end Now
end if needed
 return

Function Documentation

end if change the Index dimension from Mx3 to Mx1 if ChangeDim IndexDim = = 1  ) 
 

if isempty(iover)  ) 
 

if isempty(ineg)  ) 
 

make sure coordinate system is RAI if ChangeCoord   ) 
 

if isempty(IndexDim)  ) 
 

if nargin  = = 4  ) 
 

if nargin  ,
 

The equations that would change the coordinate system to indices must take the indces in the same RAI permutation that the slices are entered into to3d in No need to worry about R versus L or A versus  P  ) 
 

Referenced by CalcRLEHuffLength(), cl1_fort(), DC_gray_change(), DC_gray_conbrio(), DC_gray_contrast(), init_error_limit(), main(), Make_RGB_lookup(), mp_quant_block(), mp_quant_zig_block(), mp_rle_huff_block(), mp_rle_huff_pblock(), Mpost_QuantZigBlock(), Mpost_RLEHuffIBlock(), Mpost_RLEHuffPBlock(), Mpost_UnQuantZigBlock(), Mpost_UnQuantZigBlockLaplace(), set_indent(), srface_(), SUMA_Cmap_To_SO(), SUMA_Convexity_Engine(), SUMA_CreateIcosahedron(), SUMA_FillToVoxelMask(), SUMA_isConsistent(), SUMA_isTriLinked(), SUMA_Reposition_Touchup(), SUMA_StretchToFitLeCerveau(), SUMA_Subdivide_Mesh(), SUMA_Suggest_Touchup(), SUMA_Suggest_Touchup_Grad(), THD_set_int_atr(), and UnQuantZig().

Indx iover  ,
 

Indx iover  ,
 

Indx iover  ,
 

Indx ineg   )  [pure virtual]
 

Feb Indx ,
 

Indx ,
maploc(3) 
 

Indx ,
maploc(2) 
 

Indx ,
 

Indx ,
 

the default is RAI The code can be either a string or a vector of numbers see AFNI_CoordChange for more on  that  ) 
 


Variable Documentation

ChangeCoord = 0
 

Definition at line 57 of file AFNI_XYZcontinuous2Index.m.

ChangeDim = 0
 

Definition at line 64 of file AFNI_XYZcontinuous2Index.m.

the default is RAI The code can be either a string or a vector of you must specify CoordCode (you could use an empty string to leave CoordCode to the default) % %Output Parameters Debug Flag DBG = 1
 

Definition at line 52 of file AFNI_XYZcontinuous2Index.m.

end now change dicomm to dmm[err, XYZmm, map] = THD_dicomm_to_3dmm (Info, XYZdic)
 

Definition at line 83 of file AFNI_XYZcontinuous2Index.m.

end[iover] = find(Indx(:,1) > Info.DATASET_DIMENSIONS(1)-1)
 

Definition at line 116 of file AFNI_XYZcontinuous2Index.m.

Referenced by cmp_chars(), cmp_doubles(), cmp_floats(), cmp_ints(), cmp_longs(), cmp_schars(), cmp_shorts(), convert1(), CTF_count(), decode_mpeg2(), demux(), dup_NC_attrarrayV(), dup_NC_dimarrayV(), dup_NC_vararrayV(), elvis_CB(), es_loop(), fill_NC_var(), free_NC_attrarrayV0(), free_NC_dimarrayV0(), free_NC_vararrayV0(), JMovie2JPEG(), memplot_to_RGB_sef(), memplot_to_X11_sef(), modify_ex(), mpeg2_buffer(), mpeg2_slice_region(), NC_computeshapes(), NC_fill_char(), NC_fill_double(), NC_fill_float(), NC_fill_int(), NC_fill_schar(), NC_fill_short(), NC_varoffset(), NCedgeck(), ncx_getn_float_float(), ncx_getn_int_int(), ncx_getn_int_long(), ncx_len_NC_attrarray(), ncx_len_NC_dimarray(), ncx_len_NC_vararray(), ncx_putn_float_float(), ncx_putn_int_int(), ncx_putn_int_long(), ps_loop(), pva_demux(), pva_loop(), queryTabletPos(), ReadInputFileNames(), set_upper(), SUMA_BinarySuck(), SUMA_binSearch(), t_pad_getn_schar_double(), t_pad_getn_schar_float(), t_pad_getn_schar_int(), t_pad_getn_schar_long(), t_pad_getn_schar_schar(), t_pad_getn_schar_short(), t_pad_getn_schar_uchar(), t_pad_getn_short_double(), t_pad_getn_short_float(), t_pad_getn_short_int(), t_pad_getn_short_long(), t_pad_getn_short_schar(), t_pad_getn_short_short(), t_pad_getn_short_uchar(), t_pad_putn_schar_double(), t_pad_putn_schar_float(), t_pad_putn_schar_int(), t_pad_putn_schar_long(), t_pad_putn_schar_schar(), t_pad_putn_schar_short(), t_pad_putn_schar_uchar(), t_pad_putn_short_double(), t_pad_putn_short_float(), t_pad_putn_short_int(), t_pad_putn_short_long(), t_pad_putn_short_schar(), t_pad_putn_short_short(), t_pad_putn_short_uchar(), ts_loop(), v1h_get_NC_attrarray(), v1h_get_NC_dimarray(), v1h_get_NC_vararray(), v1h_put_NC_attrarray(), v1h_put_NC_dimarray(), v1h_put_NC_vararray(), write_indent(), and writeblanks().

end if change the Index dimension from Mx3 to Mx1 end err = 1
 

Definition at line 125 of file AFNI_XYZcontinuous2Index.m.

function[err, Indx]
 

Initial value:

 AFNI_XYZcontinuous2Index (XYZmm, Info, CoordCode, IndexDim)
%
%   [err,Indx] = AFNI_XYZcontinuous2Index (XYZmm, Info, [CoordCode], [IndexDim])
%
%Purpose:
%   Change from voxel XYZ in mm to XYZindex (called Voxel Coords in AFNI) 
%   The mm and voxel coordinates refer to the values displayed 
%   on the top left corner of AFNI controller.
%   CoordCode is the one you'd set from the Coord Order plugin
%   
%   
%Input Parameters:
%   XYZmm : The continuous coordinates corresponding to Indx
%       The coordnate system is assumed to be RAI (DICOM) 
%       unless otherwise specified by CoordCode
%   Info is the output of BrikInfo
%   CoordCode is an optional parameter used to specify the coordinates system of XYZmm
%      if empty or not specified

Definition at line 1 of file AFNI_XYZcontinuous2Index.m.

end Indx = []
 

Definition at line 29 of file AfniIndex2AfniXYZ.m.

ineg = find(Indx < 0)
 

Definition at line 107 of file AFNI_XYZcontinuous2Index.m.

The equations that would change the coordinate system to indices must take the indces in the same RAI permutation that the slices are entered into to3d jnk = find(Info.Orientation == 'R')
 

Definition at line 88 of file AFNI_XYZcontinuous2Index.m.

end if needed
 

Definition at line 120 of file AFNI_XYZcontinuous2Index.m.

Referenced by THD_reconcile_parents().

end Now
 

Definition at line 120 of file AFNI_XYZcontinuous2Index.m.

return
 

Definition at line 126 of file AFNI_XYZcontinuous2Index.m.

make sure coordinate system is RAI else XYZdic = AFNI_CoordChange (CoordCode, 'RAI', XYZmm) XYZmm
 

Definition at line 79 of file AFNI_XYZcontinuous2Index.m.

 

Powered by Plone

This site conforms to the following standards: