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

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

?? mia_zpixval.m

?? 醫學圖像處理matlab工具箱
?? M
?? 第 1 頁 / 共 2 頁
字號:
function mia_Zpixval(arg1, arg2)
% mia_Zpixval display information about image pixels 
% in coronal image in the case of 3Dcursor mode
%
% Matlab library function for mia_gui utility. 
% University of Debrecen, PET Center/LB 2003


%   mia_Zpixval Display information about image pixels.
%   PIXVAL ON turns on interactive display of information about image pixels
%   in the current figure. PIXVAL installs a black bar at the bottom of the
%   figure which displays the (x,y) coordinates for whatever pixel the
%   cursor is currently over, and the color information for that pixel. If
%   the image is binary or intensity, the color information is a single
%   intensity value. If the image is indexed or RGB, the color information
%   is an RGB triplet. The values displayed are the actual data values,
%   regardless of the class of the image array, or whether the data is in
%   normal image range.
%
%   If you click on the image and hold down the mouse button while you move
%   the cursor, PIXVAL also displays the Euclidean distance between the
%   point you clicked on and current cursor location. PIXVAL draws a line
%   between these points to indicate the distance being measured. When you
%   release the mouse button, the line and the distance display disappear.
%
%   You can move the display bar by clicking on it and dragging it to
%   another place in the figure.
%
%   PIXVAL OFF turns interactive display off in the current figure. You can
%   also turn off the display by clicking the button on the right side of
%   the display bar.
%
%   PIXVAL toggles interactive display on or off in the current figure.
%
%   PIXVAL(FIG,OPTION) applies the PIXVAL command to the figure specified
%   by FIG. OPTION is string containing 'on' or 'off'.
%
%   See also IMPIXEL, IMPROFILE.

%   Copyright 1993-2001 The MathWorks, Inc.  
%   $Revision: 1.19 $  $Date: 2001/01/18 15:30:19 $



error(nargchk(0,2,nargin));

if nargin==0
   arg1 = gcf;
end

if ischar(arg1) % execute a callback
   switch lower(arg1)
   case 'pixvalmotionfcn'
      PixvalMotionFcn;
   case 'buttondownonimage'
      ButtonDownOnImage;
   case 'backtonormalpixvaldisplay'
      BackToNormalPixvalDisplay;
   case 'movedisplaybar'
      MoveDisplayBar;
   case 'on'
      mia_Zpixval(gcf, 'on');
   case 'off'
      mia_Zpixval(gcf, 'off');
   case 'deletedisplaybar'
      DeleteDisplayBar;
   otherwise
      error(['Unknown PIXVAL command or callback: ' arg1 '.']);
   end 
   
