亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mia_pixval.m

?? 醫(yī)學圖像處理matlab工具箱
?? M
?? 第 1 頁 / 共 2 頁
字號:

images = findobj(figHandle, 'Tag','MainImage');
if isempty(images)
   imageHandle=0; imageType=''; img=[]; x=0; y=0;
   return
end
% Make sure that the Image's Button Down & Up functions will queue
set(images, 'ButtonDownFcn', 'mia_pixval(''ButtonDownOnImage'')', ...
   'Interruptible', 'off', 'BusyAction', 'Queue');
axHandles = get(images, {'Parent'});
axPositions = get([axHandles{:}], {'Position'});
axCurPt = get([axHandles{:}], {'CurrentPoint'});

% Loop over the axes, see if we are above any of them
imageHandle = 0;  
for k=1:length(axHandles)
   XLim = get(axHandles{k}, 'XLim');
   YLim = get(axHandles{k}, 'YLim');
   pt = axCurPt{k};
   x = pt(1,1); y = pt(1,2);
   if x>=XLim(1) & x<=XLim(2) & y>=YLim(1) & y<=YLim(2)
      imageHandle = images(k);
      break;
   end
end

% Figure out image type
if imageHandle ~= 0
   [img,flag] = getimage(imageHandle);
      
   switch flag
   case 1
      imageType = 'indexed';
   case 2     %Grayscale in standard range
      imageType = 'intensity'; 
   case 3     %Logical or Grayscale in nonstandard range
      if islogical(img)
        imageType = 'logical';
      else
        imageType = 'intensity';
      end
   case 4
      imageType = 'rgb';
   otherwise
      msgId = 'Images:pixval:invalidImage';
      msg = ['Invalid image, GETIMAGE returned flag = ' flag '.'];
      error(msgId, '%s', msg);
   end
else
   imageHandle=0; imageType=''; img=[]; x=0; y=0;
end

%%%
%%%  Sub-function - UpdatePixelValues
%%%

function UpdatePixelValues(imageHandle, imageType, displayBar,img,x,y)
%   This is the motion callback for when we are displaying
%   pixels.  Either we are in automatic display mode and the
%   mouse pointer is moving around or we are in normal mode
%   and there has been a button-down but not yet a button up.
%   I get the current point and update the string.

global gVOIpixval old_pt_zoom_main x0_pan_main;%temp variables for distance, zoom and pan operation;

dbud = get(displayBar, 'UserData');
[rows,cols,colors] = size(img);
rp = axes2pix(rows, get(imageHandle,'YData'),y);
cp = axes2pix(cols, get(imageHandle,'XData'),x);
r = min(rows, max(1, round(rp)));
c = min(cols, max(1, round(cp))); 
if strcmp(imageType,'indexed')
   map=get(dbud.figureHandle, 'Colormap');
   idx = img(r,c);
   if ~isa(idx, 'double'),
      idx = double(idx)+1;
   end
   idx = round(idx);
   if idx<=size(map,1)
      pixel = map(idx,:);
   else
      pixel = map(end,:);
   end
else   
   pixel = double(img(r,c,:));
end

ImgSize = size(double(gVOIpixval.CurrentImage));
if x > ImgSize(2) | x < 1 | y > ImgSize(1) | y < 1
    % in zoom or pan mod the cursor might be beyond the image area
    return;
end

CurPixVal = double(gVOIpixval.CurrentImage(round(y),round(x)));

% figure out the new string

