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 : Friday, October 16, 2009 9:41:56 AM(UTC)
seinarsson

Groups: Registered
Posts: 22


I'm using LEADTOOLS C#.NET v16.5.

I have a MedicalViwer and I'm letting the user set a region through the MedicalViewerActionType.RectangleRegion action.

Once they've selected a region, I want to be able to get some of the co-ordinates from the region (top left pixel [x,y] and bottom right pixel [x,y]).

How do I access information about the region once it's been set in the MedicalViwer?

-Sarkis-
 

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 : Sunday, October 18, 2009 8:56:42 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,028

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

After drawing the region on the MedicalViewer cell, it becomes a part of the  image on that cell. One way to get the region coordinates is by calling this line:
Rectangle rc =  _medicalViewer.Cells[CellIndex].Image.GetRegionBounds(null);

After that, you can get the top, left, width and height values in the rectangle.
 
#3 Posted : Tuesday, October 20, 2009 11:29:24 AM(UTC)
seinarsson

Groups: Registered
Posts: 22


That's what I was looking for, thanks.

One more question...

I need to find the median brightness of a Region, how would I do that?

-Sarkis-
 
#4 Posted : Tuesday, October 20, 2009 11:38:10 AM(UTC)
seinarsson

Groups: Registered
Posts: 22


Sorry, another question...

How would I manually set a Region on an MedicalViewer image through code?

-Sarkis-
 
#5 Posted : Wednesday, October 21, 2009 4:18:04 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,028

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

Sarkis,
Do you want to specify a rectangle and draw it on the image by code? If yes, use the
_medicalViewer.Cells[0].Image.AddRectangleToRegion() method.
About the brightness question, please post it in a new forum thread or send it to support@leadtools.com because it is not related to the original question in this post.
 
#6 Posted : Wednesday, October 21, 2009 5:27:19 AM(UTC)
seinarsson

Groups: Registered
Posts: 22


Thanks! I'll make a new post.

-Sarkis-
 
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-2020, Yet Another Forum.NET
This page was generated in 0.131 seconds.