Get the width/height of the current image / information of KING of user input

Hello

I have two problems:

First of all:

Y at - it an option to get the width and height of the image to use for calculations or set a return on investment for the right settings?

Second (more complicated):

I have used Labview 8.5 custom interface (see the interface.jpg attachment).

I am trying to get the return on investment of the Interface and use it in my app Builder of Vision, but I don't see the return on investment or its size or position or something...

Is it possible to get this information from the Interface?

Information:

I use Vision Builder 2009 SP1, LabVIEW 8.5

Thanks for your replies!

Hello

I missed that when I tested it... the display image control must have been larger than the size of the image and the property node returned the value that I expected.

A restriction of the VI to Interface custom that you create in LabVIEW, is that it cannot have any dependencies (call any subgroup screws), other than the methods and the nodes property of the objects you put on. Therefore, I can't just call IMAQ GetImageSize her. So it does not seem possible at this point for the VI of custom Interface return the size of the image.

The solution, at this stage, to get the size of the image of the Interior Vision Builder AI, is to use a step in LabVIEW Run, calling a simple VI that takes an image as input, called IMAQ GetImageSize and return res X and Y.

Note that for purposes of distribution, when you call a VI using a LabVIEW execution step, you must save it as a source distribution in a Bachelor's degree in LAW and you must redistribute this llb with your inspection. See using setup step run LabVIEW for more details.

Sorry there is no better way to do this now.

Best regards

Christophe

Tags: NI Hardware

