Email: helpdesk@telkomuniversity.ac.id

This Portal for internal use only!

  • My Download
  • Checkout
Application Package Repository Telkom University
All Categories

All Categories

  • IBM
  • Visual Paradigm
  • Adobe
  • Google
  • Matlab
  • Microsoft
    • Microsoft Apps
    • Analytics
    • AI + Machine Learning
    • Compute
    • Database
    • Developer Tools
    • Internet Of Things
    • Learning Services
    • Middleware System
    • Networking
    • Operating System
    • Productivity Tools
    • Security
    • VLS
      • Office
      • Windows
  • Opensource
  • Wordpress
    • Plugin WP
    • Themes WP
  • Others

Search

0 Wishlist

Cart

Categories
  • Microsoft
    • Microsoft Apps
    • Office
    • Operating System
    • VLS
    • Developer Tools
    • Productivity Tools
    • Database
    • AI + Machine Learning
    • Middleware System
    • Learning Services
    • Analytics
    • Networking
    • Compute
    • Security
    • Internet Of Things
  • Adobe
  • Matlab
  • Google
  • Visual Paradigm
  • WordPress
    • Plugin WP
    • Themes WP
  • Opensource
  • Others
More Categories Less Categories
  • Get Pack
    • Product Category
    • Simple Product
    • Grouped Product
    • Variable Product
    • External Product
  • My Account
    • Download
    • Cart
    • Checkout
    • Login
  • About Us
    • Contact
    • Forum
    • Frequently Questions
    • Privacy Policy
  • Forum
    • News
      • Category
      • News Tag

iconTicket Service Desk

  • My Download
  • Checkout
Application Package Repository Telkom University
All Categories

All Categories

  • IBM
  • Visual Paradigm
  • Adobe
  • Google
  • Matlab
  • Microsoft
    • Microsoft Apps
    • Analytics
    • AI + Machine Learning
    • Compute
    • Database
    • Developer Tools
    • Internet Of Things
    • Learning Services
    • Middleware System
    • Networking
    • Operating System
    • Productivity Tools
    • Security
    • VLS
      • Office
      • Windows
  • Opensource
  • Wordpress
    • Plugin WP
    • Themes WP
  • Others

Search

0 Wishlist

Cart

Menu
  • Home
    • Download Application Package Repository Telkom University
    • Application Package Repository Telkom University
    • Download Official License Telkom University
    • Download Installer Application Pack
    • Product Category
    • Simple Product
    • Grouped Product
    • Variable Product
    • External Product
  • All Pack
    • Microsoft
      • Operating System
      • Productivity Tools
      • Developer Tools
      • Database
      • AI + Machine Learning
      • Middleware System
      • Networking
      • Compute
      • Security
      • Analytics
      • Internet Of Things
      • Learning Services
    • Microsoft Apps
      • VLS
    • Adobe
    • Matlab
    • WordPress
      • Themes WP
      • Plugin WP
    • Google
    • Opensource
    • Others
  • My account
    • Download
    • Get Pack
    • Cart
    • Checkout
  • News
    • Category
    • News Tag
  • Forum
  • About Us
    • Privacy Policy
    • Frequently Questions
    • Contact
Home/Matlab/imshow with a slider object is blocking my Button Down function

imshow with a slider object is blocking my Button Down function

PuTI / 2025-01-15
imshow with a slider object is blocking my Button Down function
Matlab News

I have developed an app that reads all the frames of the video and allows the user to scroll through all the frames of a video with a line that I want to place at the centre of the frame during startup. Subsequently, it will become a user movable line. I initially created a ButtonDown callback on the Axes but it only works on the first image before I use the slider. After that, it doesn’t respond to any clicks.
I then tried a ButtonDown callback on the figure and it doesn’t work on the first image. It only works after I use the slider object and scroll through the frames. Can anyone figure out what the slider is doing to make my callbacks not work throughout the user interaction?
Also, I can’t seem to get rid of the first line that is created by the app during start up. Both callbacks will create a second line when a click is detected but subsequently that second line will be movable while the first line just stays in place.
The last issue I have is that my app takes ages to load when I click the ‘play’ button. At least 30 seconds-1 minute to show the first frame and all the other UI objects in the function. Is there any way I can make my app more efficient?
Here are my codes:
P.S. I use either the UIFigure ButtonDown call back or the UIAxes ButtonDown callback when I run my app and not at the same time.

