ExecuteCmd support -
More
information
Command
|
Parameters
|
Return values
|
Comments
|
Set |
Object=ROI;Value=<polygon> |
ok,None |
Sets
the first ROI polygon. See
Copy/paste
ROIs for details. |
Set |
Object=ROI;Number=<number>;
Value=<polygon> |
ok,None |
Sets
the numbered ROI polygon. See
Copy/paste
ROIs for details. |
Add |
Object=ROI;Value=<polygon> |
ok,None |
Adds
ROI polygon to the end of the list. See
Copy/paste
ROIs for details. |
Get |
Object=ROI;Number=<number> |
ok,<polygon> |
Gets
numbered polygon, as Scorpion polygon (StrArr format). |
Get |
Object=Tuple;Number=<number> |
ok,<tuple> |
Gets
numbered polygon, as Python tuple |
Get |
Object=Blobcontour;Number=<number> |
ok,<polygon> |
Gets
numbered blob, as Scorpion polygon. 1<=number<=32.
Empty if no blob. |
Clear |
Object=ROI;Number=<number> |
ok,None |
Clears
numbered polygon (makes empty) |
DeleteAll |
- |
ok,None |
Deletes
all polygons |
Example1: # Set Dynamic ROI using the resulting Blob contour
# uses tool scripting of the blob tool finding the object contour
def afterExecute(self):
#use self.name to get this tool instance
tool=GetTool(self.name)
GetTool('b4').executeCmd('set;object=roi;value='+tool.getStringValue('Contour[1]')) # polygon defines ROI directly
#Return 1 for OK, 0 for new execution
return 1
Note: Polygons can be connected by reference in the embedded polygon editor inside Blob4
|