The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 ROI
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

tinkusch

Germany
94 Posts

Posted - 05/29/2002 :  04:52:18 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,

I would like to use the ROI rectangle tool in order to change values of a selected region of a matrix image. How can I access/change/control the respective variables (i1,j1, i2,j2, x1, y1, x2, y2, dx, dy) and their values? Is it at all possible in Labtalk and Origin-C? I have not found any sufficient hint in the help files. Thanks for help.

Stefan

yuivanov

USA
11 Posts

Posted - 05/29/2002 :  1:54:42 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Stefan
Currently OriginC access to ROI is "unpublished feature" which means it was implemented for internal Origin purposes and will likely be modified.
However you can use function
GetRegionPoints which is member function of GraphObject
Here is short example:

void GetPoints()
{
ROIObject ROI;
ROI = GetROI();
if( ROI.IsValid() )
{
vector vValue;
vector vI;
vector vJ;
ROI.GetRegionPoints(vValue, vI, vJ);//this function requires ROI to be in matrix layer
}
}

after GetRegionPoints is executed you have three vectors
each of them has size equal to number of matrix points inside ROI
vI and vJ contain indices of points
vValue contains values.

Be advised that support for ROI is still under developement and modifications are possible in future releases.
Thanks
Yuri
Go to Top of Page

easwar

USA
1965 Posts

Posted - 05/29/2002 :  3:31:35 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Stefan,

The code segment in the previous post from Yuri will work on ver 7 with SR1 patch.

Easwar
OriginLab.
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 03/14/2003 :  9:33:08 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
What's the current status of the ROIObject? Yuri's code segment does not compile in Origin 7 SR3...

:Error, Member function ROIObject::GetRegionPoints not defined or does not have matching prototype.

...Turns out the code segment compiles fine with these changes:

vector vI -> vector<int> vI
vector vJ -> vector<int> vJ

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 03/16/2003 08:26:21 AM
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000