Short Description

Extracts channel 0 and 2 from a sequence and combine them.

Versions

  • Version 1 • Released on: 2013-03-08 17:30:19
    Download
    Description:

    initial version

    /*
     * This script extracts the channel 0 and 2 of a colored image
     */
    importClass(Packages.icy.type.DataType)
    importClass(Packages.icy.image.IcyBufferedImage)
    importClass(Packages.icy.sequence.Sequence)
    importClass(Packages.icy.sequence.SequenceUtil)
    
    // get sequence
    seq = getSequence()
    if (seq == null) throw "Please open a sequence first"
    
    // extract channels
    seq0 = SequenceUtil.extractChannel(seq, 0)
    seq2 = SequenceUtil.extractChannel(seq, 2)
    
    // combine both channels. When combining, it is necessary to 
    // ALWAYS have the same dimensions.
    merged = SequenceUtil.concatC([seq0, seq2])
    
    // add the sequence
    gui.addSequence(merged)
    

Leave a Review