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

Generate Slices Sequence

by tprovoost / Thomas Provoost

Creates a sequence with 100 slices.

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

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



Icy script publication Id : M2U4Z3