Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function varargout = harris_figure(varargin)
- % HARRIS_FIGURE M-file for harris_figure.fig
- % HARRIS_FIGURE, by itself, creates a new HARRIS_FIGURE or raises the existing
- % singleton*.
- %
- % H = HARRIS_FIGURE returns the handle to a new HARRIS_FIGURE or the handle to
- % the existing singleton*.
- %
- % HARRIS_FIGURE('CALLBACK',hObject,eventData,handles,...) calls the local
- % function named CALLBACK in HARRIS_FIGURE.M with the given input arguments.
- %
- % HARRIS_FIGURE('Property','Value',...) creates a new HARRIS_FIGURE or raises the
- % existing singleton*. Starting from the left, property value pairs are
- % applied to the GUI before harris_figure_OpeningFcn gets called. An
- % unrecognized property name or invalid value makes property application
- % stop. All inputs are passed to harris_figure_OpeningFcn via varargin.
- %
- % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
- % instance to run (singleton)".
- %
- % See also: GUIDE, GUIDATA, GUIHANDLES
- % Edit the above text to modify the response to help harris_figure
- % Last Modified by GUIDE v2.5 25-Dec-2014 10:39:26
- % Begin initialization code - DO NOT EDIT
- gui_Singleton = 1;
- gui_State = struct('gui_Name', mfilename, ...
- 'gui_Singleton', gui_Singleton, ...
- 'gui_OpeningFcn', @harris_figure_OpeningFcn, ...
- 'gui_OutputFcn', @harris_figure_OutputFcn, ...
- 'gui_LayoutFcn', [] , ...
- 'gui_Callback', []);
- if nargin && ischar(varargin{1})
- gui_State.gui_Callback = str2func(varargin{1});
- end
- if nargout
- [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
- else
- gui_mainfcn(gui_State, varargin{:});
- end
- % End initialization code - DO NOT EDIT
- % --- Executes just before harris_figure is made visible.
- function harris_figure_OpeningFcn(hObject, eventdata, handles, varargin)
- % This function has no output args, see OutputFcn.
- % hObject handle to figure
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % varargin command line arguments to harris_figure (see VARARGIN)
- % Choose default command line output for harris_figure
- handles.output = hObject;
- % Update handles structure
- guidata(hObject, handles);
- % UIWAIT makes harris_figure wait for user response (see UIRESUME)
- % uiwait(handles.figure1);
- % --- Outputs from this function are returned to the command line.
- function varargout = harris_figure_OutputFcn(hObject, eventdata, handles)
- % varargout cell array for returning output args (see VARARGOUT);
- % hObject handle to figure
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % Get default command line output from handles structure
- varargout{1} = handles.output;
- % --- Executes on button press in btnbutton.
- function btnbutton_Callback(hObject, eventdata, handles)
- % hObject handle to btnbutton (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- [fname, path] = uigetfile({ '*.bmp', 'Bimap files'; '*.jpg', 'JPEG files'}, 'Please choose an image file');
- if(fname == 0) return;
- end
- imageFile = [path fname];
- fHandle = findobj('Tag', 'imageFile');
- set(fHandle, 'String', imageFile);
- axes(gca);cla(gca);
- [data map] = imread(imageFile);
- imshow(data, map);
- %save data+map
- handles.imageData = data;
- handles.imageMap = map;
- guidata(hObject, handles);
- % --- Executes on button press in btnst1.
- function btnst1_Callback(hObject, eventdata, handles)
- % hObject handle to btnst1 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % --- Executes on button press in btnst2.
- function btnst2_Callback(hObject, eventdata, handles)
- % hObject handle to btnst2 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % --- Executes on button press in btnst3.
- function btnst3_Callback(hObject, eventdata, handles)
- % hObject handle to btnst3 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % --- Executes on button press in btn4.
- function btn4_Callback(hObject, eventdata, handles)
- % hObject handle to btn4 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % --- Executes on button press in btnst5.
- function btnst5_Callback(hObject, eventdata, handles)
- % hObject handle to btnst5 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % --- Executes on button press in btnst6.
- function btnst6_Callback(hObject, eventdata, handles)
- % hObject handle to btnst6 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement