Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, September 19, 2007 12:23:05 PM(UTC)

Ed S  
Ed S

Groups: Registered
Posts: 9


Hi All,

I'm converting some annotations from LT annotation format to another imaging toolkit annotation format. I'm using LT .NET v14.5. For most of the annotations, I don't have any problems, but I ran across this one where the bounds are outside the dimensions of the image - (BoundingRectangle.X is negative, Width is greater than the image width). What does this mean?

If I use Math.Min and Math.Max to truncate the values so they are within the bounds of the image and then compare the image in the two systems, LT still has the redaction correct (of course, since it wasn't changed), but the other imaging system shows the redaction rotated 90 degrees.

How do I interpret the redaction bounding rectangle that is outside the bounds of the image? Also, and this is most likely related, why is the redaction rotated?

Thanks in advance,
Ed S.
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, September 20, 2007 6:23:01 AM(UTC)

Ed S  
Ed S

Groups: Registered
Posts: 9


Ok, I used InvalidRectangle instead of BoundingRectangle, and it looks as if that is working correctly.

Can anyone tell me the difference between BoundingRectangle and InvalidRectangle and why BoundingRectangle can sometimes be negative?

Thanks,
--Ed S.
 
#3 Posted : Friday, September 21, 2007 6:34:15 AM(UTC)

jigar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Hello,

BoundingRectangle is the logical rectangle for the AnnObject.  It's the rectangle before any transformations are applied to it.  You are allowed to change to it.  The InvalidRectangle is physical bounding rectangle.  It's a read-only property to get the location of the AnnObject after the transformations have been applied.  The invalid rectangle is also used to calculate the invalid region that needs to be repainted in the container.  You can find much more information in the .NET documentation.  Search for BoundingRectangle and InvalidRectangle, and scroll down to the bottom and read the Remarks section.  It will give you specifics of what's considered invalid or bounding.

BoundingRectangle can be negative if there are translations in the transformation matrix.  So if the transfrom matrix says move the object 1000px to the right and 1000px down, then your X and Y can be -500, -500.  When the transformation is applied they will be 500, 500.  You can find more information about the transformation matrix here: http://www.codeproject.c...atrix_transformation.asp
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.059 seconds.