Need help or advice ? Come to the Icy club ! - Every Wenesday morning from 9h30 to 12h30 - Francois Jacob Building - Main hall - Pasteur
Register

Generate Rectangular ROI

by tprovoost / Thomas Provoost

Generates a rectangular ROI and add it to the current sequence. Shows the use of points in scripting: Point2D.

version 1 (last version):

download to use and modify in Icy. How do I use scripts ? A Problem ? ask the community.
Changelog for this version: initial version
importClass(Packages.icy.sequence.Sequence)
importClass(Packages.icy.roi.ROI2DRectangle)
importClass(Packages.java.awt.geom.Point2D)

seq = getSequence()
if (seq == null) throw "No sequence opened"

// creates anchor points for the Rectangle.
topLeft = new Point2D.Double(100, 100)
bottomRight = new Point2D.Double(200, 200)

// create an ROI from (100,100) to (200,200)
roi = new ROI2DRectangle(topLeft, bottomRight)

// add the ROI to the sequence
seq.addROI(roi)

This script has no documentation. A Problem ? ask the community.



Icy script publication Id : M5A6X5