elseif ishandle(arg1)
   images = findobj(arg1, 'type', 'image');
   if isempty(images)
      return
   end
   
   figureHandle = get(get(images(1), 'parent'), 'parent');
     
   if nargin>1   % mia_Zpixval(handle, 'on|off')
      if ischar(arg2)
         if strcmp(lower(arg2), 'off')
            action = 'destroy';
         elseif strcmp(lower(arg2), 'on')
            action = 'create';
         else
            error(['Unknown PIXVAL input string: ' arg2]);
         end
      else
         error('Invalid input arguments');
      end
   else  % mia_Zpixval(handle) or mia_Zpixval
      % Toggle the state
      displayBar = findobj(figureHandle, 'tag', 'pixel value display bar');
      if isempty(displayBar)
         action = 'create';
      else
         action = 'destroy';
      end 
   end
      
   % Put things in the Images' UserData so that pixel value display works
   switch action
   case 'destroy'
      displayBar = findobj(figureHandle, 'tag', 'pixel value display bar');
      if ~isempty(displayBar)
         DeleteDisplayBar(displayBar);
      end  
      
   case 'create'
      otherDisplayBar = findobj(figureHandle, 'tag', 'pixel value display bar');
      if ~isempty(otherDisplayBar)
         % mia_Zpixval is already ON for this figure.
         return
      end
      
      % Save the interactive state of the figure. UICLEARMODE now
      % does everything that UISUSPEND used to do. It calls
      % SCRIBECLEARMODE to take care of SCRIBE.  We WILL be
      % restoring the state - this is a change.  UICLEARMODE also
      % registers a way to disable mia_Zpixval
      dbud.oldFigureUIState = uiclearmode(figureHandle,'mia_Zpixval',figureHandle,'off');
      AxisHandle = findobj(figureHandle, 'type', 'axes');
      dbud.xLim = get(AxisHandle,'XLim');% for zoom mode
      dbud.yLim = get(AxisHandle,'YLim');% for zoom mode 
      dbud.old_pt = 0;% for zoom mode 

      % Make sure the SCRIBE toolbar doesn't go away
      plotedit(figureHandle,'locktoolbarvisibility');
      
      % Make sure that the Motion function doesn't interrupt itself
      set(figureHandle, 'Interruptible', 'off', 'busyaction', 'queue');
      
      % Make sure that the Image's Button Down & Up functions will queue
      set(images, 'Interruptible', 'off', 'BusyAction', 'Queue');
         
      % dbud is the UserData structure which is going into the display bar
      dbud.figureHandle = figureHandle;
      dbud.displayMode = 'normal';
      
      figPos = get(dbud.figureHandle, 'position');
      tempStr = sprintf(' %g, %g = %6.4f,%6.4f,%6.4f  dist = %3.3f', ...
        -0.9999,-0.9999,pi/10,pi/10,pi/10,pi*100);
            
      % Calculate the position vector of the display bar      
      tempTxt = uicontrol('Parent', dbud.figureHandle, 'horiz', 'left', ...
         'Style', 'text', 'Units', 'pixels', 'visible', 'off', 'fontname', ...
         'FixedWidth','String', tempStr, 'position', [0 0 figPos(3) 20]);
      extent= get(tempTxt, 'extent');
      txtHt = extent(4); 
      txtWid = extent(3)+txtHt; % Leave room for the close button
      delete(tempTxt);
      
      % Create position vectors for Text, Frame, and Close Button
      pos = [0 0 (min(txtWid,figPos(3))-txtHt)*1/2 txtHt];
      btnSide = pos(4)-4;  % In pixels
      btnPos = [pos(1)+pos(3)+2 pos(2)+2 btnSide btnSide];
      frmPos = [pos(1)+pos(3) 0 txtHt txtHt];
      
      % Create a frame for the display bar. I do this because of a bug in 
      % MATLAB 5.2 where the text field pops to the front of the button each
      % time it is updated.  It should stay behind in which case, all we would
      % need is the text uicontrol and the button.  We can take the frame out
      % if the bug gets fixed.  Make sure the frame doesn't fall behind the 
      % text control, otherwise you can't execute the text control's buttondown
      % function (another MATLAB 5.2 bug).

      dbud.DisplayFrame = uicontrol('Parent', figureHandle, ...
         'style', 'frame', ...
         'Units', 'pixels', ...
         'Position', frmPos, ...
         'Background', [0 0 0], ...
         'BusyAction', 'queue', ...
         'Interruptible', 'off');
         
      % Create the display bar
      dbud.buttonDownImage = 0;  % Image 0 never exists      
      DisplayBar = uicontrol('Parent', figureHandle, ...
         'Style','text', ...
         'Units','pixels', ...
         'Position',pos, ...
         'Foreground', [1 1 .5], ...
         'Background', [0 0 0], ...
         'Horiz','left', ...
         'Tag', 'pixel value display bar', ...
         'String','', ...
         'fontname', 'FixedWidth', ...
         'BusyAction', 'queue', ...
         'enable', 'inactive', ...
         'Interruptible', 'off');
%          'ButtonDownFcn', 'mia_Zpixval(''MoveDisplayBar'')', ...
%          'DeleteFcn', 'mia_Zpixval(''DeleteDisplayBar'')', ...
            
      % Create the close button
      dbud.CloseButton = uicontrol('Parent', figureHandle, ...
         'style', 'pushbutton', ...
         'units', 'pixels', ...
         'position', btnPos, ...
         'BusyAction', 'queue', ...
         'Interruptible', 'off');
%          'String', 'X', ...
%          'Callback', 'mia_Zpixval(''DeleteDisplayBar'')', ...
%          'DeleteFcn', 'mia_Zpixval(''DeleteDisplayBar'')', ...
      
      % Register the motion function and button up function
      set(figureHandle, 'WindowButtonMotionFcn',...
         'mia_Zpixval(''PixvalMotionFcn'')')
      
      set(DisplayBar, 'UserData', dbud);
      PixvalMotionFcn(DisplayBar);
   end
   
else 
   error('Invalid input argument.')
end 



%%%
%%%  Sub-function - PixvalMotionFcn
%%%

function PixvalMotionFcn(displayBar)

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

if isempty(displayBar)
   % Pixval is in a half-broken state.  Another function (like zoom) has
   % restored pixval callbacks and PIXVAL has already been uninstalled.
   % Call uisuspend to gracefully get rid of the callbacks.

   % Note 7/21/98 - Since we are now using UICLEARMODE instead of
   % UISUSPEND, I think that we should never get into this
   % state.  It will only happen if a user writes a function
   % which calls UIRESTORE without ever calling UICLEARMDOE or
   % SCRIBECLEARMODE.  We'll leave this code here just to be safe.
   uisuspend(gcbf);
   return
end

dbud = get(displayBar, 'UserData');
pt = get(dbud.figureHandle, 'CurrentPoint');
x = pt(1,1); y = pt(1,2);

if strcmp(dbud.displayMode, 'normal') 
   % See if we're above the displayBar
   dbpos = get(displayBar, 'Position');
   left   = dbpos(1);
   bottom = dbpos(2);
   width  = dbpos(3);
   height = dbpos(4);
   % On the line below, we look to see if x<=left+width+height because
   % there is a frame next to the text object, see note above about the
   % MATLAB 5.2 bug we're working around
   if x>=left & x<=left+width+height & y>=bottom & y<=bottom+height
      % We're hovering above the display bar
      
      % Look to see if we are above the Close button
      cp = get(dbud.CloseButton, 'Position');
      if  x>=cp(1) & x<=cp(1)+cp(3) & y>=cp(2) & y<=cp(2)+cp(4)
         if isfield(dbud, 'oldPointer') % Switch back to the default pointer
            set(dbud.figureHandle, 'Pointer', dbud.oldPointer, ...
               'PointerShapeCData', dbud.oldPointerShapeCData, ...
               'PointerShapeHotSpot', dbud.oldPointerShapeHotSpot);
            dbud = rmfield(dbud, {'oldPointer', ... 
                  'oldPointerShapeCData', 'oldPointerShapeHotSpot'});
         end
      else
         % Save the default pointer if there is one
         if ~isfield(dbud, 'oldPointer') % We still have the default pointer
            dbud.oldPointer = get(dbud.figureHandle, 'Pointer');
            dbud.oldPointerShapeCData = get(dbud.figureHandle, 'PointerShapeCData');
            dbud.oldPointerShapeHotSpot = get(dbud.figureHandle, 'PointerShapeHotSpot');
         end
         setptr(dbud.figureHandle, 'hand'); 
      end
   else 
      % We're not hovering over the display bar 
      [imageHandle,imageType,img,x,y] = OverImage(dbud.figureHandle);
      if imageHandle ~= 0       
         % Save old pointer and get a new one (use Custom pointer for non-Windows machine)
         if ~isfield(dbud, 'oldPointer') % We still have the default pointer
            dbud.oldPointer = get(dbud.figureHandle, 'Pointer');
            dbud.oldPointerShapeCData = get(dbud.figureHandle, 'PointerShapeCData');
            dbud.oldPointerShapeHotSpot = get(dbud.figureHandle, 'PointerShapeHotSpot');
         end
         if strcmp(computer, 'PCWIN')
            set(dbud.figureHandle, 'Pointer', 'cross');
         else
            [pointerShape, pointerHotSpot] = CreatePointer;
            set(dbud.figureHandle, 'Pointer', 'custom', ...
               'PointerShapeCData', pointerShape, ...
               'PointerShapeHotSpot', pointerHotSpot);
         end
         
         % Update the Pixel Value display
         UpdatePixelValues(imageHandle, imageType, displayBar,img,x,y );
      else
         if isfield(dbud, 'oldPointer') % Switch back to the default pointer
            set(dbud.figureHandle, 'Pointer', dbud.oldPointer, ...
               'PointerShapeCData', dbud.oldPointerShapeCData, ...
               'PointerShapeHotSpot', dbud.oldPointerShapeHotSpot);
            dbud = rmfield(dbud, {'oldPointer', ... 
                  'oldPointerShapeCData', 'oldPointerShapeHotSpot'});
            set(displayBar, 'String', '');
         end
      end
   end
