Script

Generate Slices Sequence

Publication ID: ICY-M2U4Z3

Short Description

Creates a sequence with 100 slices.

Versions

  • Version 1 • Released on: 2013-03-11 11:10:56
    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 slices
    for (z = 0; z < 100; z = z + 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(img)
    }
    // set the name of the sequence
    seq.setName("Slices sequence")
    
    // add the sequence in the gui
    gui.addSequence(seq)
    

Leave a Review