Search in sources :

Example 1 with VirtualReader

use of loci.plugins.util.VirtualReader in project bioformats by openmicroscopy.

the class ImportProcess method initializeStack.

/**
 * Performed following ImportStep.STACK notification.
 */
private void initializeStack() throws FormatException, IOException {
    IFormatReader r = baseReader;
    if (options.isGroupFiles()) {
        r = fileStitcher = new FileStitcher(baseReader);
        // overwrite base filename with file pattern
        String id = options.getId();
        fileStitcher.setId(id);
        fileStitcher.setUsingPatternIds(true);
        fileStitcher.setCanChangePattern(false);
    }
    r.setId(options.getId());
    if (options.isGroupFiles()) {
        options.setId(fileStitcher.getFilePattern().getPattern());
    }
    final byte[][] lut8 = r.get8BitLookupTable();
    final int sizeC = r.getSizeC();
    r = channelFiller = new ChannelFiller(r);
    if (channelFiller.isFilled()) {
        BF.warn(options.isQuiet(), getIdName() + ": index values will be lost");
    }
    r = channelSeparator = new ChannelSeparator(r);
    r = dimensionSwapper = new DimensionSwapper(r);
    if (options.isAutoscale() || FormatTools.isFloatingPoint(r)) {
        r = minMaxCalculator = new MinMaxCalculator(r);
    }
    if (options.doStitchTiles()) {
        r = tileStitcher = new TileStitcher(r);
    }
    r = virtualReader = new VirtualReader(r);
    reader = new ImageProcessorReader(r);
    if (options != null && !options.showROIs()) {
        baseReader.getMetadataOptions().setMetadataLevel(MetadataLevel.NO_OVERLAYS);
    }
    setId();
    computeSeriesLabels(reader);
}
Also used : IFormatReader(loci.formats.IFormatReader) FileStitcher(loci.formats.FileStitcher) ImageProcessorReader(loci.plugins.util.ImageProcessorReader) MinMaxCalculator(loci.formats.MinMaxCalculator) DimensionSwapper(loci.formats.DimensionSwapper) TileStitcher(loci.formats.TileStitcher) ChannelFiller(loci.formats.ChannelFiller) VirtualReader(loci.plugins.util.VirtualReader) ChannelSeparator(loci.formats.ChannelSeparator)

Aggregations

ChannelFiller (loci.formats.ChannelFiller)1 ChannelSeparator (loci.formats.ChannelSeparator)1 DimensionSwapper (loci.formats.DimensionSwapper)1 FileStitcher (loci.formats.FileStitcher)1 IFormatReader (loci.formats.IFormatReader)1 MinMaxCalculator (loci.formats.MinMaxCalculator)1 TileStitcher (loci.formats.TileStitcher)1 ImageProcessorReader (loci.plugins.util.ImageProcessorReader)1 VirtualReader (loci.plugins.util.VirtualReader)1