Script

Generate Sequence Time Points

Publication ID: ICY-O6J7S4

Short Description

Creates a sequence with 100 time points, name it, and add it to the GUI.

Versions

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

    initial version

    importClass(Packages.icy.sequence.Sequence)
    importClass(Packages.icy.type.DataType)
    importClass(Packages.icy.image.IcyBufferedImage)
    
    // ---------------------------------
    // CREATE A SEQUENCE WITH 100 SLICES
    // ---------------------------------
    
    // Create a new sequence
    seq = new Sequence()
    
    // Iterate from 0 to 100 time points
    for (t = 0; t < 100; t = t + 1) {
    
    	// Creates an image of 512x512 with 1 channel of type Unsigned Byte
    	img = new IcyBufferedImage(512, 512, 1, DataType.UBYTE)
    
    	// Add the image in the sequence
    	seq.addImage(t, img)
    }
    
    // set the name of the sequence
    seq.setName("Time points sequence")
    
    // add the sequence in the gui
    gui.addSequence(seq)
    

Leave a Review