Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

get_frame() and get_plane() give different results when specifying a channel other than c=0 #60

@zindy

Description

@zindy

Hello,

Could you kindly explain the difference between get_frame() and get_plane()? And moving forward, which one are you going to keep?

I'm asking because on one of my confocal stacks, lif_image.get_frame(z=60, c=1) returns the right plane and channel image, whereas lif_image.get_plane(requested_dims={3:70}, c=1) returns an image for channel 0, no matter which value I pass to c in get_plane()

My image shows this metadata in FIJI:

Name value
BitsPerPixel 16
DimensionOrder XYCZT
IsInterleaved false
IsRGB false
LittleEndian true
PixelType uint16
Series 0 Name ctrl 1
SizeC 2
SizeT 1
SizeX 2048
SizeY 2048
SizeZ 140

So, I came-up with my own as_array() which I saw is very similar to the one @haesleinhuepf wrote in #42

def as_array(lif_image, t=0, c=0, m=0):
    """Returns a LifImage as a numpy array for a given time-point, channel and mosaic image."""

    frames = [lif_image.get_frame(z,t,c,m) for z in range(lif_image.dims.z)]
    return np.asarray(frames)

Cheers,
Egor

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions