<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>It sounds like maybe we need to check "isEmpty()" on the box before computing the area, and return 0 for empty boxes.</div></div></blockquote><div>Yeah, I was thinking that would be part of the solution, but every aspect of the bounding box (e.g., top-left/bottom-right coordinates) is invalid when it is empty. When empty, AlignBox still populates those elements but with undefined values, and these get passed on to the Vital bounding_box, allowing the user to query lower_right() and receive undefined values. So, we should either define an empty bounding box subclass, perhaps that returns an error when you ask for lower_right() and forces the programmer to first check isEmpty(), or the intersection function should return a special value when there is no intersection.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div>By the way, I'm not a fan of having this bounding box class in KWIVER that simply wraps Eigen::AlignBox, but only exposes a subset of its functions.  I think we should just use Eigen::AlignBox and possibly some typedefs for it if we want to call it "bounding_box".  Or we could derive a subclass if we need to add some additional methods.  There is no reason to hide all the other functionality of AlignBox.  This is a separate discussion to have some time.</div></div></blockquote><div>Yes, I see your point. Would like to have this discussion some time in the near future.</div><div><br></div><div>Best,</div><div>Matt</div></div></div>