switch dbud.displayMode
case 'normal'   % Just display intensity information
   if strcmp(imageType,'rgb') | strcmp(imageType,'indexed')
      if isa(img, 'uint8') &  strcmp(imageType,'rgb')
         pixval_str = sprintf(' %g, %g = %3d,%3d,%3d', ...
            round(x),round(y),pixel(1),pixel(2),pixel(3));
      elseif isa(img, 'uint16') & strcmp(imageType,'rgb')
         pixval_str = sprintf(' %g, %g = %5d,%5d,%5d', ...
            round(x),round(y),pixel(1),pixel(2),pixel(3));  
      elseif islogical(img) & strcmp(imageType,'rgb')
         pixval_str = sprintf(' %g, %g = %1d,%1d,%1d', ...
            round(x),round(y),pixel(1),pixel(2),pixel(3));  
      else  % all indexed images use double precision colormaps
         pixval_str = sprintf(' %g,%g = %5.1f ', ...
            round(x),round(y),CurPixVal);
      end
  else
      % intensity
      if isa(img, 'uint8')
         pixval_str = sprintf(' %g,%g = %1d',round(x),round(y),pixel(1));
      elseif isa(img, 'int16')
         pixval_str = sprintf(' %g,%g = %1d',round(x),round(y),pixel(1));
      elseif islogical(img)
         pixval_str = sprintf(' %g,%g = %1d',round(x),round(y),pixel(1));
      else
         pixval_str = sprintf(' %g,%g = %5.1f',round(x),round(y),pixel(1));
     end
   end
   set(displayBar, 'String', (pixval_str), 'UserData', dbud);
   
case 'distance'
    figureHandle = get(get(imageHandle, 'parent'), 'parent');
    mouseclick = get(gcf,'SelectionType');
    if strcmp(mouseclick,'normal')
       delta_x = (x - dbud.x0)*gVOIpixval.xypixsize(1);
       delta_y = (y - dbud.y0)*gVOIpixval.xypixsize(2);
       dist = sqrt(delta_x^2 + delta_y^2);
       sunit = gVOIpixval.pixunit;
       set(dbud.line, 'XData', [dbud.x0 x], 'YData', [dbud.y0 y]);
       
       if strcmp(imageType,'rgb') | strcmp(imageType,'indexed')
          if isa(img, 'uint8') &  strcmp(imageType,'rgb')
             pixval_str = sprintf(' %g,%g = %3d,%3d,%3d  dist = %3.3f', ...
                x,y,pixel(1),pixel(2),pixel(3),dist);
          elseif isa(img, 'uint16') &  strcmp(imageType,'rgb')
             pixval_str = sprintf(' %g,%g = %5d,%5d,%5d  dist = %3.3f', ...
                x,y,pixel(1),pixel(2),pixel(3),dist);
          elseif islogical(img) &  strcmp(imageType,'rgb')
             pixval_str = sprintf(' %g,%g = %1d,%1d,%1d  dist = %3.3f', ...
                x,y,pixel(1),pixel(2),pixel(3),dist);
          else  % all indexed images use double precision colormaps
             pixval_str = sprintf([' %g,%g = %5.1f; dist=%3.1f' ,sunit], ...
                round(x),round(y),CurPixVal,dist);
          end
       else % intensity
          if isa(img, 'uint8')
             pixval_str = sprintf([' %g,%g = %1d; dist=%3.1f',sunit], ...
                round(x),round(y),pixel(1),(dist));
          elseif isa(img, 'uint16')
             pixval_str = sprintf([' %g,%g = %1d; dist=%3.1f',sunit], ...
                round(x),round(y),pixel(1),(dist));
          elseif islogical(img)
             pixval_str = sprintf([' %g,%g = %1d; dist=%3.1f',sunit], ...
                round(x),round(y),pixel(1),(dist));  
          else
             pixval_str = sprintf(' %g,%g = %1.1f; dist =%3.1f', ...
                round(x),round(y),pixel(1),(dist));
          end
       end
       set(displayBar, 'String', (pixval_str), 'UserData', dbud);
    elseif strcmp(mouseclick,'extend') % zoom mode
        CurrentAxes = findobj(figureHandle, 'tag', 'ImaAxes');
        %set(CurrentAxes,'Units','pixel');
        new_pt = get(0,'PointerLocation');
        dy = (new_pt(2) - old_pt_zoom_main(2))/abs(old_pt_zoom_main(2))*5;
        zoomFactor = (1-dy);
        xLim=get(CurrentAxes,'XLim');
        yLim=get(CurrentAxes,'YLim');
     	xLimNew = [0 zoomFactor*diff(xLim)] + xLim(1) + (1-zoomFactor)*diff(xLim)/2;
        yLimNew = [0 zoomFactor*diff(yLim)] + yLim(1) + (1-zoomFactor)*diff(yLim)/2;	
		set(CurrentAxes,'XLim',xLimNew,'YLim',yLimNew);    
        old_pt_zoom_main  = new_pt;
    elseif strcmp(mouseclick,'alt') % pan mode
        currentPoint = get(figureHandle,'CurrentPoint');
        CurrentAxes = findobj(figureHandle, 'tag', 'ImaAxes');
        set(CurrentAxes,'Units','pixel');
        dx = currentPoint - x0_pan_main;
        x0_pan_main = currentPoint;
        ap = get(CurrentAxes,'Position');
        xLim = get(CurrentAxes,'XLim');
        yLim = get(CurrentAxes,'YLim');
        set(CurrentAxes,'XLim',xLim-(diff(xLim)*dx(1)/ap(3)), ...
           'YLim',yLim+(diff(yLim)*dx(2)/ap(4)));
       set(CurrentAxes,'Units','normalized');
    elseif strcmp(mouseclick,'open')% restore the original image
        xLimNew = gVOIpixval.xLim;
        yLimNew = gVOIpixval.yLim;
        CurrentAxes = findobj(figureHandle, 'tag', 'ImaAxes');
        set(CurrentAxes,'XLim',xLimNew,'YLim',yLimNew);   
    end
