Script

Access Sequence Dimensions

Publication ID: ICY-P8D2G5

Short Description

Access sequence width / height / channels / slices / time points.

Versions

  • Version 1 • Released on: 2013-03-08 17:25:28
    Download
    Description:

    initial version

    // Get the focused Sequence
    seq = getSequence()
    
    if (seq == null) throw "Please open a sequence first."
    
    // Number of channels in the sequence
    sizeC = seq.getSizeC()
    
    // Number of slices
    sizeZ = seq.getSizeZ()
    
    // Number of time points
    sizeT = seq.getSizeT()
    
    // Width of the sequence. All images have the same size.
    w = seq.getWidth() // equivalent to seq.getSizeX()
    
    // Height of the sequence. All images have the same size.
    h = seq.getHeight() // equivalent to seq.getSizeZ()
    
    // type of the sequence
    type = seq.getDataType_()
    
    println(seq.getName() + " has the following dimensions: " +
    	w + " x " +
    	h + " x " + 
    	sizeC + " x " + 
    	sizeZ + " x " + 
    	sizeT + " of type: " + type.toLongString())
    

Leave a Review