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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Variable Documentation
|
Definition at line 57 of file AFNI_XYZcontinuous2Index.m. |
|
Definition at line 64 of file AFNI_XYZcontinuous2Index.m. |
|
Definition at line 52 of file AFNI_XYZcontinuous2Index.m. |
|
Definition at line 83 of file AFNI_XYZcontinuous2Index.m. |
|
|
Definition at line 125 of file AFNI_XYZcontinuous2Index.m. |
|
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. |
|
Definition at line 29 of file AfniIndex2AfniXYZ.m. |
|
Definition at line 107 of file AFNI_XYZcontinuous2Index.m. |
|
Definition at line 88 of file AFNI_XYZcontinuous2Index.m. |
|
Definition at line 120 of file AFNI_XYZcontinuous2Index.m. Referenced by THD_reconcile_parents(). |
|
Definition at line 120 of file AFNI_XYZcontinuous2Index.m. |
|
Definition at line 126 of file AFNI_XYZcontinuous2Index.m. |
|
Definition at line 79 of file AFNI_XYZcontinuous2Index.m. |