Code covered by the BSD License
-
mia_Xpixval(arg1, arg2)
mia_Xpixval display information about image pixels in axial image
-
mia_Ypixval(arg1, arg2)
mia_Ypixval display information about image pixels in coronal image
-
mia_Zpixval(arg1, arg2)
mia_Zpixval display information about image pixels
-
axes2pix(dim, x, axesx)
AXES2PIX Convert axes coordinates to pixel coordinates.
-
mia_Start3dCursor(imaVOLin, p...
function FigDataIn = mia_Start3dCursor(imaVOLin,pixsize,colormaptype,minpix, maxpix)
-
mia_Stop3dCursor()
% destroy the 3 figures showing the 3 perpendicular slices
-
orthogonalslicer(imaVOL, pixs...
ORTHOGONALSLICER
-
View all files
from
Orthogonalslicer
by Laszlo Balkay
Volume explorer tool by 3 orthogonal slices
|
| axes2pix(dim, x, axesx)
|
function pixelx = axes2pix(dim, x, axesx)
%AXES2PIX Convert axes coordinates to pixel coordinates.
% PIXELX = AXES2PIX(DIM, X, AXESX) converts axes coordinates
% (as returned by get(gca, 'CurrentPoint'), for example) into
% pixel coordinates. X should be the vector returned by
% X = get(image_handle, 'XData') (or 'YData'). DIM is the
% number of image columns for the x coordinate, or the number
% of image rows for the y coordinate.
% See also IMAGE.
% Copyright 1993-2001 The MathWorks, Inc.
% $Revision: 5.11 $ $Date: 2001/01/18 15:51:12 $
% Error checking on input arguments.
error_str = nargchk(3, 3, nargin);
if (~ isempty(error_str));
error('There must be 3 input arguments.');
end
if (max(size(dim)) ~= 1)
error('First argument must be a scalar.');
end
if (min(size(x)) > 1)
error('X must be a vector.');
end
xfirst = x(1);
xlast = x(max(size(x)));
if (dim == 1)
pixelx = axesx - xfirst + 1;
return;
end
xslope = (dim - 1) / (xlast - xfirst);
if ((xslope == 1) & (xfirst == 1))
pixelx = axesx;
else
pixelx = xslope * (axesx - xfirst) + 1;
end
|
|
Contact us at files@mathworks.com