Short Description

Creates a grid of 100x100 Rectangular ROIs on a sequence.

Versions

  • Version 1 • Released on: 2013-03-11 11:58:18
    Download
    Description:

    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)
    	}
    
    }

Leave a Review