CODE to determine whether a MEASUREMENT OBJECT is completely (or partially) within an ROI?
2019-03-27-135924
All --
Lets say there are two RECTANGULAR ROIs within an IMAGE and 10 CIRCULAR MEASUREMENT OBJECTS in the SAME IMAGE. The MEASUREMENT OBJECTS were not generated with a COUNT and are not necessarily inside or outside of the ROIS.
Is there a way for CODE to SELECT the MEASUREMENT OBJECTS that are completely (or maybe partially) within one of the ROIs or perhaps completely (or maybe partially outside all of the ROIS?
I can do this with MASKS but it will be a multi-step process and it will be clunky. I am hoping there is some kind of comparison function that will do this efficiently.
Thanks in advance.
0
Best Answers
-
Hi Matt,
Yes, it can be done, but you should use measurement objects, not ROIs.
Here are the steps:
1. Create your RECTANGULAR objects as measurements of Class 1 (you can convert them from ROIs using Features Manager).
2. Activate Class 2
3. Add 10 CIRCULAR MEASUREMENT OBJECTS.
4. Use "Parent" measure to get parents of circles. The circle, which CENTER is within a rectangle will have Parent, circles outside - no parent.
Yuri0 -
Matt,
Image-Pro has other ways to filter out existing measurement objects. For example, you can set and Apply Filter in Data Histogram.
Yuri0
Answers
-
2019-03-28-090819Yuri --Thank you for your guidance on this.I created an EXAMPLE IMAGE similar to yours and asked IP to extract all the CLASS and PARENTAL INFO and everything went well.From this I gather that the PARENT / CHILD RELATIONSHIP is based on where the CENTER of the possible CHILD OBJECT lies.It also looks like combining PARENT and NESTING DEPTH can be used to determine whether an object is COMPLETE CHILD or a PARTIAL CHILDI did notice something though . . .When I opened the EDIT RANGE TOOL to play with FILTERING OUT the ORPHANS, all of the OBJECTS disappeared.Closing the EDIT RANGE TOOL brings the objects back but I see this.that may be relatedI can CODE something that will eliminate ORPHAN OBJECTS but I think this is an issue within IP. It seems that the only time the FILTER RANGE can be used from the USER INTERFACE is when the OBJECTS are generated by a COUNT. When OBJECTS are generated MANUALLY, via the FEATURE MANGER, or via the MEASUREMENT TABLE, it seems they cannot be FILTERED.Thanks again for your guidance on this.-- Matt0
-
Hi Matt,
Regarding Edit Range: when you open it it tries to apply current segmentation method to the image. If you created all your objects manually, it may have unpredictable results. In short: Filter Range is used only for automatically segmented objects, and it cannot not be used with manually drawn features, as you have also pointed out.
Yuri0 -
2019-03-28-105946Yuri --Thank you for the info on EDIT RANGE.I would think that the value of the EDIT RANGE would be increased if would work on MANUALLY CREATED OBJECTS or OBJECTS generated by the FEATURE MANAGER or IQM FILES.Thanks again.-- Matt0
-
2019-03-29-094810Yuri --Thanks for the reminder about that tool.I'll look into applying it to this situation.Thanks again.-- Matt
0
Categories
- All Categories
- 961 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 18 Image-Pro Download & Install
- 448 Image-Pro General Discussions
- 486 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 195 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 106 Image-Pro Plus General Discussions
- 86 Image-Pro Plus Automation with Macros
- 19 Legacy Products
- 16 Image-Pro Premier 3D General Discussions
- 26 Image-Pro Insight General Discussions