use of loci.formats.in.PrairieMetadata.Sequence in project bioformats by openmicroscopy.
the class PrairieReader method getSeriesUsedFiles.
@Override
public String[] getSeriesUsedFiles(boolean noPixels) {
FormatTools.assertId(currentId, true, 1);
if (singleTiffMode)
return tiff.getSeriesUsedFiles(noPixels);
// add metadata files to the used files list
final ArrayList<String> usedFiles = new ArrayList<String>();
if (xmlFile != null)
usedFiles.add(xmlFile.getAbsolutePath());
if (cfgFile != null)
usedFiles.add(cfgFile.getAbsolutePath());
if (envFile != null)
usedFiles.add(envFile.getAbsolutePath());
if (!noPixels) {
// add TIFF files to the used files list
final int s = getSeries();
for (int t = 0; t < getSizeT(); t++) {
final Sequence sequence = sequence(t, s);
for (int z = 0; z < getSizeZ(); z++) {
final int index = frameIndex(sequence, z, t, s);
final Frame frame = sequence.getFrame(index);
if (frame == null) {
warnFrame(sequence, index);
continue;
}
for (int c = 0; c < getSizeC(); c++) {
final int channel = channels[c];
final PFile file = frame.getFile(channel);
if (file == null) {
warnFile(sequence, index, channel);
continue;
}
final String filename = file.getFilename();
if (filename == null) {
warnFilename(sequence, index, channel);
continue;
}
usedFiles.add(getPath(file));
}
}
}
}
return usedFiles.toArray(new String[usedFiles.size()]);
}
Aggregations