end




%%%
%%%  Sub-function - ButtonDownOnImage
%%%

function ButtonDownOnImage

global old_pt_zoom_main x0_pan_main;%temp for zoom and pan operation

imageHandle = gcbo;
figureHandle = get(get(imageHandle,'Parent'),'Parent');
displayBar = findobj(figureHandle, 'Tag', 'pixel value display bar');
dbud = get(displayBar, 'UserData');
axesHandle = get(imageHandle, 'Parent');

mouseclick = get(gcf,'SelectionType');
if strcmp(mouseclick,'normal')% case of distance measuring
	% Set the initial point (x0,y0)
	pt = get(axesHandle, 'CurrentPoint');
	dbud.x0 = pt(1,1);
	dbud.y0 = pt(1,2);
	dbud.line = line('Parent', axesHandle, ...
       'erasemode', 'xor', ...
       'color', [1 0 0], ...
       'Xdata', [dbud.x0 dbud.x0], ...
       'Ydata', [dbud.y0 dbud.y0],'LineWidth',3);
elseif strcmp(mouseclick,'alt') % pan mode
    setptr(figureHandle,'closedhand');
elseif strcmp(mouseclick,'extend') % zoom mode
    setptr(figureHandle,'glass');
end
dbud.displayMode = 'distance';
old_pt_zoom_main = get(0,'PointerLocation');% for zoom mode
x0_pan_main = get(figureHandle,'CurrentPoint');% for pan mode 
dbud.buttonDownImage = imageHandle;
set(displayBar, 'UserData', dbud);
set(dbud.figureHandle, 'WindowButtonUpFcn', 'mia_pixval(''BackToNormalPixvalDisplay'')');
PixvalMotionFcn(displayBar);


%%%
%%%  Sub-function - BackToNormalPixvalDisplay
%%%

function BackToNormalPixvalDisplay

displayBar = findobj(gcbo, 'Tag', 'pixel value display bar');
dbud = get(displayBar, 'UserData');
imageHandle = dbud.buttonDownImage;

mouseclick = get(gcf,'SelectionType');
if strcmp(mouseclick,'normal')% case of distance measuring
    delete(dbud.line);
    dbud.line = [];
    dbud.x0 = []; dbud.y0 = [];
