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 : Tuesday, June 13, 2006 12:20:53 PM(UTC)
RocketMonkey

Groups: Registered
Posts: 4


Ok, I got the magic wand to work. I need to grab the byte array that is the region and then save that off to an object. I have tried the following

Dim test As RegionData = RasterImageViewer1.Region.GetRegionData()
test does not instantiate and the lead tools error tells me to use the new keyword
If I use the new keyword then i get the following error

Type 'System.Drawing.Drawing2D.RegionData' has no constructors.

If I use the code from the documentation as follows then I get another error.
Dim data() As Byte = RasterImageViewer1.Region.GetRegionData()
I get the following
Value of type 'System.Drawing.Drawing2D.RegionData' cannot be converted to '1-dimensional array of Byte'.

So what steps do I take to get the regiondata for this region. I see that IRasterImage.GetRegionData() uses RasterRegionXForm as a parameter but can't find in the documentation how to use this object.

If someone can point me to a sample app or where in the documentation to look I can take it from there.

Thanks, JC

 

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, June 15, 2006 3:54:36 AM(UTC)

Amin  
Amin

Groups: Manager, Tech Support
Posts: 367

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

JC,
Before I go into the details of the question, I want to make sure you're searching in the right direction.
Do you want to get the coordinates of the region, or the image contents (pixels) within the region?
I'm asking because the GetRegionData method gives you the coordinates of the region, not the bitmap contents.

Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#3 Posted : Thursday, June 15, 2006 4:11:16 AM(UTC)
RocketMonkey

Groups: Registered
Posts: 4


I need to get the coords of the region. Don't care about what is there, just the coords.

jc

 
#4 Posted : Monday, June 19, 2006 7:40:16 AM(UTC)

Amin  
Amin

Groups: Manager, Tech Support
Posts: 367

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

JC,
I think I found the problem.
You seem to be using RasterImageViewer1.Region.GetRegionData(), which is inherited from the System.Windows.Forms.Control class.

The function you need is RasterImageViewer1.Image.GetRegionData, which is the LEADTOOLS region data function.

Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
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.126 seconds.