function play(app, event)
videoReader = VideoReader(‘C:/Capstone/Data/Patient/Left Diaphragm Expiration.mp4’);
app.AllFrames=zeros(app.h,app.w,app.numFrames);
app.h=videoReader.height;
app.w=videoReader.width;
app.numFrames=videoReader.NumFrames;
app.framerate= videoReader.FrameRate;
app.Slider.Limits=[1,app.numFrames];
app.Slider.MinorTicks=[];
firstframe=read(videoReader,1);
for a=1:app.numFrames
frame=read(videoReader,a);
frame=im2gray(frame);
app.AllFrames(:,:,a)=frame;
end
app.framehandle=imshow(firstframe,’Parent’,app.UIAxes);
set(app.framehandle,’HitTest’,’off’);
set(app.framehandle, ‘PickableParts’,’all’);
hold (app.UIAxes,"on");
app.Mline= xline(app.UIAxes,(app.w/2),’Color’,’red’);
app.Mline.LineWidth=2;

function changingValue(app, event)
value = floor(app.Slider.Value);
app.framehandle=imshow(app.AllFrames(:,:,value),[0,255],’Parent’,app.UIAxes)
set(app.framehandle,’HitTest’,’off’);
set(app.framehandle, ‘PickableParts’,’all’);
hold (app.UIAxes,"on");

% Value changed function: Slider
function valueChanged(app, event)
value = floor(app.Slider.Value);
app.framehandle=imshow(app.AllFrames(:,:,value),[0,255],’Parent’,app.UIAxes)
set(app.framehandle,’HitTest’,’off’);
set(app.framehandle, ‘PickableParts’,’all’);
hold (app.UIAxes,"on");

% Button down function: UIFigure
function UIFigureButtonDown(app, event)
delete(app.Mline)
app.Mline=xline(app.UIAxes,app.UIAxes.CurrentPoint(1),’Color’,’red’);
app.Mline.LineWidth=2;

% Button down function: UIAxes
function UIAxesButtonDown(app, event)
app.Mline=xline(app.UIAxes,app.UIAxes.CurrentPoint(1),’Color’,’red’);
app.Mline.LineWidth=2;I have developed an app that reads all the frames of the video and allows the user to scroll through all the frames of a video with a line that I want to place at the centre of the frame during startup. Subsequently, it will become a user movable line. I initially created a ButtonDown callback on the Axes but it only works on the first image before I use the slider. After that, it doesn’t respond to any clicks.
I then tried a ButtonDown callback on the figure and it doesn’t work on the first image. It only works after I use the slider object and scroll through the frames. Can anyone figure out what the slider is doing to make my callbacks not work throughout the user interaction?
Also, I can’t seem to get rid of the first line that is created by the app during start up. Both callbacks will create a second line when a click is detected but subsequently that second line will be movable while the first line just stays in place.
The last issue I have is that my app takes ages to load when I click the ‘play’ button. At least 30 seconds-1 minute to show the first frame and all the other UI objects in the function. Is there any way I can make my app more efficient?
Here are my codes:
P.S. I use either the UIFigure ButtonDown call back or the UIAxes ButtonDown callback when I run my app and not at the same time.

function play(app, event)
videoReader = VideoReader(‘C:/Capstone/Data/Patient/Left Diaphragm Expiration.mp4’);
app.AllFrames=zeros(app.h,app.w,app.numFrames);
app.h=videoReader.height;
app.w=videoReader.width;
app.numFrames=videoReader.NumFrames;
app.framerate= videoReader.FrameRate;
app.Slider.Limits=[1,app.numFrames];
app.Slider.MinorTicks=[];
firstframe=read(videoReader,1);
for a=1:app.numFrames
frame=read(videoReader,a);
frame=im2gray(frame);
app.AllFrames(:,:,a)=frame;
end
app.framehandle=imshow(firstframe,’Parent’,app.UIAxes);
set(app.framehandle,’HitTest’,’off’);
set(app.framehandle, ‘PickableParts’,’all’);
hold (app.UIAxes,"on");
app.Mline= xline(app.UIAxes,(app.w/2),’Color’,’red’);
app.Mline.LineWidth=2;

function changingValue(app, event)
value = floor(app.Slider.Value);
app.framehandle=imshow(app.AllFrames(:,:,value),[0,255],’Parent’,app.UIAxes)
set(app.framehandle,’HitTest’,’off’);
set(app.framehandle, ‘PickableParts’,’all’);
hold (app.UIAxes,"on");

% Value changed function: Slider
function valueChanged(app, event)
value = floor(app.Slider.Value);
app.framehandle=imshow(app.AllFrames(:,:,value),[0,255],’Parent’,app.UIAxes)
set(app.framehandle,’HitTest’,’off’);
set(app.framehandle, ‘PickableParts’,’all’);
hold (app.UIAxes,"on");

% Button down function: UIFigure
function UIFigureButtonDown(app, event)
delete(app.Mline)
app.Mline=xline(app.UIAxes,app.UIAxes.CurrentPoint(1),’Color’,’red’);
app.Mline.LineWidth=2;

