How to get roi and line point value?
AnsweredHi,
I need your help with the following two questions.
1. I want to try to get the information of the point of the line I drew on the NX client. What method should I use? I have noticed that this method can set the point information to the client interface to see, but I have not found a way to get the point information from the interface.
-
Hi Wenbin,
Please refer to the post here https://support.networkoptix.com/hc/en-us/community/posts/26579004240663-How-to-get-roi-and-line-value and the SDK settings.md.
Thanks.
-
Hi Ichiro,
Thank you for your help.Now I can get the point information of NX client, but the method
m_secondPolygonStr = settingValue("polygon 2. Figure")
returns a string by name "polygon 2. Figure".
If I want to get the information of points, I need to intercept the string.I want to ask if there is a more convenient way to get the information of the value corresponding to each key.
-
Hi Wenbin,
In fact, you can access the plugin settings easily by creating a function that parses the JSON string from the settingValue() method. This will allow you to retrieve both the value and status (activated or not) directly, along with the coordinates of the points.
This is the most effective and recommended approach, with no need for any type of interception. You can use any JSON parser to access the required nodes.
Thanks.
-
Hi Ichiro,
Thank you for your help. I have solved this problem. I referred to nx::kit::Json and used the method of this file.
I have another question. If I want to implement this plug-in drop-down box, which cpp file should I implement this function? I haven't seen a similar example. What can I refer to.
Thanks.
Please sign in to leave a comment.
Comments
4 comments