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

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

?? mia_pixval.m

?? 醫學圖像處理matlab工具箱
?? M
?? 第 1 頁 / 共 2 頁
字號:
function mia_pixval(arg1, arg2)
% function mia_pixval(arg1, arg2)
% 
% Display information about image pixels. It is almost same as the
% PIXVAL built in Matlab function, exept that mia_pixval considers the measure 
% and the unit of the pixels (xypixsize, pixunit). Also it can take into 
% consideration the current colormap showing the original pixel values
% in tha case of the RGB image(currentmap). These additional variables should be 
% defined as global variables in the the gVOIpixval structure, that is:
%   gVOIpixval.xypixsize
%   gVOIpixval.pixunit
%   gVOIpixval.currentmap
% 
% Zoom and pan capabilities added at later. Middle drag to zoom 
% and right drag on the image to pan, double click to restore the original.  
%
% Matlab library function for mia_gui utility. 
% University of Debrecen, PET Center/LB 2003-2004

global gVOIpixval

%   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 figure handle FIG. OPTION is string containing 'on' or 'off'.
%
%   PIXVAL(AX,OPTION) applies the PIXVAL command to the figure that contains
%   the axes AX. OPTION is string containing 'on' or 'off'.
%
%   PIXVAL(HIMG,OPTION) applies the PIXVAL command to the figure that contains
%   the image object H. OPTION is string containing 'on' or 'off'.
%  
%   See also IMPIXEL, IMPROFILE.

%   Copyright 1993-2002 The MathWorks, Inc.  
%   $Revision: 1.23 $  $Date: 2002/03/15 15:28:53 $

