ROI Grid
by tprovoost / Thomas ProvoostCreates a grid of 100x100 Rectangular ROIs on a sequence.
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.roi.ROI2DRectangle) importClass(Packages.icy.sequence.Sequence) importClass(Packages.icy.image.IcyBufferedImage) importClass(Packages.java.awt.geom.Point2D) seq = getSequence() w = seq.getWidth() h = seq.getHeight() roiSize = 100 space = 100 for (x = 0; x < w; x = x + roiSize + space) { for (y = 0; y < h; y = y + roiSize + space) { topLeft = new Point2D.Double(x, y) bottomRight = new Point2D.Double(x + roiSize, y + roiSize) roi = new ROI2DRectangle(topLeft, bottomRight) seq.addROI(roi) } }
This script has no documentation. A Problem ? ask the community.
Icy script publication Id : S3W8V2