Author |
Topic  |
|
tinkusch
Germany
94 Posts |
Posted - 05/29/2002 : 04:52:18 AM
|
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
|
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 |
 |
|
easwar
USA
1965 Posts |
Posted - 05/29/2002 : 3:31:35 PM
|
Hi Stefan,
The code segment in the previous post from Yuri will work on ver 7 with SR1 patch.
Easwar OriginLab.
|
 |
|
Mike Buess
USA
3037 Posts |
Posted - 03/14/2003 : 9:33:08 PM
|
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 |
 |
|
|
Topic  |
|
|
|