具有拆分时间步长和拆分通道的 LIF 文件的生物格式转换(宏 ImageJ)

Bio-Formats conversion of LIF file with splitted timestep and splitted channel (macro ImageJ)

我正在尝试在宏中使用 ImageJ 打开 LIF 文件(Leica 格式)。 LIF 文件包含 4 "LIF series" 个 52 或 45 个时间步长。每个时间步包含 3 个通道。

filepath = "/mydirectory/myfile.lif";
out = "/mydirectory/myTIFF/";
run("Bio-Formats Importer", "open=["+ filepath + "] color_mode=Default split_timepoints split_channels view=Hyperstack stack_order=XYCZT");
for(myt ...) { // I don't know how having all the UNIQUE timestep of all the series
    for(mych=0;mych<3;mych++) {
        saveAs("Tiff", "save=[" + out + "/myID" + "_t" + myt + "_ch" + mych + ".tif" + "]");
    }
}

我想将每个时间步长+通道保存为一个 TIFF 文件。

但是 1:我无法打开带有 "split_channels" 和 "split_timepoins" 选项的系列,导致 ImageJ 崩溃(内存不足) 2:我无法自动打开所有系列,导致 ImageJ 崩溃...而且我不知道如何逐一打开系列。 Or/and时间步长一一

你知道我如何在斐济逐个时间步打开 LIF 文件并自动保存它吗?或者我如何拆分 LIF 文件的通道和时间步长?

我找到了我需要的东西!我现在可以一个接一个地工作了。

Ext.setId(path);// Initializes the given path (filename).
Ext.getSeriesCount(seriesCount); // Gets the number of image series in the active dataset.

我必须编写代码来生成唯一的时间步长,但应该没问题。

Source