% Button down function: UIAxes
function UIAxesButtonDown(app, event)
app.Mline=xline(app.UIAxes,app.UIAxes.CurrentPoint(1),’Color’,’red’);
app.Mline.LineWidth=2; I have developed an app that reads all the frames of the video and allows the user to scroll through all the frames of a video with a line that I want to place at the centre of the frame during startup. Subsequently, it will become a user movable line. I initially created a ButtonDown callback on the Axes but it only works on the first image before I use the slider. After that, it doesn’t respond to any clicks.
I then tried a ButtonDown callback on the figure and it doesn’t work on the first image. It only works after I use the slider object and scroll through the frames. Can anyone figure out what the slider is doing to make my callbacks not work throughout the user interaction?
Also, I can’t seem to get rid of the first line that is created by the app during start up. Both callbacks will create a second line when a click is detected but subsequently that second line will be movable while the first line just stays in place.
The last issue I have is that my app takes ages to load when I click the ‘play’ button. At least 30 seconds-1 minute to show the first frame and all the other UI objects in the function. Is there any way I can make my app more efficient?
Here are my codes:
P.S. I use either the UIFigure ButtonDown call back or the UIAxes ButtonDown callback when I run my app and not at the same time.

function play(app, event)
videoReader = VideoReader(‘C:/Capstone/Data/Patient/Left Diaphragm Expiration.mp4’);
app.AllFrames=zeros(app.h,app.w,app.numFrames);
app.h=videoReader.height;
app.w=videoReader.width;
app.numFrames=videoReader.NumFrames;
app.framerate= videoReader.FrameRate;
app.Slider.Limits=[1,app.numFrames];
app.Slider.MinorTicks=[];
firstframe=read(videoReader,1);
for a=1:app.numFrames
frame=read(videoReader,a);
frame=im2gray(frame);
app.AllFrames(:,:,a)=frame;
end
app.framehandle=imshow(firstframe,’Parent’,app.UIAxes);
set(app.framehandle,’HitTest’,’off’);
set(app.framehandle, ‘PickableParts’,’all’);
hold (app.UIAxes,"on");
app.Mline= xline(app.UIAxes,(app.w/2),’Color’,’red’);
app.Mline.LineWidth=2;

function changingValue(app, event)
value = floor(app.Slider.Value);
app.framehandle=imshow(app.AllFrames(:,:,value),[0,255],’Parent’,app.UIAxes)
set(app.framehandle,’HitTest’,’off’);
set(app.framehandle, ‘PickableParts’,’all’);
hold (app.UIAxes,"on");

% Value changed function: Slider
function valueChanged(app, event)
value = floor(app.Slider.Value);
app.framehandle=imshow(app.AllFrames(:,:,value),[0,255],’Parent’,app.UIAxes)
set(app.framehandle,’HitTest’,’off’);
set(app.framehandle, ‘PickableParts’,’all’);
hold (app.UIAxes,"on");

% Button down function: UIFigure
function UIFigureButtonDown(app, event)
delete(app.Mline)
app.Mline=xline(app.UIAxes,app.UIAxes.CurrentPoint(1),’Color’,’red’);
app.Mline.LineWidth=2;

% Button down function: UIAxes
function UIAxesButtonDown(app, event)
app.Mline=xline(app.UIAxes,app.UIAxes.CurrentPoint(1),’Color’,’red’);
app.Mline.LineWidth=2; appdesigner, image analysis MATLAB Answers — New Questions

​

Tags: matlab

Share this!

Related posts

Warning: Error updating FunctionLine in using fplot
2025-05-12

Warning: Error updating FunctionLine in using fplot

Solid creation Simulink, simscape multibody: stuck in loading
2025-05-12

Solid creation Simulink, simscape multibody: stuck in loading

Issues with EMG Signal Acquisition via Simulink Desktop Real-Time (SDRT) and DAQ Board Usage
2025-05-12

Issues with EMG Signal Acquisition via Simulink Desktop Real-Time (SDRT) and DAQ Board Usage

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Categories

  • Matlab
  • Microsoft
  • News
  • Other
Application Package Repository Telkom University

Tags

matlab microsoft opensources
Application Package Download License

Application Package Download License

Adobe
Google for Education
IBM
Matlab
Microsoft
Wordpress
Visual Paradigm
Opensource

Sign Up For Newsletters

Be the First to Know. Sign up for newsletter today

Application Package Repository Telkom University

Portal Application Package Repository Telkom University, for internal use only, empower civitas academica in study and research.

Information

  • Telkom University
  • About Us
  • Contact
  • Forum Discussion
  • FAQ
  • Helpdesk Ticket

Contact Us

  • Ask: Any question please read FAQ
  • Mail: helpdesk@telkomuniversity.ac.id
  • Call: +62 823-1994-9941
  • WA: +62 823-1994-9943
  • Site: Gedung Panambulai. Jl. Telekomunikasi

Copyright © Telkom University. All Rights Reserved. ch

  • FAQ
  • Privacy Policy
  • Term

This Application Package for internal Telkom University only (students and employee). Chiers... Dismiss