error(nargchk(0,4,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_pixval(gcf, 'on');
    case 'off'
        mia_pixval(gcf, 'off');
    case 'deletedisplaybar'
        DeleteDisplayBar;
    end 
   
else % mia_pixval(FIG)
     % mia_pixval
     % mia_pixval(FIG,OPTION)
     % mia_pixval(AX)
     % mia_pixval(AX,OPTION)
     % mia_pixval(IMG)
     % mia_pixval(IMG,OPTION)  
  if ~ishandle(arg1) 
        msgId = 'Images:pixval:invalidHandle';
        msg = 'The first argument must be a valid figure, axes, or image handle.';
        error(msgId, '%s', msg);
  else
        images = findobj(arg1, 'tag', 'MainImage');
        if isempty(images)
            return
        end

        figureHandle = get(get(images(1), 'parent'), 'parent');
        
        if ~strcmp(get(figureHandle,'Units'),'pixels')
            msgId = 'Images:pixval:incorrectFigureUnits';
            msg = 'Set the figure units to ''pixels'' for PIXVAL.';
            error(msgId, '%s', msg);
        end
        
        if nargin>1   % pixval(FIG, OPTION)
            %checkstrs(arg2,{'on','off'},mfilename,'OPTION',2);
            if strcmp(lower(arg2), 'off')
                action = 'destroy';
            else
                action = 'create';
            end
        else  % mia_pixval(FIG) or mia_pixval
              % 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_pixval 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 pixval
            %%dbud.oldFigureUIState = uiclearmode(figureHandle,'mia_pixval',figureHandle,'off');
            AxisHandle = findobj(figureHandle, 'tag', 'ImaAxes');
            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)*9/16 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');
            set(dbud.DisplayFrame,'Units','normalized');
            
            % 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_pixval(''MoveDisplayBar'')', ...
%                                    'DeleteFcn', 'mia_pixval(''DeleteDisplayBar'')', ...
            set(DisplayBar,'Units','normalized');
            
            % Create the close button
            dbud.CloseButton = uicontrol('Parent', figureHandle, ...
                                         'style', 'pushbutton', ...
                                         'units', 'pixels', ...
                                         'position', btnPos, ...
                                         'BusyAction', 'queue', ...
                                         'Interruptible', 'off');
%                                          'DeleteFcn', 'mia_pixval(''DeleteDisplayBar'')', ...
%                                          'String', 'X', ...
%                                          'Callback', 'mia_pixval(''DeleteDisplayBar'')', ...
            set(dbud.CloseButton,'Units','normalized');
            
            % Register the motion function and button up function
            set(figureHandle, 'WindowButtonMotionFcn',...
                              'mia_pixval(''PixvalMotionFcn'')')
            
            set(DisplayBar, 'UserData', dbud);
            PixvalMotionFcn(DisplayBar);
        end
    end 
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 mia_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');
%get(get(dbud.figureHandle,'CurrentObject'),'tag')
%get(get(dbud.figureHandle,'CurrentObject'),'type')
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 we are on the mia ColorbarImages: return /BL
      if ~strcmp(get(imageHandle,'tag'),'MainImage') & ~strcmp(get(imageHandle,'tag'),'MainImage2')
          set(dbud.figureHandle, 'Pointer', 'arrow');%The oldPointer is allways arrow /BL   
          return;
      end
      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.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久国产精品麻豆| 欧美天堂亚洲电影院在线播放| 日韩免费观看2025年上映的电影| 婷婷国产v国产偷v亚洲高清| 欧美日韩一区 二区 三区 久久精品| 一区二区三区小说| 欧美日韩高清不卡| 日本v片在线高清不卡在线观看| 欧美岛国在线观看| 国产精品自产自拍| 中文字幕在线免费不卡| 日本韩国一区二区| 精品国产一区二区三区四区四| 一区二区三区免费观看| 国产成人av电影在线播放| 欧美激情在线一区二区三区| 777午夜精品视频在线播放| 调教+趴+乳夹+国产+精品| 日韩一区二区影院| 风间由美中文字幕在线看视频国产欧美| 国产免费成人在线视频| 日本韩国欧美一区| 日本特黄久久久高潮| 久久精品日产第一区二区三区高清版| 成人app软件下载大全免费| 亚洲一区中文在线| 欧美xxxxxxxxx| 99re这里只有精品首页| 日韩精品91亚洲二区在线观看| 久久久精品国产免大香伊| 色综合久久中文字幕综合网| 青青草精品视频| 国产精品久久久一本精品| 欧美久久一二三四区| 国产一区二区三区国产| 亚洲精品v日韩精品| 日韩欧美久久一区| 91小视频免费观看| 久久成人麻豆午夜电影| 亚洲少妇屁股交4| 精品va天堂亚洲国产| 日本道免费精品一区二区三区| 美女视频一区在线观看| 亚洲免费看黄网站| 国产日韩一级二级三级| 在线电影院国产精品| 97成人超碰视| 国产又黄又大久久| 日日嗨av一区二区三区四区| 一区二区中文视频| 精品播放一区二区| 欧美美女一区二区| 99久久精品99国产精品| 国产麻豆成人传媒免费观看| 午夜精彩视频在线观看不卡| ㊣最新国产の精品bt伙计久久| 欧美大片在线观看一区二区| 欧美亚洲尤物久久| 99久久久无码国产精品| 国产一二精品视频| 麻豆精品一区二区三区| 亚洲一区av在线| 日韩欧美国产麻豆| 美腿丝袜在线亚洲一区| 欧洲中文字幕精品| 成人黄色av电影| 国产不卡在线播放| 免费在线成人网| 亚洲国产美女搞黄色| 亚洲欧洲中文日韩久久av乱码| 久久久精品免费免费| 精品国产乱子伦一区| 欧美另类videos死尸| 欧美性猛交xxxxxx富婆| 99久久国产免费看| 97se亚洲国产综合自在线不卡| 国产91精品精华液一区二区三区| 国产乱国产乱300精品| 激情综合色播五月| 精品无人区卡一卡二卡三乱码免费卡 | 欧美色综合网站| 一本大道久久a久久精二百| 成人国产精品免费| 99久久精品99国产精品| 成人av网站在线观看免费| 成人伦理片在线| 99久久精品免费精品国产| 99久久精品情趣| 91网站最新地址| 色狠狠综合天天综合综合| 91久久线看在观草草青青| 在线视频欧美精品| 欧美日韩一本到| 91精品国产欧美一区二区18| 日韩欧美国产成人一区二区| 2023国产一二三区日本精品2022| 26uuuu精品一区二区| 国产蜜臀av在线一区二区三区| 国产精品丝袜在线| 一区二区三区四区中文字幕| 婷婷中文字幕综合| 久久99精品久久久久久国产越南| 国产一区二区三区综合| 成人精品视频一区二区三区| 91浏览器打开| 91精品国产乱| 国产亚洲美州欧州综合国| 亚洲欧洲日韩女同| 亚洲成av人片在线| 精品亚洲免费视频| 不卡的看片网站| 精品1区2区3区| 精品福利视频一区二区三区| 中文字幕一区二区三区乱码在线| 亚洲一区二区欧美激情| 狠狠色狠狠色综合系列| 波多野洁衣一区| 欧美蜜桃一区二区三区| 欧美精品一区二区三区在线播放| 国产精品美女久久久久久2018| 亚洲成va人在线观看| 中文字幕五月欧美| 理论片日本一区| 91在线一区二区三区| 日韩欧美在线123| 国产精品成人一区二区艾草| 偷窥少妇高潮呻吟av久久免费| 国产精品18久久久久久久久久久久 | 国产精品一级黄| 欧美性猛片aaaaaaa做受| 久久夜色精品国产欧美乱极品| 亚洲免费av观看| 国产一区二区三区四区在线观看| 91国模大尺度私拍在线视频| 精品国产乱码91久久久久久网站| 亚洲精品视频免费观看| 狠狠色2019综合网| 欧美日韩久久久一区| 国产精品久久久久四虎| 美腿丝袜亚洲三区| 91极品视觉盛宴| 中文字幕 久热精品 视频在线 | 中文字幕一区二区不卡| 蜜臀精品一区二区三区在线观看| 色偷偷成人一区二区三区91| 久久久久久久久久久电影| 日韩激情av在线| 在线视频国内自拍亚洲视频| 中国色在线观看另类| 国内国产精品久久| 欧美男男青年gay1069videost| 亚洲免费观看在线观看| 成人黄色大片在线观看| 久久久久国产精品人| 久久99精品久久久久久久久久久久| 欧美日韩国产一区二区三区地区| 亚洲色图一区二区| 成人h版在线观看| 国产欧美日韩精品在线| 国模冰冰炮一区二区| 日韩美女视频一区二区在线观看| 午夜精品国产更新| 欧美日韩精品欧美日韩精品| 亚洲自拍都市欧美小说| 91看片淫黄大片一级在线观看| 亚洲18影院在线观看| 色94色欧美sute亚洲线路一ni| 国产精品成人网| www.在线欧美| 日韩美女视频一区二区 | 国产精品久久久99| 成人一级片在线观看| 国产视频一区不卡| 成人一区二区在线观看| 国产精品午夜久久| 波多野结衣中文字幕一区| 一区二区中文字幕在线| 94-欧美-setu| 亚洲综合色丁香婷婷六月图片| 欧美综合亚洲图片综合区| 夜夜嗨av一区二区三区| 欧美色手机在线观看| 五月综合激情婷婷六月色窝| 8x福利精品第一导航| 免费成人av资源网| 精品国产人成亚洲区| 国产福利一区在线| 中文字幕中文乱码欧美一区二区| 91首页免费视频| 亚洲一区中文日韩| 日韩三级视频在线看| 国产精品99久久久久久久vr | 日韩精品久久理论片| 欧美r级电影在线观看| 国产一区二区日韩精品| 国产精品国产自产拍高清av | 欧美日韩一区二区三区四区五区| 日本中文字幕一区二区有限公司| 欧美精品一区二区三| 成人av动漫网站|