end
set(dbud.figureHandle, 'WindowButtonUpFcn', '');
dbud.displayMode = 'normal';
dbud.buttonDownImage = 0;
set(displayBar, 'UserData', dbud);
PixvalMotionFcn(displayBar);

%%% 
%%%  Sub-function - MoveDisplayBar
%%%

function MoveDisplayBar

displayBar = gcbo;
dbud = get(displayBar, 'UserData');
oldWindowMotionFcn = get(dbud.figureHandle, 'WindowButtonMotionFcn');
set(dbud.figureHandle, 'WindowButtonMotionFcn', '');
oldPointer = get(dbud.figureHandle, 'Pointer');
oldPointerShapeCData = get(dbud.figureHandle, 'PointerShapeCData');
oldPointerShapeHotSpot = get(dbud.figureHandle, 'PointerShapeHotSpot');
setptr(dbud.figureHandle,'closedhand'); 

txtpos = get(displayBar, 'Position');
frmPos = get(dbud.DisplayFrame, 'Position');
position = txtpos + [0 0 frmPos(3) 0];
position2 = dragrect(position);
dx = position2(1)-position(1);
dy = position2(2)-position(2);

txtpos = txtpos + [dx dy 0 0];
set(displayBar, 'Position', txtpos);

frmPos = frmPos + [dx dy 0 0];
set(dbud.DisplayFrame, 'Position', frmPos);

btnPos = get(dbud.CloseButton, 'Position');
btnPos = btnPos + [dx dy 0 0];
set(dbud.CloseButton, 'Position', btnPos);

set(dbud.figureHandle, 'Pointer', oldPointer, ...
   'PointerShapeCData', oldPointerShapeCData, ...
   'PointerShapeHotSpot', oldPointerShapeHotSpot)
set(dbud.figureHandle, 'WindowButtonMotionFcn', oldWindowMotionFcn);

%%%
%%%  Sub-function - DeleteDisplayBar
%%%

function DeleteDisplayBar(displayBar)
%  Take apart the pixel value display - get rid of the text
%  uicontrol and clean up the image objects (remove their 
%  UserData's and get rid of their ButtonDown & Delete Fcn's)

if nargin<1
   displayBar = findobj(gcbf, 'Tag', 'pixel value display bar');
end

if ~isempty(displayBar) % if it's empty, there's no work to do.
   dbud = get(displayBar, 'UserData');
   set(displayBar, 'DeleteFcn', '');  % Make sure there's no recursion
   if ishandle(displayBar)
      delete(displayBar); 
   end
   if ishandle(dbud.CloseButton)
      delete(dbud.CloseButton);
   end
   if ishandle(dbud.DisplayFrame)
      delete(dbud.DisplayFrame);
   end
   mfh = findobj('tag','mia_figure1');
   set(mfh,'WindowButtonMotionFcn','');
   mih = findobj('tag','MainImage');
   set(mih,'buttonDownFcn','');
   
   % We are once again restoring the figure state, since
   % UIRESTORE also will reactivate the SCRIBE toolbar.
   %%uirestore(dbud.oldFigureUIState);

   % This is what we did for IPT 2.1/ML 5.2 :
   %   uisuspend(dbud.figureHandle); 
end

%%% 
%%%  Sub-function - CreatePointer
%%% 

function [pointerShape, pointerHotSpot] = CreatePointer