Similar Questions

  • How to get the current selected action.

    Hello

    I would get the currently selected action.

    Please refer to the image below. Vignette (selection) is selected.

    Is there a script that I could use to get the which?

    Your help is very appreciated.

    Untitled-1.jpg

    getSelectedAction()
    function getSelectedAction(){
        var ref = new ActionReference();
        ref.putEnumerated( charIDToTypeID("Actn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
        try{
            var desc = executeActionGet(ref);
        }catch(e){ return; } // no action selected
        var selectedName = desc.getString(charIDToTypeID("Nm  "));
        var selectedIndex = desc.getInteger(charIDToTypeID("ItmI"));
        var parentName = desc.getString(charIDToTypeID("PrNm"));
        var parentIndex = desc.getInteger(charIDToTypeID("PrIn"));
        if(isActionSet( parentIndex, parentName )){
            var setName = parentName;
            var actionName = selectedName;
        }else{
            var setName = findAction(parentIndex, parentName );
            var actionName = parentName;
        }
        return [setName,actionName];
    };
    function isActionSet( parentIndex, parentName ){
       var res = false;
       try{
          var ref = new ActionReference();
          ref.putIndex( charIDToTypeID( "ASet" ), parentIndex );
          var setName = executeActionGet( ref ).getString(charIDToTypeID("Nm  "));
          if(setName == parentName) res = true;
       }catch(e){}
       return res;
    };
    function findAction(parentIndex, parentName ) {
      var i = 1;
      var found = false;
      while (!found) {
        var ref = new ActionReference();
        ref.putIndex(charIDToTypeID('ASet'), i);
        var desc;
        try {
          desc = executeActionGet(ref);
        } catch (e) {
          break;
        } finally {
        }
        if (desc.hasKey(charIDToTypeID('Nm  '))) { ;
          var setName = desc.getString(charIDToTypeID('Nm  '));
            var ref = new ActionReference();
            ref.putIndex(charIDToTypeID('Actn'), parentIndex);
            ref.putIndex(charIDToTypeID('ASet'), i);
            try{
            var adesc = executeActionGet(ref);
            var actName = adesc.getString(charIDToTypeID('Nm  '));
            if(actName==parentName) return setName;
            }catch(e){}
          }
        i++;
        }
    };
    
  • Dynamic text box to show the current image not workng

    Please could someone help me. I wish that my area of dynamic text to display the current image of roots. I triedthis with no luck

    frameNumberText_txt.text = currentFrame;

    I'm pretty sure that the problem is because the field requires a string value. I'm not sure how to do that heh

    Try...

    frameNumberText_txt.text = String (this.currentFrame);

    This assumes that the textfield object lives on the root timeline.  If that's not solve it, and you get an error message, include the error message in your ad.

  • I reinstalled Firefox Desktop, I downloaded my favorites of Carbonite, how can I get the current Firefox to accept?

    See above

    I reinstalled Firefox Desktop, I downloaded my favorites of Carbonite, how can I get the current Firefox to accept?

    You do backup your bookmark as a .json file?

    Restoration of bookmark

  • I want to get the current music, I have on my iPod out of it and start again. How can I do this?

    I want to get the current music, I have on my iPod out of it and start again. How can I do this?

    Open iTunes, plug in the iPod, select what you want to be on your iPod, sync.

  • Get the current value of the menu a cluster ring

    Hello

    I am trying to program a bunch of rings of menu to use the same options and disable the option even in the other rings of menu if it has already been chosen. It works essentially as is at the moment, but it shows each button by using a 'deactivated' option because I'm turning off the option even in the buttons that have this value. I did it using a loop knot and property and [] DisabledItems en mass. Now, I want to go to the iteration of the loop for the menu ring which already has this value.

    To do this however, I want to get the current numeric value of the ring of menu and an array of search values. If the value of menu rings appear in this table, then I want to move to the current iteration of the loop. The problem I have is that when I try to use a property node and type the property value, instead of giving me a long 32 output, it gives me the so-called 'Variant', which I have not seen before. I'm not sure how to find a table and see if the value I have is in this table. "Search table" seems just an index to be returned, I think that I want a Boolean or something. I'm also not sure how to skip an iteration of the loop (although I imagine it won't be too difficult to understand mine, I hope).

    I apologize if this is very obvious, or if my message is not clear. I started using LabVIEW, a few weeks ago and I'm still learning. I have included a picture of my Subvi downstairs.

    Thank you
    Nathan

    Variant of data allows to convert the variant to a numeric type (whatever representation you need).

    Search D 1 table returns-1 if the element was not found.  If you just compare the index with a greater or equal to zero and the result will be if the element was found in the table.

  • I really want to get the IMAQ Image IMAQ Arry case to Image.vi files

    Hello!

    Although already, I installed LabVIEW8.2 and NOR-IMAQ, I don't have IMAQ Image cases and IMAQ Arry Image.vi files.

    To use the infrared camera, I need them.

    I really want to get the case Image IMAQ Arry Image.vi files IMAQ.

    How can I get these files?

    Please, let me know the methods.

    Sincerely!

    Thank you very much for your explanation.

    Solve the problem.

    Have a nice day ^ ^

  • Get the current value of a control of the ring

    I have a control of the ring that has the following values. See attacment. I need to get the current value of this one and use it as input for another function, but First I would like to get the current value and save ina text file. I tried this

    if (event == EVENT_LEFT_CLICK_UP) || (event == EVENT_LEFT_CLICK_DOWN)
    {
        int p;
        GetCtrlVal (panelHandle, PANEL_RINGSLIDE_1, &p);
        FILE *OutFile = fopen("C:\\Users\\Student\\Desktop\\ringtest.txt","w");
        fprintf(OutFile,p);
        fclose(OutFile);
    
    }
    

    I need to get the current value of the ring (& p) to write to the file ringtest.txt.

    Also, I need to use this value (& p) as another entry in the same program.

    IE value of & p must be used in

    b = c * 5; where c is the value of the current & p.

    Can any 1 help?

    You're right: EVENT_LEFT_CLICK_DOWN is not a valid event for the CVI. Valid events are listed in the userint.h file, and are the only events that can be caught in the trap in a point of order. On the other hand, you're assuption on EVENT_VAL_CHANGED is correct: you can trap forget the EVENT_CLICK_UP event.

    According to the second question, looking at the definition for fprintf you must pass a string format as the second parameter to the function, then the value to write to the file. In your case, the correct syntax is:

    fprintf (OutFile, "%d", p);

  • problem to get the current date in qml

    Hello world

    I'm trying to get the current date in c ++ and qml and I used the class QDate, but it still has some problems:

    Code:

    =====================================================

    QDate * nowdate = new QDate;
    QDeclarativePropertyMap * nowdateMap = new QDeclarativePropertyMap;
    nowdateMap-> insert ("date", QVariant (nowdate-> currentDate()));
    QML-> setContextProperty ("nowdateMap", nowdateMap);

    ===========================================================

    After setting the nowdateMap, I'm able to get the date in the application, but the format is really weird, I did not use QDatetime, but the restult of shows like ' 2013-1 - 3 T 00: 00:00 ", how can I get rid of the final"T00:00:00 "? or is there a better way to get the current date?

    Thank you

    QDate nowdate is QDate::currentDate();.

    QString nowdatestring = nowdate.toString (); / / to get the date string format, you can define the shape of toString(), you can //search it
    QDeclarativePropertyMap * nowdateMap = new QDeclarativePropertyMap;
    nowdateMap-> insert ("date", QVariant (QString (nowdatestring)));
    QML-> setContextProperty ("nowdateMap", nowdateMap);

    then in the file qml, using nowdateMap.date will do.

  • Get the current Message of the new screen open message context

    When you open the application again [email] message you can use a ViewListenerExtended to get the current context of Message... but the user every interaction with the fields of composition creates a new Message object if you hold is no longer a valid reference (he gets cloned). By changes, I mean using the menu items to add/remove fields, typing in a topic, etc. Does anyone know how to get the context of new/current Message used while the demand again message is open and has been updated? MessageListener does not work for Messages being changed in the application of the new message.

    Update: the subject of the message is not be cloned, UI updates not the model.

  • How to get the current timestamp in C++ to the BB10 project

    Please help me how to get the current timestamp in C++. Thanks for your help!

    Following your suggestion,

    QTime is only for a day.  http://developer.BlackBerry.com/Cascades/reference/QTime.html#details

    I found "QDateTime" of references of the API: http://developer.blackberry.com/cascades/reference/qdatetime.html#toTime_t

    QDateTime = now QDateTime::currentDateTime();
    timestamp long = now.toTime_t ();

    But I got an error. I searched but no results are clear:

    -variable 'QDateTime now' initializer has but
    incomplete type
    -type incomplete "QDateTime" used in the nested name
    specifier of

    I am a newbie. So thank you for your help

  • How to get the current wording of the BlackBerry device with the BlackBerry App?

    Hello!

    I'm new to BlackBerry,

    Can u tell me pls, how to get the current language of the device using the program...

    PLS, suggest me...

    Locale.getDefaultForSystem () will give you the regional settings currently selected.

  • How to get the current GPS position of the BlackBerry emulator?

    Hello! all, I am writing a simple program to get the current coordinates of GPS (Latitude, Longitude) in BlackBerry.

    Criteria criteria=new Criteria();
            criteria.setHorizontalAccuracy(500);
            criteria.setVerticalAccuracy(500);
            LocationProvider locationProvider=LocationProvider.getInstance(criteria);
            Location location=locationProvider.getLocation(60);
            QualifiedCoordinates coordinates=location.getQualifiedCoordinates();
            System.out.println("Latitude : "+coordinates.getLatitude()+" Longitude : "+coordinates.getLongitude());
    

    But, I couldn't get the latitude and longitude. It returns 0 (zero) for the two coords.

    PLS, suggest me the solution.

    The 9000 Simulator has GPS simulation. In the "Simulation" of the Simulator menu, select "GPS". There is an already defined test site, you will need to select this place.

  • How can I get the current state "onto the Pixels?

    Hello community,

    Here's the function that creates a switch that handles "snap to Pixels":

    index.html:

    <div id="STP_input" onclick="switchOnOff(this)">
         ...
    </div>
    

    main.js:

    $("#STP_input").click(function () {
         var a = switchOnOff(this);
         if (a) {
              csInterface.evalScript('switchSTP(true)');
         } else {
              csInterface.evalScript('switchSTP(false)');
         }
    });
    

    HostScript.jsx:

    function switchSTP(checkBTN) {
        'use strict';
        
        var condition;
        if (checkBTN === true) {
            condition = true;
        } else {
            condition = false;
        }
    
        var idsetd = charIDToTypeID( "setd" );
        var desc26 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref6 = new ActionReference();
            var idPrpr = charIDToTypeID( "Prpr" );
            var idtoolsPreferences = stringIDToTypeID( "toolsPreferences" );
            ref6.putProperty( idPrpr, idtoolsPreferences );
            var idcapp = charIDToTypeID( "capp" );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref6.putEnumerated( idcapp, idOrdn, idTrgt );
        desc26.putReference( idnull, ref6 );
        var idT = charIDToTypeID( "T   " );
            var desc27 = new ActionDescriptor();
            var idtransformsSnapToPixels = stringIDToTypeID( "transformsSnapToPixels" );
            desc27.putBoolean( idtransformsSnapToPixels, condition );
        var idtoolsPreferences = stringIDToTypeID( "toolsPreferences" );
        desc26.putObject( idT, idtoolsPreferences, desc27 );
        executeAction( idsetd, desc26, DialogModes.NO );
    
        return;
    }
    

    But when I hide the Panel and show once again, that the switch back to the default state, turn on my Panel, not "hook to Pixels" PS settings setting. Is it possible to get the current status 'Hang the pixels' setting? How?

    Best regards.

    See post 8 in this thread:

    Re: Need someone to update or create script: "snap to grid of pixels.

  • How can I get the current paragraph?

    I want to get the current paragraph where the insertion point is.

    How can I do this in FDK?

    Ch,

    I can answer some of these questions, but if you have decided that this thread is replied, please give credit to Mike.

    About the audit for a FO_Pgf object, you shouldn't have that. I think that there is some obscure cases where F_ApiGetTextRange() gives you an object that is not a paragraph... I forgot exactly but I think it has to with a text graphic subject line or something like that. I could be wrong. In any case, if you have a stream of regular text with an insertion point, you will get a paragraph object.

    This line will abort the operation if any text is selected. Do you really want that?

    If (insertionPoint.beg.objId! = insertionPoint.end.objId)

    This line will abort the operation if several paragraphs are selected. Do you really want that? Without this verification, you will always get the text of the first selected paragraph.

    If (insertionPoint.beg.offset! = insertionPoint.end.offset)

    Otherwise, the code looks OK to me, at least regarding the FDK calls. You have problems with him?

    Russ

Maybe you are looking for