elseif strcmp(dbud.displayMode, 'distance') 
   % If we're in distance mode and in another image, clean up a bit.
   [imageHandle,imageType,img,x,y]= OverImage(dbud.figureHandle);
   if imageHandle~=0 
      if imageHandle==dbud.buttonDownImage
         UpdatePixelValues(imageHandle, imageType, displayBar,img,x,y);
      end
   end
end
set(displayBar, 'UserData', dbud);

%%%
%%%  Sub-function - OverImage
%%%

function [imageHandle,imageType,img,x,y] = OverImage(figHandle)
% Return the index of which image we are over, and return a 0 if we
% aren't above an image.

images = findobj(figHandle, 'type', 'image');
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_Zpixval(''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,3}  % Grayscale or binary
      imageType = 'intensity';
   case 4
      imageType = 'rgb';
   otherwise
      error(['Invalid image, GETIMAGE returned flag = ' flag '.']);
   end
else
   imageHandle=0; imageType=''; img=[]; x=0; y=0;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品第一页第二页第三页| 一区二区三区欧美在线观看| 26uuuu精品一区二区| 久久亚洲欧美国产精品乐播| 777奇米四色成人影色区| 精品国产一区二区三区忘忧草| 国产精品丝袜一区| 亚洲成人在线观看视频| 天天综合网 天天综合色| 毛片av中文字幕一区二区| 国产一区二区三区高清播放| 99热精品一区二区| 欧美人妖巨大在线| 中文字幕欧美激情一区| 亚洲图片欧美综合| 国产精品亚洲成人| 在线观看亚洲精品| 中文字幕巨乱亚洲| 日韩av电影免费观看高清完整版 | 欧美午夜寂寞影院| 欧美精品一区二区三区蜜桃 | 亚洲国产精华液网站w| 一区二区三区在线看| 青青草国产精品亚洲专区无| 成人免费视频一区| 欧美日韩国产精选| 亚洲天天做日日做天天谢日日欢 | 日韩一区二区三区视频在线观看 | 在线视频国内一区二区| 精品成人在线观看| 亚洲人成7777| 成人18精品视频| 亚洲精品在线免费播放| 一区二区三区中文在线| 国产精品一二三| 精品少妇一区二区三区视频免付费 | 91精品国产一区二区三区| 成人欧美一区二区三区视频网页 | 中文字幕一区二区三| 成人动漫一区二区| 亚洲色图另类专区| 在线观看www91| 日韩高清国产一区在线| 日韩精品一区国产麻豆| 国产一区二区三区观看| 国产精品短视频| 99久久精品国产导航| 亚洲欧美日本在线| 欧美日韩国产高清一区二区三区 | 亚洲精品写真福利| 欧美中文字幕一区| 天堂影院一区二区| 国产午夜精品一区二区三区四区| 成人污视频在线观看| 亚洲激情五月婷婷| 欧美一级片免费看| 国产精品一区一区| 亚洲一区二区三区小说| 欧美一区二区三区色| 岛国精品一区二区| 亚洲国产精品嫩草影院| 欧美精品一区二区精品网| caoporn国产精品| 男人的j进女人的j一区| 国产精品午夜免费| 欧美精品一二三| 国产成人一区在线| 婷婷国产v国产偷v亚洲高清| 国产亚洲短视频| 欧美剧情片在线观看| 国产传媒日韩欧美成人| 亚洲成人你懂的| 国产精品女主播av| 91精品国产综合久久小美女| youjizz国产精品| 捆绑调教美女网站视频一区| 亚洲欧洲性图库| 久久青草国产手机看片福利盒子| 色视频一区二区| 国产福利一区二区三区在线视频| 亚洲永久免费av| 国产精品网站在线| 日韩精品一区二区三区蜜臀| 欧洲一区在线电影| 成人深夜在线观看| 国内精品在线播放| 午夜电影网亚洲视频| 亚洲色图欧洲色图婷婷| 国产日韩影视精品| 日韩欧美一二三| 欧美日韩不卡在线| 91国产丝袜在线播放| 成人午夜碰碰视频| 国产精品亚洲一区二区三区妖精| 久久99精品视频| 亚洲国产成人高清精品| 亚洲欧美经典视频| 国产精品福利av| 国产精品色一区二区三区| 精品国产1区2区3区| 欧美成人乱码一区二区三区| 欧美日韩国产一级二级| 91国产成人在线| 9l国产精品久久久久麻豆| 国产成人av影院| 国产寡妇亲子伦一区二区| 精品一区二区三区免费视频| 美国十次综合导航| 麻豆精品久久精品色综合| 日韩中文字幕亚洲一区二区va在线 | 久久久国产综合精品女国产盗摄| 91精品国产一区二区三区蜜臀| 欧美视频一区二区在线观看| 色婷婷精品久久二区二区蜜臀av| 成人黄色片在线观看| 不卡电影免费在线播放一区| 高清在线成人网| 99热99精品| 一本到不卡精品视频在线观看 | 亚洲精品视频在线观看网站| 国产精品亲子乱子伦xxxx裸| 国产精品久久久久久久久果冻传媒 | 欧美日韩精品欧美日韩精品一| 欧美视频一区在线| 欧美日韩精品欧美日韩精品一 | 不卡av免费在线观看| 91亚洲资源网| 欧美性一二三区| 欧美视频一区在线观看| 国产欧美一区二区精品性色超碰 | 91精品国产福利| 精品剧情v国产在线观看在线| 亚洲精品在线三区| 国产精品久久毛片av大全日韩| 中文字幕中文字幕一区| 亚洲一区在线观看免费| 蜜乳av一区二区| 国产·精品毛片| 欧亚洲嫩模精品一区三区| 91精品国产一区二区三区| 2023国产精品| 亚洲激情自拍偷拍| 经典三级视频一区| 91免费看`日韩一区二区| 9191久久久久久久久久久| 久久亚洲综合色| 一区二区三区在线观看欧美| 日韩精品久久理论片| 大桥未久av一区二区三区中文| 91传媒视频在线播放| 亚洲精品在线电影| 一区二区三区四区高清精品免费观看| 日本va欧美va精品发布| 大胆亚洲人体视频| 91精品国产综合久久国产大片| 日本一区二区三区四区在线视频 | 欧美无砖砖区免费| 2014亚洲片线观看视频免费| 亚洲视频小说图片| 久久成人久久爱| 欧美日韩在线播| 国产女人水真多18毛片18精品视频 | 国产精品欧美精品| 麻豆中文一区二区| 欧美三级中文字| 亚洲欧洲av在线| 国产麻豆成人精品| 7777精品伊人久久久大香线蕉超级流畅| 久久久99久久精品欧美| 性做久久久久久久免费看| 99在线精品一区二区三区| 精品区一区二区| 午夜av电影一区| 色哟哟日韩精品| 国产精品久久久久久久久免费相片 | 欧美丰满美乳xxx高潮www| 国产精品初高中害羞小美女文| 另类的小说在线视频另类成人小视频在线 | 777亚洲妇女| 樱花影视一区二区| 丁香天五香天堂综合| 欧美xxxx在线观看| 日韩专区中文字幕一区二区| 色婷婷av一区二区三区大白胸| 中文字幕不卡一区| 国产91丝袜在线观看| 久久综合精品国产一区二区三区| 亚洲成a人片在线观看中文| 色综合久久综合网| 中文字幕一区二区三区不卡 | 久久精品国产精品亚洲综合| 4438x成人网最大色成网站| 亚洲一区二区三区四区不卡| 色综合中文字幕国产 | 污片在线观看一区二区| 在线观看日韩高清av| 亚洲免费看黄网站| 色综合久久综合| 亚洲精品视频免费观看| 色噜噜久久综合|