loading
 
Multiple Geometric Statistics module
Nemanya Sedoglavich from United States  [14 posts]
10 year
Hi,

I am trying to perform two sets of geometric analyses in the same pipeline, but am not sure how to grab data from them individually without the second Geometric_Statistics module overwriting the data from the previous module.

Here's is  an example of the flow:
...
filter1
Geometric_Statistics
...
...
filter2
Geometric_Statistics

Is there a way to grab data, using C API, from both modules?

Thanks,
Nemanya
Steven Gentner from United States  [1446 posts] 10 year
Nemanya,

You can add the Set_Variable module inbetween the two geo modules and rename the variables you need to something else. The Set_Variable module can be used to rename a variable by assigning it to a new variable. It understands arrays so that should work.

The using the API you would query for both variables (the one geo generates and the one you created just after the first geo call).

STeven.
Anonymous 9 year
Thanks STeven,

I just tried it, but could not read the new variables from the API. Using Watch Variables I can see the new array generated and updating, but for some reason cannot pull it using API.

Not sure what I'm missing. Do you have any idea of what I should try.

Nemanya
Nemanya Sedoglavich from United States  [14 posts] 9 year
Here the only difference I make is to rename "blob_tracking_capsule" and "feret_capsule" and yet cannot get the new variables .

Statement 1 works:
    if (rr.getVariables("BLOB_TRACKING, CIRCULARITY_3, EQUIV_DIAMETER, FERET, FERET_ASPECT_RATIO, MAX_INTENSITY", results, 1388, 6)!=6)
    ...

Statement 2 doesn't work:
    if (rr.getVariables("blob_tracking_capsule, CIRCULARITY_3, EQUIV_DIAMETER, feret_capsule, FERET_ASPECT_RATIO, MAX_INTENSITY", results, 1388, 6)!=6)
    {
        printf("Error in GetVariables, did not return 6 results");
        getchar();
        exit(-1);
    }

In the RR program I use Set_Variable to set the new variables. Effectively: blob_tracking_capsule = [BLOB_TRACKING]; is array
feret_capsule = [Feret]; is array

What could be preventing me from reading the new values?

Nemanya
Steven Gentner from United States  [1446 posts] 9 year
Nemanya,

It looks like it was just a bit more information that the GetVariable function was meant to support. First the buffer capacity of the variable names was set to 100 which truncated the variable names. Then the receive buffer was just not large enough to get all the data base.

We've updated and uploaded a new API.zip which you should update on your site (specifically the RR_API.h and RR_API.cpp files) which have the fixes mentioned above.

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index