pointerHotSpot = [8 8];
pointerShape = [ ...
      NaN NaN NaN NaN NaN   1   2 NaN   2   1 NaN NaN NaN NaN NaN NaN
   NaN NaN NaN NaN NaN   1   2 NaN   2   1 NaN NaN NaN NaN NaN NaN
   NaN NaN NaN NaN NaN   1   2 NaN   2   1 NaN NaN NaN NaN NaN NaN
   NaN NaN NaN NaN NaN   1   2 NaN   2   1 NaN NaN NaN NaN NaN NaN
   NaN NaN NaN NaN NaN   1   2 NaN   2   1 NaN NaN NaN NaN NaN NaN
   1   1   1   1   1   1   2 NaN   2   1   1   1   1   1   1   1
   2   2   2   2   2   2   2 NaN   2   2   2   2   2   2   2   2
   NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
   2   2   2   2   2   2   2 NaN   2   2   2   2   2   2   2   2
   1   1   1   1   1   1   2 NaN   2   1   1   1   1   1   1   1
   NaN NaN NaN NaN NaN   1   2 NaN   2   1 NaN NaN NaN NaN NaN NaN
   NaN NaN NaN NaN NaN   1   2 NaN   2   1 NaN NaN NaN NaN NaN NaN
   NaN NaN NaN NaN NaN   1   2 NaN   2   1 NaN NaN NaN NaN NaN NaN
   NaN NaN NaN NaN NaN   1   2 NaN   2   1 NaN NaN NaN NaN NaN NaN
   NaN NaN NaN NaN NaN   1   2 NaN   2   1 NaN NaN NaN NaN NaN NaN
   NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN];

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美激情在线| 免费观看在线综合色| 日韩欧美在线一区二区三区| 99精品国产99久久久久久白柏| 久久国产三级精品| 三级久久三级久久| 爽好多水快深点欧美视频| 亚洲成av人片一区二区梦乃| 亚洲欧美国产77777| 亚洲另类在线一区| 亚洲一二三区视频在线观看| 亚洲午夜久久久久久久久电影院 | 中文字幕不卡三区| 久久天堂av综合合色蜜桃网| 久久久久久久综合日本| 日本一区二区综合亚洲| 亚洲女与黑人做爰| 亚洲福利一区二区| 久久精品国产精品青草| 国产精品一级片在线观看| zzijzzij亚洲日本少妇熟睡| 色综合久久久久久久| 91麻豆精品国产自产在线| 精品88久久久久88久久久| 欧美经典一区二区| 亚洲444eee在线观看| 久久草av在线| 一道本成人在线| 在线不卡的av| 中文文精品字幕一区二区| 亚洲欧美日韩国产综合在线| 日一区二区三区| 风间由美性色一区二区三区| 一本大道久久a久久精二百| 欧美一区在线视频| 国产精品国产三级国产a| 石原莉奈在线亚洲二区| 不卡一二三区首页| 欧美一区二区三区系列电影| 欧美国产日本韩| 天堂成人免费av电影一区| 国产激情视频一区二区三区欧美 | 4438x成人网最大色成网站| 精品国产伦理网| 亚洲精品成人天堂一二三| 美日韩一区二区| 欧美午夜精品免费| 国产精品视频第一区| 蜜桃视频第一区免费观看| 色综合久久中文字幕综合网| 精品99一区二区| 日本麻豆一区二区三区视频| 91视频.com| 国产亚洲一区二区在线观看| 日日夜夜精品视频天天综合网| 成人看片黄a免费看在线| 日韩一级片在线播放| 亚洲成a人v欧美综合天堂| 暴力调教一区二区三区| 久久久久国产一区二区三区四区| 视频一区国产视频| 欧美日韩国产一二三| 亚洲美腿欧美偷拍| 97se亚洲国产综合在线| 国产日韩亚洲欧美综合| 黄一区二区三区| 欧美一级高清大全免费观看| 亚洲成av人片一区二区三区| 日本道精品一区二区三区| 亚洲欧洲av在线| www..com久久爱| 国产精品素人视频| 成人国产精品免费网站| 国产欧美日韩麻豆91| 国产99精品国产| 国产精品美女久久福利网站| 国产成人av电影在线| 国产欧美日韩三区| 成人高清免费观看| 亚洲欧美国产77777| 91国产视频在线观看| 亚洲精品伦理在线| 在线观看日韩av先锋影音电影院| 伊人色综合久久天天| 欧美亚洲国产一区二区三区va | 久久久久久久综合色一本| 国产精品一品二品| 国产精品美女久久久久aⅴ| 91一区二区三区在线观看| 一区二区视频在线| 欧美在线不卡视频| 奇米精品一区二区三区四区| 精品捆绑美女sm三区| 国产精品资源在线看| 国产精品电影一区二区| 色网综合在线观看| 日韩电影免费一区| 国产日韩视频一区二区三区| 91在线视频免费观看| 性做久久久久久免费观看| 精品久久99ma| 99精品视频一区二区| 亚州成人在线电影| 国产欧美日韩精品a在线观看| 99久久精品免费看国产免费软件| 亚洲狠狠爱一区二区三区| 精品1区2区在线观看| 91视频免费播放| 激情综合网天天干| 亚洲精品成人少妇| 久久久久久久网| 欧美日韩激情一区二区| 国产高清无密码一区二区三区| 亚洲激情中文1区| 精品国产sm最大网站免费看| 95精品视频在线| 国产在线精品视频| 亚洲r级在线视频| 国产精品免费久久| 欧美一级国产精品| 欧美性猛交xxxx乱大交退制版 | 亚洲精品一区二区三区影院| 99久久精品99国产精品| 久久99精品久久久久久久久久久久| 国产精品久久久久久久久图文区| 欧美肥妇毛茸茸| 色综合久久久久久久久| 国产乱码一区二区三区| 亚洲第一二三四区| 中文字幕一区二区三区色视频| 日韩一区和二区| 欧美人狂配大交3d怪物一区| 91色.com| 成人精品国产一区二区4080| 国产精品综合网| 久久精品久久久精品美女| 一级做a爱片久久| 国产精品国产三级国产专播品爱网| 日韩一区二区免费在线观看| 欧美日韩国产中文| 欧美探花视频资源| 日本电影亚洲天堂一区| 99久久婷婷国产综合精品| 成人av免费观看| 成人av在线资源| 成人精品国产福利| 波多野结衣在线一区| 国产91综合网| 不卡的av在线| 91视频.com| 欧美亚洲动漫制服丝袜| 欧美性大战久久| 欧美肥妇毛茸茸| 日韩视频在线你懂得| 精品国产伦一区二区三区免费| 欧美变态凌虐bdsm| 久久久久久久久一| 亚洲国产高清aⅴ视频| 中文字幕一区日韩精品欧美| 中文字幕永久在线不卡| 一区二区欧美国产| 日韩精品午夜视频| 九九精品视频在线看| 国产不卡视频在线观看| 99综合电影在线视频| 色婷婷综合在线| 欧美群妇大交群中文字幕| 日韩午夜小视频| 国产精品网站一区| 一区二区三区视频在线观看| 日韩主播视频在线| 国产一区二区三区黄视频| 国产成人在线视频网址| 91色婷婷久久久久合中文| 欧美精品在欧美一区二区少妇| 91精品国产福利| 国产精品乱码一区二区三区软件| 亚洲男人的天堂在线aⅴ视频| 亚洲观看高清完整版在线观看| 激情欧美一区二区三区在线观看| 国产ts人妖一区二区| 欧美性淫爽ww久久久久无| 精品国产欧美一区二区| 亚洲天堂中文字幕| 蜜桃传媒麻豆第一区在线观看| 高清在线不卡av| 欧美精品一卡二卡| 中文字幕一区二| 日韩不卡在线观看日韩不卡视频| 国产精选一区二区三区 | 天堂成人国产精品一区| 国产成人精品在线看| 欧美亚洲精品一区| 中文字幕国产一区二区| 免费一区二区视频| 成人免费看片app下载| 欧美一区二区三区免费| 亚洲免费av高清| 懂色av一区二区三区免费观看 | 精品一区二区免费看|