create masks for marked particles

Hello world

I'm trying to creat masks for each marked by IMAQ label.vi particles. I did use IMAQ labeltoroi, get the return on investment for each particle, and do IMAQ roitomask 2. However, the images of these masks are related images. Do you know how creat masks in the coordination of the original image?

Best,

Doogie

I think that the lable particle simply sets the value of each BLOB in a class to an integer it is IE 1,2,3,4 for 4 groups, (I have LV here right now so it's memory).  You can just itterate through the lable values and use the image to compare or beach threshold function to make masks where you keep the pixels that are equal to this value.  What will a new image with only the PIX = 1 where the value is equal to the value labled, it will have the same size and shape as the original image of lable.

Tags: NI Software

Similar Questions

  • create masks at all levels

    Hi all

    I have a problem that I can't solve

    I looked in the forum but have not found answers

    the problem is the following:

    I have a lot of with layered psd files

    I would add to all these levels a white mask

    and if a certain level is already present are not to the update

    you think you can do?

    Thank you

    As c.pfaffenbichler says your caller layers Adjusment as levels, in any case, I understand what you now, the script I posted can be easily modified to put on a mask for all adjustment layers, but I won't... I see this forum as a forum for people who want to learn and not as a forum where people just asked some scripts. That's why I took the time to explain as I understand what makes each line of the script I posted it... Others are more than welcome to complete the description if I did not explain well... I know that there are people with experience of many here since I learned a lot, and for that I am eternally grateful. Here is the script with comments for almost every line:

    app.activeDocument.suspendHistory("BCM_aMaskForEveryLevels", "main()");//this line just creates one step in the history named BCM_aMaskForEveryLevels
    function main(){// the main function
      var currentSlections = getSelectedLayersIds();// store in a variable the selected layers so at the end of the script they could be reselected
      // in the next 5 lines I am founding the number of the layers in the document
      // with AM scripting layers doesn't have parents and childrens, and they have certain attributes that can be read in order to find out what kind of a layers they are
      // the advantage of using AM in looping throw layers it's the fact that it's fast and you don't have to select the layer in order to find something about it
      var ref0 = new ActionReference();//an action reference
      ref0.putProperty( charIDToTypeID( 'Prpr' ), stringIDToTypeID('numberOfLayers') );// define one property for the reference in order to look only for that property later,
      // without this upper line the resulting descriptor will be filled with a lot of information and if you have a lot of layers in the document this step could take a few seconds
      ref0.putEnumerated( charIDToTypeID( "Dcmn" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );// here the refence will be for the selected document, usualy when you use an putEnumerated you are getting the selected object
      var desc0 = executeActionGet(ref0);//get's the descriptor for the reference
      var i = desc0.getInteger(stringIDToTypeID('numberOfLayers'));// find the number of the layers in the document and put it to the variable i
    
      var idWithMask = null;// this is a variable that will be used later in the script
      for(i; i > 0 ; i--){//start the loop, at the start of the loop i is equal with the number of layers in the document, and with each itteration it's substracting 1 from i until, i will get to 0, then the loop will stop
        ref = new ActionReference();// create a new reference
        ref.putIndex( charIDToTypeID( 'Lyr ' ), i );// the index it's the position of the layer in the layer pallete, so here the script it's referenceing with each itteration of the loop each layer without selecting it
        var desc = executeActionGet(ref);//get the descriptor of the referenced layer
        var layerName = desc.getString(charIDToTypeID( 'Nm  ' )); //this is how you get the name of the referenced layer
        var Id = desc.getInteger(stringIDToTypeID( 'layerID' ));//this is how you get the id of the referenced layer, the id's are unique and they doesn't change
        var ls = desc.getEnumerationValue(stringIDToTypeID("layerSection"));// this is how you can see if the referenced layer it's a group or not
        ls = typeIDToStringID(ls);// There are 3 values that the layerSection can return: "layerSectionStart", "layerSectionContent", "layerSectionEnd"
        // with AM you have a group like this:
        //   ---- "layerSectionStart" -represented in the layer palette as the folder
        //        "layerSectionContent" - any layer that's inside the group or outside the group
        //        "layerSectionEnd" - you can't see this layer in the layer palette, but when you find one it means that it's the end of some group, and all the previous layers where inside that group.
    
        var vis = desc.getInteger(stringIDToTypeID( 'visible' ));//how you get the visibility of of the referenced layer
    
        if(isAdjusmentLayerLevelsByID(Id) == true){//if it's an levels layer.... go to the decalartion of the function to see what it's doing
          if(hasMaskByID(Id) == false){//if it doesn't has a mask, ...go to the decalartion of the function to see what it is doing
            if(idWithMask == null){//when the script finds the first levels layer that doesn't have a mask, it will select it and create a mask for it
              multiSelectByIDs(Id);//select the layer by it's id
              makeFirstMask();//make a mask, this function it's just copied from the scriptListenerLog
              idWithMask = Id;// change the variable so now it will have the value of the id with the first white mask,
              // I've done these 3 previous lines because I couldn't found a way to create a white mask by referencing the layer id, the only way it worked was just to create it by selecting it and record the creation of the mask
              // also I'm storing the id of the first layer with the white mask because I want to duplicate the mask when finding other levels layers, this will make the script faster and it won't need to select the layer
            }else{//duplicate from the first created mask
              duplicateMaskByID(idWithMask, Id);//I'm duplicating the white mask from the first layer, to the referenced layer that we know it's a levels layer because it's in the if
            }
          }
        }
      }
      multiSelectByIDs(currentSlections);// now the loop was finished, all the script needs to do is to select back the layers that where selected before satrting the script
    }
    function doesIdExists( id ){//this function test to see if the id exists
      var res = true;// the returning variable
      var ref = new ActionReference();// create an reference
      ref.putIdentifier(charIDToTypeID('Lyr '), id);// reference a layer by it's id
        try{var desc = executeActionGet(ref)}catch(err){res = false};// if the layer doesn't exists it should give an error, when tring to get the descriptor for it, that's why I've put this in a try and catch
        return res;// the returned value
    }
    function multiSelectByIDs(ids) { //this function select more than one layer by id's
      if( ids.constructor != Array ) ids = [ ids ];//if the input it's not an array make an array with that single id
        var layers = new Array();//create an empty array
        var desc12 = new ActionDescriptor();// create a descriptor
        var ref9 = new ActionReference();//create a reference
        for (var i = 0; i < ids.length; i++) {// for each id in the input array
          if(doesIdExists(ids[i]) == true){// check to see if the id still exists
              layers[i] = charIDToTypeID( "Lyr " );//append a layer class to the layers array
              ref9.putIdentifier(layers[i], ids[i]);//reference each layer by the id
          }
        }
        desc12.putReference( charIDToTypeID( "null" ), ref9 );//put the reference to the descriptor
        executeAction( charIDToTypeID( "slct" ), desc12, DialogModes.NO );//this executes the select action by using the descriptor that reference the layers by id
    }
    
    function getSelectedLayersIds(){// this function get's the selected layers id's
      var idxs = getSelectedLayersIdx();// first it get's the indexes because in CS4 to CS6 there is no way to get the id's of the selected layers, only the indexes
      var selectedLayersIds = [];//create an empty Array that willbe the returned array
      for( var i=0;i		   
  • 'Create masks from text' in turn computer black screen

    I imported a ttf font in font book, then in the after effects CC and when I do the function 'create masks from text' using this text, the computer window becomes black and I am unable to read anything. The function still works with the indigenous texts well. Any ideas?

    Thanks a lot for your help. I finally thought to it. After having tried everything you said and more, I feel a little ridiculous. All I ended up having to do was to change the font type breathe I used one in distress to the solid. Works fine now. Thanks again!

  • With the help of Mocha in After Effects to make masks for the classification in Speedgrade

    I just discovered that there is a plugin that comes with AfterEffects CC called "Mocha", it's a track quite powerful tool of creation. And... it can be used to create masks which SpeedGrade can then rank, even masks of caterpillars that currently Sg may be uneven with.

    If I understand correctly the basic procedure is to create an adjustment in PrPro layer, then create a new computer with one more in Ae, create and apply a Mocha "form", including any order tracking, then going back to PrPro and through her link Direct to the Sg, and then we can rank a mask of sections of key that will work as expected. I am that noting on the forum just as something for the people, and of course... any that with all the experience in the use of masks in Mocha is MORE than welcome jump in and ' splain us!

    Neil

    Well, of course, it's a... little more complicated than that. You cannot use the freebie Mocha plugin, you must buy the stand-alone for $95 or more, then use it to make a shape... and learn how to use this program as well. So... some extra expenses, some additional necessary training, but... then we can get the caterpillars & complex masks which can be classified in Sg.

    Neil

  • Create Source for Interface - using API

    You will need to create source for newly created using API interface.

    Tried it with code, get below error below

    During the synchronization of a new object was found through a relationship that was not marked cascade PERSIST:

    Please help on this, thanks.

    Here is my code component,


    The list of ds < DataSet > = next_intr.getDataSets ();
    < DataSet > iterator itr = ds.iterator ();
    DataSet ds_nxt1 = itr.next ();
    String ds_name = ds_nxt1.getName ();
    If (ds_name.equalsIgnoreCase (ds_nxt. GetName()))
    {
    Collection < SourceDataStore > ds_sources = ds_nxt.getSourceDataStores ();
    ds_nxt1.addSourceDataStore (ds_sources. Iterator(). Next());
    }

    http://odiexperts.com/creating-permanent-interface-based-on-model-level-2/

    http://odiexperts.com/creating-interface-for-single-source-and-target/

  • Use a text/shape as one mask for another layer Layer

    Hello!

    I can't understand how I can use a text layer or a shape as a mask for the layer below.

    See the attached example and you'll know what I mean. (I created the example with simply by cutting the outline of the text in the white box).

    I need a text mask and I need to be editable as text. Don't know if this is possible, experienced with clipping masks, but I can't get it to work.

    Thank you!

    cutouttext.png

  • Moving objects in the form of XFA, buttons for marking up a question of sample swot analysis.

    u

    I used the code from the objects moving in XFA form, buttons for marking up a swot analysis, to be more precise. I created my own example of form and it works fine, but only if my Master Page Orientation is set to landscape. What Miss me? Is it possible that it only works for Landscape Orientation?

    Thank you!

    Hello

    If you have a look at the script, you will see that from the beginning I'm determination of the dimensions of the button/marker and then halve it.

    var markerDim = xfa.layout.w (marker1) / 2;

    marker1 is the name of the object that contains the script above. Therefore, the script in each button is slightly different.

    I then use this dimension to the center of the button when the cursor is located. Just look at when I use the markerDim variable in the script.

    Hope this helps,

    Niall

  • How to create a service mark in Dreamweaver?

    I need to create a service mark in Dreamweaver. I checked on the basis of knowledge and character cards I could find only to copyrights, TM and trade-mark.

    If it is not a keyboard shortcut, how do you create in Dreamweaver? I tried the tag < sup >, which is used for the aforementioned characters.

    Any suggestions? Advice? Tips? :^))

    I think that you might forget the closing tag. It should look like this: SM

  • How to create folders for my received emails iCloud on an iPad?

    How to create folders for received emails on an iPad Air iCloud?

    In the mailbox display, press the "Edit" button, then "New mailbox", type a name, choose a location and then "Save".

  • iOS 9.2 causing lag in Logitech Create keyboard for iPad Pro

    iOS 9.2 has considerably weakened the Logitech Create keyboard for iPad Pro performance. He had been immediately sensitive - one of the best features that the combo made feel like a laptop. With 9.2 key strokes are interrupted at left and right, and there is a noticeable shift in the key that appears on the screen. Very, very frustrating. I seen it referred to in this thread:

    Re: Pro iPad smart keyboard shortcuts stop working

    And I saw a mention on Twitter too. What is going on? Did someone talked with Logitech?

    I'm having the same problem. After that 9.2 updated Logitech Keyboard create on my iPad Pro is essentially unusable because I'll have to go back and difficulty both dropped by strikes, rearranged, letters, etc. There is also a noticeable delay when I type when the characters appear on the screen where before it was instant. Must be something software related because it was just after the 9.2 update he started to arrive.

  • A way to create folders for custom message for e-mail on the Touchpad POP account?

    Is there a way to create folders for POP e-mail on the touchpad accounts? I can't work with each message limited to my Inbox or in the trash!

    Yes, aggravating circumstances.  But it is not possible AFAIK.  There may be a solution of homebrew, but I didn't go down the road of homebrew.

  • DAQmx (Version 9.1) Create Channel for accelerometer will NOT convert m/s ^ 2

    I use DAQmx create channels for accelerometer to get results in the unit (m/s ^ 2)

    It worked until DAQmx Version 8.9.

    Now, I tested it with DAQmxVersion 9.1 and the results are in g (not converted to m/s ^ 2!)

    I use wth .vi DAQmx Create Channel (I-acceleration-accelerometer) entries

    units = m/s ^ 2

    sensitivity units = V/g (there is no sensitivity unit V /(m/s^2) available)

    sensitivity sensitivity value in V/g =

    I have read the data with

    . VI DAQmx reading (analog 2D DBL NChan NSamp)

    In DAQmx<= 8.9="" the="" double="" numbers="" are ="" correct="" converted="" to="">

    but in DAQmx 9.1 not (values are in g and low by 9.81)

    My solution is the following change

    units = g

    sensitivity units = V/g

    sensitivity = sensitivity value in V /(m/s^2)

    Then the double numbers are not converted, but m/s ^ 2.

    And this work in all versions of DAQmx.

    The problem is:

    An older program that uses the settings of the first and tested with DAQmx<=8.9 will="" get="" wrong="" measurement="" result="" with="" daqmx="" 9.1="" and="" no="" error="">

    Peter

    Hi Peter,.

    I'm not in my office at the moment and I can't try it by myself, I have forwarded your request to one of my colleagues, I hope he will contact you soon.

    Sorry for the delay,

    Tobias

    The language of MAX settings depend on the regional settings of your Windows operating system. See the following page:

    http://digital.NI.com/public.nsf/allkb/9893C1767C93D20E86256F49001CDA92

    Kind regards

    Tobias

  • buold a mask for a waveform

    Hi all

    I have to build a mask for a signal and check if the actual signal remains in my mask range...

    How can I build it?

    for example: as I entered a 2V square wave + 2V, f is 1 KHz

    My range of +/-0, 2V

    Obviously I wish that labview could ride my waveforms and check if the real, one stay in the other two.

    The limits are bound by some time, but in practice, you must set the limits according to whatever your unique purchase. You can of course apply each acquiring signals repeated up to the limit.

    The limits and the waveform is aligned defining t0 of each are the same.

  • failed to create value for the message Analyzer "at line 54.

    I get the following error, can someone please?

    failed to create value for the message Analyzer "at line 54.

    Hi ejpeppjep,

    Check if this article helps you fix the problem: http://support.microsoft.com/kb/823768

    If the problem persists, we recommend that you try the following steps and check the result.
    Step 1: a. Click Start, click Run, type cmd and click ok.
    b. at the command prompt, type sfc/scannow and press ENTER.
    c. once the analysis is complete, restart the computer and check if the problem persists.

    Note: You will be asked to insert the Windows XP disk, if a file is missing.

    For more information, see Description of Windows XP System File Checker (Sfc.exe)

    Step 2: If the problem persists, restore the computer to an earlier time
    see How to restore Windows XP to a previous state .

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Why creates shortcuts for Moving files when drag and drop the folder or file in another folder?

    I am using Windows XP SP3, just before I drag and drop the file into another folder in my windows explore. Suddenly, he is creating shortcuts for moving file. I'm not able to move the file by drag / move the mouse, it is possible that by cutting and Paste(Ctrl+X) using the keyboard. Why?

    Maybe your 'Alt' key is stuck.
    See exchanging the keyboard with another makes all the difference.

    HTH,
    JW

Maybe you are looking for