Draw rectangle at the Intensity graph (position where it is clicked )

I am able to extract coordinates using mouse down and mouse up event structure but unable to draw the rectangle at the specified positions.I am getting coordinates at mouse down and mouse up event  in these bounds.I want to draw a rectangle at the position of coordinates but unable to do so.
Solved!
Go to Solution.
Attachments:
Draw Rect on Intensity Graph.vi ‏21 KB

One more thing, since you're using the Draw Rectangle function you need to deal with the cases where the rectangle is not drawn from top left to bottom right. You have to make sure the minimum X value goes to the LEFT input and the minimum Y value goes to the TOP input of the rect terminal of the Draw Rectangle vi. Use the Max & Min function from the comparison palette for this.
Ben64
Attachments:
Draw Rect on Intensity Graph3.vi ‏16 KB

Similar Messages

  • Using the trackpad in Windows - Where's right click?

    The age old Mac vs. PC question. While the command click does help for osx it doesnt work in windows vista or XP - any help to keep me from needing an external mouse.

    This does nothing special. It is a click and when you release the command key it works like the windows button just like the left command key. This seems to be a pretty major oversight considering that no mac notebook has a right mousebutton and it's pretty inconvinient to tote around a windows mouse. There has to be some right click shortcut I am missing.

  • How does LabVIEW Render the data in 2D Intensity Graphs?

    Hello,
    I was hoping someone could explain to me how LabVIEW renders it's 2D intensity data. For instance, in the attachment I have included an image that I get from LabVIEW's intensity graph. The array that went into the intensity graph is 90000x896 and the width/height of the image in pixels is 1056x636.
    Something I know from zooming in on these images as well as viewing the data in other programs (e.g. Matlab) is that LabVIEW is not simply decimating the data, it is doing something more intelligent. Some of our 90000 lines have great signal to noise, but a lot of them do not. If LabVIEW was simply decimating then our image would be primarily black but instead there are very obvious features we can track.
    The reason I am asking is we are trying to do a "Live Acquistion" type program. I know that updating the intensity graph and forcing LabVIEW to choose how to render our data gives us a huge performance hit. We are already doing some processing of the data and if we can be intelligent and help LabVIEW out so that it doesn't have to figure out how to render everything and we still can get the gorgeous images that LabVIEW generates then that would be great!
    Any help would be appreciated! Thanks in advance!
    Attachments:
    Weld.jpg ‏139 KB

    Hi Cole,
    Thank you for your understanding.  I do have a few tips and tricks you may find helpful, though as I mentioned in my previous post - optimization for images or image-like data types (e.g. 2D array of numbers) may best be discussed in the Machine Vision Forum.  That forum is monitored by our vision team (this one is not) who may have more input.
    Here are some things to try:
    Try adjusting the VI's priority (File»VI Properties»Category: Execution»Change Priority to "time critical priority")
    Make sure Synchronous Display is diasbled on your indicators (right-click indicator»Advanced»Synchronous Display)
    Try some benchmarking to see where the most time is being taken in your code so you can focus on optimizing that (download evaluation of our Desktop Execution Trace Toolkit)
    Try putting an array constant into your graph and looping updates on your Front Panel as if you were viewing real-time data.  What is the performance of this?  Any better?
    The first few tips there come from some larger sets of general performance improvement tips that we have online, which are located at the following links:
    Tips and Tricks to Speed NI LabVIEW Performance
    How Can I Improve Performance in a Front Panel with Many Controls and Indicators?
    Beyond that, I'd need to take a look at your code to see if there's anything we can make changes to.  Are you able to post your VI here?
    Regards,
    Chris E.
    Applications Engineer
    National Instruments
    http://www.ni.com/support

  • Add a simple setting to Intensity Graph that draws grid on top of data

    It would be extremely useful to break up the Intensity Graph data into cells to easily see "coordinates".  At the moment you have to follow coordinates with your finger or a pen.
    I was given this solution but it is surely an overkill for what should be a simple setting.
    http://forums.ni.com/t5/Measurement-Studio-for-NET/WPF-Intensity-Graph-gridlines-not-visible-on-plotted-data/td-p/3168193
     

    Siddhesh,
    You could define buttons / controls ... called 'next comp code' and 'prev comp code', and then in the events for these controls you could re-populate the alv data table with the data for each company code each time a button is pressed. 
    Hope this helps ...
    Duane

  • Region of Interest (ROI) on Intensity Graph

    Hello,
    I hope somebody can help me.  I have read the other posts available regarding choosing ROIs on intensity graphs but they don't really answer my question.
    I am taking a series of still images.  Having stored the image as an array and displayed it on the intensity graph, I need some way of selecting a rectangular ROI (preferably with mouse) to define an array subset and performing max/min/mean/standard deviation measurements on this region.  I am aware that the array would need reshaping to work with the in built VI for mean and standard deviation but cannot seem to find a way to may the selection of the array subset in the first place.
    I would be very grateful for any pointers
    Sarah Bohndiek

    Hi,
      since you're using an intensity graph, you could use an event structure to capture for the mouse down and mouse up events.
    They both give you the coords of where the mouse was. The nex trick would be to convert that into array position co-ordinates, which requires knowing how the data is presented in the graph (actual graph area size, and the amount of data passed to it.) It's easy enough to get the size of the plot area, and you can get the position of the control itself, however calculating exactly where the plot area is inside of the control is not available.
    If you plot area size is fixed, you could use a picture control, set to transparent over the top of the plot area. Then use the same trick for the event returning co-ordinates. If you change the values on the scale however, the actual plot area can change in size too (since the renumbering on an auto-scale can cause the scale on the axis to move if the text increases or decreases in length)
    By far the easiest route would be to buy the vision development module and use the image control which has the built in ROI capabilities (and editing of the ROI).
    Hope that helps
    Sacha Emery
    National Instruments (UK)
    // it takes almost no time to rate an answer
    Attachments:
    roi on intensity (picture).vi ‏73 KB

  • Programmatically disabling/enabling cursor in intensity graph

    Hello all,
    I am building a LV interface (LV2011) for a stepper XY stage.  The system "scans" a surface, displaying it on the graph.  I set up to cursors to zoom into a region of interest (ROI).  Pressing a button resizes the scales to the ROI (zooming in on the area).  Sections of code move the XY stage, and read a device.  When done I want to zoom into a ROI and use a THIRD cursor to manually move the XY stage.  I have this working with TWO graphs, based on the "region of interest.vi" I found in the dev zone.  
    What I would like to do is have a boolean toggle controlling ONE GRAPH between setting min/max (cursors 0 and 1) and manual stepper position (cursor 2).  If cursor 2 is visible I want cursors 0 & 1 not showing and visa versa. Can I do this?
    I attached the example - bascially what I did was add a cursor to the 2nd graph, grabbing the XY vales and sending to the stepper controllers. Works great!  I am trying to "combine the two" by resizing the orig graph with a button click (works fine) and then click another button to show the XY stage cursor (and hiding the min/max cursors) - thats the brick wall
    On a seond note - controlling a XY stage using the intensity graph's cursor is really nice; however it would be great if I can control the cursor similar to a slider's "coerce" - has anyone done this?  I assume I have to write a routine in the event that performs some modulo function. Just curious!
    Thanks,
    Steve
    Solved!
    Go to Solution.
    Attachments:
    roi.llb ‏40 KB

    Your exmaple works perfect. Howver I am having probs with Val(sngl) on the XY graph.  On the example you gave, lets say I move the cursor with the mouse - event fires, everyone is happy. If I move the cursor with CODE - nada.  I even read the "Value" of the graph and wrote it to "Val(sngl)" to try to fire the event.  How does one force a trigger on an XY chart when you move a cursor (say cursor idx2) using code?
    Better yet - why when I read the Val and write to Val(sngl) does the event not fire??? I have been searching for a basic XY table with sensor -type project but havent found one yet.  Everyting works great - draginng the cursor moves the XY stage. Now I need to do the auto-scan part  Use code to place the cursor - trigger the even that moves the stage.
    Thanks
    Steve
    Attachments:
    XY_Stage_Rev8.vi ‏53 KB

  • Programmin​g intensity graph cursor to move automatica​lly

    Hi Everyone!
    I want to program the 2 cursors(horizontal and vertical) in the intensity graph(Bright spot.png) to move to the bright spot in the middle of the intensity graph(live video feed from a CCD camera) automatically without dragging the cursor manually to the bright spot, is it possible?
    I've attached part of my block diagram which involves the graph but i'm unable to attach the whole VI because it has some hardware dll in it.(you guys can ignore the formula part of the block diagram, it's not important)
    Attachments:
    Bright spot.png ‏118 KB
    block diagram.png ‏45 KB

    Use "Array Max&Min" to find the peak coordinates, translate them to x and y values, and change your cursor position property node to write and write these values.
    I am actually not sure why you have two cursors. A single cursor with a horizontal and vertical line seems sufficient.
    LabVIEW Champion . Do more with less code and in less time .

  • Fix axes in intensity graph with cursor

    Hi all,
    I try to use the intensity graph as an xy-input device. The user should be allowed to drag the cursor to enter the value. However, the user can always move the cursor outside the plot area, which causes the corresponding axis to rescale. I want to have strictly fixed upper and lower limits. Is there any way to achieve this? One possible solution would be to reset the min/max values every time the cursor was moved (and coerce the cursor position back into the range). A simpler approach would be appreciated!
    Regards,
    Matthias

    > I try to use the intensity graph as an xy-input device. The user
    > should be allowed to drag the cursor to enter the value. However, the
    > user can always move the cursor outside the plot area, which causes
    > the corresponding axis to rescale. I want to have strictly fixed upper
    > and lower limits. Is there any way to achieve this? One possible
    > solution would be to reset the min/max values every time the cursor
    > was moved (and coerce the cursor position back into the range). A
    > simpler approach would be appreciated!
    >
    You don't say what version of LV you are using, but if it is relatively
    recent, right click on the graph and go to Advanced and uncheck the
    option to have Cursors Scroll Graph. The user can still drag and
    release the cursor und
    er the edge of the graph, but this will not change
    the scales. You can pretty easily filter cursor points that are out of
    range and even write back to the cursor value if you need to. I believe
    that if there is data in the plot and the cursor is set to lock to the
    plot, then it cannot be dragged outside the data either, and that is
    another solution.
    Greg McKaskle

  • Setting color table of intensity graph

    Hi!
    I set the attribute color table of an intensity graph to a rainbow
    distribution of the colors, but now I'm not able to change the color
    table with the markers in the front panel.
    Do you know a solution?
    Thanks, Markus

    > I set the attribute color table of an intensity graph to a rainbow
    > distribution of the colors, but now I'm not able to change the color
    > table with the markers in the front panel.
    > Do you know a solution?
    >
    Intensity graphs have two different modes for its color definition.
    The first, typical one, is the Color array. It can be set using
    either attributes or interactively and lets you define number/color
    pairs that create either a smoothly interpolated or a banded color
    gradient. The second mode is the color table. This is useful for
    bitmaps or for cases where the color table has been custom generated
    on the diagram. When using the color table, the Z scale is still
    useful for determining which numbers map to the 0-255 range of the
    color table. If you set the
    Z scale to autoScale, it will find the
    min and max of the data and set the Z to show all data mapped through
    the color table. If set smaller, some of the values will map to the
    first and last out of range colors. If set larger, it will map the
    values to a smaller and smaller number of the colors in the color
    table.
    It sounds like you really want to be using the color array and not
    the color table. The intensity graph automatically switches for
    you when you write attributes to it, but there is a way to change
    it back the the color array using a popup or attribute.
    Greg McKaskle

  • Possible to put limit lines on an intensity graph?

    Hi,
    I have LV8.5 and was wondering if there is a way to put limit lines on an intensity graph. Something line an unfilled rectangle or circle that sits on top of the intensity graph.
    Thanks,
    --Ryan

    You can use the "PlotImages.Front" property to apply any picture function over the graph area.
    Check e.g. the example program "Graph Plot Area Images". While it uses an XY graph, the intensity graph would work the same. See how far you get.
    LabVIEW Champion . Do more with less code and in less time .

  • Creating intensity graph from ywo sets of data?

    Hi,
    In my vi, I am getting two data set dependent on each other, i.e. amplitude(y) versus position(x). The data acquisition of x-y data happens in a for loop. This data is transferred outside the loop with index enabled. Outside the loop I want to plot an intensity graph out of these data, while z=amplitude, x=position,y=not important, say index. I don't want simply to transfer the amplitude data outside the loop and connect the 2D array of amplitude to the intensity graph. I want to preserve the position information in the intensity graph. How can I do this?
    Thanks

    Here is a link to a posting that may have been yours also. Just some ideas I had. I hope it can help you get started somewhere.
    J.R. Allen

  • How can I make a spectrogra​m from a soundwavef​orm using the intensity chart function?

    I want to make a spectrogram for a sound waveform where the x-axis is time, the y-axis is frequency, and the intensity is amplitude. I performed a DFT on the sound waveform, then used it as an input to the intensity chart function. Every time I run my program the x-axis has a scale from 0 to 1 sec, when my sound is longer. The y-axis doesn't give me the same range of frequencies as the DFT. The intensity scale is correct. Can anyone suggest another approach? The labview example did not help since I'm not generating an array and creating the intensity chart at the same time.

    Hello -
    You could probably use a 3D surface graph.
    I am including an attachment to show you what I mean. This example program is available here. I just made a few modifications to make it look as an intensity graph:
    1. By right clicking on the graph and going to CWGraph3D >> Properties and selecting the Grid Planes tab in the Graph tab, I unchecked the grids, to show just the graph. Then, I went to the 3D tab in the Graph tab, and selected Towards X-Y Plane in the View Direction section. Click OK.
    2. Then, I right clicked on the graph again and went to Advanced >> Enabled State and selected Disabled, so
    that the user cannot change the orientation any more.
    You can build your own plot using time and frequency as X & Y, and the amplitude will give you the color. You only need to adjust the orientation so that you can see it from �the top� and it looks like an intensity plot.
    Hope this helps.
    Attachments:
    XYZ_Plot_Example.zip ‏57 KB

  • Intensity graph and its "interpolate color" option

    Dear Devs,
    using LV2013.02f, my intensity graph never redraws correctly (it remains black), after I uncheck and check the "interpolate color" option in the right-click menu for the z-axis. Is this reproducible for anybody, please?
    Note: There are more situations when the intensity graph remains black after changing some options, but I could not reproduce them systematically. Any ideas what to use instead of it to display 2D arrays of values?
    Cheers,

    Dear users,
    dear GerdW
    Related issue:
    Intensity graph displays a black z-axis color bar
    The issue(s) are connected to the positions of the markers on the color bar. I converted the VI to a 2010version (again, wrapped in a 7-Zip archive), I hope that helps for now.
    Now, when I multiply my 2D array with a suitable high- and at the same time low-enough value (multiplier=1E+34) -- 1E+33 is too low, 1E+35 is already too high; then the markers of the color bar are visible suddenly. The "interpolate color" and the blackness of the graph can be now manipulated and adjusted.
    So now, I have to remember that the default markers' positions are (0,50,100) and there is no way to change them before I extend the values of my array over this region suitably. Seriously, I went through all the right-click on the z-axis menu items and executed them one-by-one. None of those brought the z-axis color bar or the colors back into the graph again.
    Q: How should a novice know about it? Isn't there a "reset all markers, distribute them equally and show all values in the default spectrum color" button somewhere, and did I missed it?!
    Cheers,
    Attachments:
    2013-11-27 0946 buggy intensity graph.7z ‏133 KB

  • Using intensity graph

    Hi,
         Currently, I have some problem using the intensity graphs. I am using the Time frequency toolbox in Labview. Currently, I am having a problem where I needed to plot the spectrogram of the signal. I have tried to maintain a plot of spectrogram at 0 to 4s and another at 4s to 8s. I am trying hard to plot two graph together, to form a plot of 0s to 8s, in the spectrogram. Furthermore, the time axis will continue to increases at 4s interval with updated spectrogram. I wonder how could i achieved in having two spectrogram with two different time interval to display a common plot? Thanks a lot for advice.
    Rdgs
    kengkc 
    Solved!
    Go to Solution.

    Hi kengkc,
    Correct me if I am wrong, but are you saying that you have the data for the first 4 seconds of your acquisition (t = 0 to 4) and the next 4 seconds of your acquisition (t = 4 to 8) and you want to combine them into one plot? I presume since you were able to plot them in an intensity graph to begin with, that they are already in arrays.
    If that is what you want to do,  you can easily concatenate your arrays using the Build Array function (this means to append one array to the end of another). Add your Build Array function from the Array subpalette, and make sure you right click it and choose Concatenate Arrays so that you dont get more dimensions in your resultant array. Then expand the Build Array function so that you can wire your arrays into it.
    Please refer to the attached screenshot for an idea of what I mean.
    Hope this helps.
    Best regards,
    Vern Yew
    Applications Engineer
    Attachments:
    concatenate.JPG ‏17 KB

  • Axes scaling and Intensity Graph

    Hello,
    I use a Intensity Graph to display measured data. Sometimes the X/Y-axis has to be transformed via the 1/x Operation and some other nonlinear transformations. Now I don't know how to let the Intensity Graph display the data correctly.
    E.g. I use a normal X/Y Graph. After the 1/x operation the space between the data points are not equidistant anymore. This probably works because the XY-Graph needs the X AND Y Axis.
    How can I do this with the Intensity Graph? Is there a simple solution or do I have to use the "picture" or somehting else?

    Greetings!
    You might need to use the arbitrary marker spacing. (click on the legend and look at the options) YOu can then assign a new color to each increment you select. You can also play around with the gradients, (color interpretation) but I suggest you only do that after you have your markers where you want them. I'm sure you can get nice results with the intensity graph.
    Eric
    Eric P. Nichols
    P.O. Box 56235
    North Pole, AK 99705

Maybe you are looking for

  • Beginner Programmer: Timer

    I'm pretty new to Java (or to any programming language for that matter), and I was wondering how to make a timer, and how hard it is to make one. In my programming class at school, all our programs were pretty small, and they only ran in the compiler

  • The App Store say that my payment method is declined why and it was ok before

    The App Store say that my payment method is declined why and it was ok before

  • How to configure network on Oracle Solaris 10

    Hi All, I have created a new virtual machine on Windows Server 2003 and installed Oracle Solaris 10 on VMWare. Now I need to configure network on my Solaris virtual machine, So that i can access Solaris machine outside the VMWare. Can somebody help m

  • Check Duplicate Entries in Dynamic itab.

    Hi, I have a dynamic internal table populated with some records. This internal table refers to different DDIC structures dynamically. I'm trying for a logic to check the duplicate entries that exists in this internal table and also to check whether t

  • Automatic replacement in Pages 5.0 ?

    I've just updated my Page 09. to Page 5.0 and I can't find any more the thing I prefered : Automatic Replacement. "we" => "week end"... Previously, you could find it with : Cmd + ; If anyone has found out where this feature is, please help me.