Drawing line with the mouse clicks on picture indicator

Hello

I need to import a JPG file in an image control, draw a line in 2 clicks, read bothe XY positions and perform some basic trigonometry. Any simple or striaghtforward way to draw the line with the mouse and read thos passay on the bitmap (positions relative pixel)?

Thanks in advance,


Tags: NI Software

Similar Questions

  • Problem with 'if - ElseIf' statement with the mouse, click.

    I'm having a problem with the code IF ELSE use with a mouse click. I want whenever a user 'clicks' I want to run a particular block of code, up to 3 clicks, then nothing. I tried var meter click local and global but can't seem to cross the first '' if. '' That's what I have now (I use console.log () to keep track.

    Ready model I create a global var...

    Enter the code to run when the composition is fully charged here
    sym.getComposition () .getStage () .setVariable ('clickcnt', 1); //Set 1 meter

    var i = sym.getComposition () .getStage () .getVariable ('clickcnt');

    Console.log ("count starts at"+ i ");


    on the stage, I create an event 'click '...

    Insert the code for the mouse, click here
    var i = (sym.getComposition () .getStage () .getVariable ('clickcnt');)
    If (i = 1) {}
    Console.log ("counter is =" + i);
    c code
    sym.getComposition () .getStage () .setVariable ('clickcnt', 2); //Set against 2
    }
    ElseIf (i = 2) {}
    Console.log ("counter is =" + i);
    c code
    sym.getComposition () .getStage () .setVariable ('clickcnt', 3);
    //Set against 3
    }
    ElseIf (i = 3) {}
    Console.log ("counter is =" + i);
    c code
    sym.getComposition () .getStage () .setVariable ('clickcnt', 4);
    //Set against 4 to take away
    SYM. Play (100); //play scenario animation
    }
    else { //I'm using it to deny any additional clicks.} I don't know there is a good way to do this. I don't know him
    SYM. Stop (1000);
    Console.log ("End");
    }
    ;

    I when I run this it never happened the first if it's like the 'clickcnt' var is not getting updated or read correctly.

    Thank you

    Joel H

    try if (I == 1) double equal.

  • Contact information for return pixel Imaq image with the mouse click event

    Hello

    I'm trying to get the coordinates in pixels of an image Imaq based on a mouse click event, similar to this post and this post. The problem is that with the first post, I get the coordinates in the image control and hesitate to trust them, they seem to have the Center origin, may return negative coordinates and do not represent the actual size of the detector that I use (512 x 512). It also returns the coordinates outside the actual data when it is clicked on the image control framework. The second method returns simply null coordinates. What I want are the coordinates of the pixel displayed when hovering the mouse imaq image control framework.

    What baffles me, is that I tried the second method with a png stock file and it works fine, it is only when I create an image from the data of my camera than the coordinates are returned null. Note data views of camera under control of image very well.

    Any ideas would be useful. Enclosed is a picture of the offending code and the Panel before displaying the camera data is coming (I know it needs some cleaning).

    Thank you

    Tyler

    for help, please send your vi

    but I think that this example vi is your solution

    check this vi

  • InDesign objects are not locked and will not move with the mouse click.

    I rebooted, uninstalled and reinstalled. Objects interact with when the mouse is clicked. The contours of the block came and the object can be selected and changed, however it will not move with a mouse. Objects respond to the arrows when the issue is raised; but it's heavy at best.

    I gave in my computer image. What was the origin of the problem, is now gone. Thanks for your help.

  • Draw lines with your mouse

    I was scratching my head on this throughout the morning. I added rectangles to the scene when running via AS 3.0. I drag these rectangles on the scene. Now, I would like to use a method to click on one of these rectangles and draw a line to nowhere else on the scene - ideally another rectangle. I thought to use RIGHT_MOUSE_UP and RIGHT_MOUSE_DOWN, but those don't seem to work on Mac using the magic mouse. It is considered to be a left click. Someone at - it any example of code that can do what I'm looking for?

    Thank you!

    ensure that:

    var clickNum: int = 0;

    stage.addEventListener (MouseEvent.CLICK, clickF);

    function clickF (e: MouseEvent): void {}

    {with (this.) Graphics)}

    lineStyle (1, 0xff0000);

    If (clickNum % 2 == 0) {}

    moveTo (this.mouseX, this.mouseY);

    } else {}

    lineTo (this.mouseX, this.mouseY);

    }

    }

    clickNum ++

    }

  • Default with the mouse, click on?

    Hi guys,.

    I'm fairly new to LabVIEW, and indeed this forum, so I hope you can help. I guess this is a simple problem, but I can't understand how do.

    I have a cRIO taking 4 analog voltages. Each voltage comes from a linear potentiometer which is the displacment of suspension on a formula student race car.

    I have a simple formula set up to convert the voltage to displacment. I created a table of entries that allows me to the maximum, minimum, value (from the previous probe calibration) and "stationary" value of each sensor.

    The "stationary" value, is what the sensor should be read when the car is stopped. This is then used as the basis for positive or negative displacments.

    My problem is that whenever a different driver gets in the car, the susspension is adjusted or fuel is added, the "stationary" value will be different. I then have to manually define the stationary value to whatever the current value is when the car is stopped, press "default current worth" and save the VI before continuing.

    What I would like to, is a "calibrate" button that I can support on that sets the "stationary" regardless of the current input voltage is. In this way, I wouldn't reset the 4 values each time the car has been modified.

    If you have any ideas on how to do this, please let me know.

    I will attach my VI as soon as I return to the laptop where it is saved!

    Thank you

    Kevin Irving

    Kevin,

    As you have discovered, you cannot change the default values on a VI running.

    The best way to do what you want is to use a configuration file.  There are a set of screws specifically designed for this purpose in the palette file IO.  When the user presses the button "calibrate", the values are stored in the file. When the program starts, it reads the file and sets controls on the values in the file.  You can even keep different for each driver sets, if the data are fairly consistent.

    Read the help detailed for the screw configuration files and look at the examples.  It will show you how to get started.

    Lynn

  • Scrolling with the mouse on the pages to create black and white, lines

    When scrolling with the mouse, periodically the entire screen turns into black and white lines. Page sometimes together, sometimes just from ads pictures/side. If you continue to scroll disappear but you need to scroll to where the lines have begun, it's hard to explain, I took 1 picture of the problem but will have more photos that I can, I love how Firefox works on my computer, it has always been the best browser for my needs. I recently bought a new desktop computer, but he did so also, so I deleted and tried to launch the Explorer and Google and I don't like, so I hope that we can settle this problem.

    I don't know if it solved the problem, but he didn't precisely these days. Thank you

  • Shift-click to create straight lines with the Brush tool is no longer works in 2015 CC

    Hello!

    I feel a maddening thing I can't explain, maybe a bug or a dark environment?

    If I use the pencil tool, I can click on the same spot on the canvas, then releases, then hold SHIFT key and click in another location on the canvas to create a straight line between the two points. This is expected behavior, and Photoshop has done this for years, as long as I can remember.

    Until recently, the same has worked with the Brush tool. Since the upgrade to 2015 CC, however, shift-click on demand exactly as if I was clicking simply - he draws another full brush, but without a straight line connecting the two clicks. Weird.


    Everyone knows the same behavior? (CC and Yosemite are completely up to date.)


    Best,

    Jason

    Image%202015-08-04%20at%201.04.07%20PM.png

    (this little test of the brush is also to express my emotional state right now.)    : |

    Spacing stops on this special brush?

  • With the mouse to draw the edges of a XY Chart to calculate the perimeter and area of him

    I have signals from a stabilometer... I traced X in terms of y in a XY Chart and I want to know how I can draw with the mouse a circle linking most of the points that is the graph of X on Y and calculate the area of her more perimeter. I joined my program labview with two files X and Y

    LV 2009 Version attached.

  • How can I configure my computer to the simple click with the mouse to double-click to open an item on the desktop instead

    How can I configure my computer to the simple click with the mouse to double-click to open an item on the desktop instead

    Hi placebow,

    Open the Options folder by clicking the Start button, clicking Control Panel, appearance and personalization, and then clicking Folder Options. On the general tab, click single-click to open an item. (To return to the standard click, click double-click to open an item.)

    The setting applies not only at the office, but also in other areas of the shell.
    Ramesh Srinivasan, Microsoft MVP [Windows Desktop Experience]

  • Where can I change the setting for single/double clicking with the mouse

    From: brelade

    How can I change the option to double click with a single click to open programs with the mouse.

    --

    Brelade

    From: brink

    Hi brelade.

    You have to go into Options of folders in the control panel (Classic view) or the Tools menu in the Explorer of.  Here is a link to a screenshot.

    http://www.Vistax64.com/tutorials/40246-single-click-option.html?LTR=S

    Shawn

    Another response of the community of Windows Vista discussion groups

  • How to draw a line (with the line segment tool) then draw another line, from those previous anchor point. When I try immediately draw another line on the other anchor lines it try to turn instead.

    I'm following a course of basic fundamental illustrator on Lynda. The video of "draw straight lines" is troubling me. They draw a line with the line segment and then draw another line coming out the anchor point at an angle.

    Here's where it is troubling me - when I try to drag a line to the anchor point trying to transform the first line, I drew. (the line cursor turns into a selection tool) I can't draw another line connecting the first.

    Advice would be great because it's driving crazy me.

    See you soon,.
    Kyle

    Yes, it is irritating. You must clear the previous line first. If you want to make sure that both ends are perfectly aligned, start by turning on the guides. If you want two lines to be part of the same way, you should use the tool pen instead.

  • I work with dreamweaver cs6 running on Apple Mavericks.  The site definition window shows all different fields by opening. I have to click blind with the mouse cursor in this window until the fields appear.  It is a very bored

    I work with dreamweaver cs6 running on Apple Mavericks.

    The site definition window shows all different fields by opening. I have to click blind with the mouse cursor in this window until the fields appear.

    It is somehow very annoying to complete the connection to the server and all the other things.

    Is there a solution?

    If this is the case, I think that it is perhaps a good idea to uninstall Dreamweaver. Before you reinstall, make sure that your personal configuration file has been deleted (see reinstalling Dreamweaver (or the extensions Manager) fails to solve problems). You should then have a completely clean copy of Dreamweaver has again the default settings of the program.

  • Download assets compared to the creative clouds, but when I click with the mouse on the "cloud" Download nothing happen.

    Hello, im tryng download active compared to the creative clouds, but when I click with the mouse on the "cloud" don't download anything happen. I have already uninstall and install again cloud creative app but still does not. Anyone having the same problem and have success on repair? Thank you all

    Luis Oliveira

    Please contact the customer service

  • I look integrated in the block of the legend of slide show, a widget like "Accordion" for, with one click, or by the way with the mouse, open a new caption for each photo. I tried with 'Accordion' Muse, it does not work. I haven't tried to copy and paste,

    Issue.

    I look integrated in the block of the legend of slide show, a widget like "Accordion" for, with one click, or by the way with the mouse, open a new caption for each photo. I tried with 'Accordion' Muse, it does not work. I haven't tried to copy and paste, but no result. The widget disappear into the legend of block. disappear. Do you have a solution?

    Thank you

    Loïc

    Accordion Panel tabs should, with click and open the container.

    Please provide the url of the site where it does not, also if you can provide an example where we can see the exact action, then it would help us.

    Thank you

    Sanjit

Maybe you are looking for

  • Watch os3 series 1 battery dead in the afternoon

    Hello I updated my Apple Watch series 1 to use watch OS 3, the process took a fair while, the app shows on my iPhone 6 says it was download '20 minutes of the end' then "2 days left", while my watch died around 15:00 (watch OS 2.x), I thought because

  • I suspect that there is spyware on my Mac.

    Today I used internet banking, and this evening I received an email claiming to be from this bank.  It may have been a coincidence, but can advise you on how to clean my Mac of spyware, just in case?

  • WGA600N and the WRVS4400N

    I have problems with the connection of the wireless game adapter.  He is able to find my router and it connects to where he asks my security key.  I enter the key and I checked it came directly through my eyes and someone else and I cannot get it to

  • Features of the VPC integration no longer works when transferred to a new pc

    Hi guys. I used VPC since it was released for years XP.  I am now on Windows 7 and run several XP/7 VPC. A problem I meet always is when I update my host PC or operating system and the transfer on the VPC files it always seems to break the integratio

  • Firefox will show all the pages, or options. about: support update each time

    After updating Firefox 50, I can't access the sites or open Firefox-> options when starting firefox. Do a "Refresh" by going into ' subject: support ' and click Refresh. Then it works, but only for this session.