/** * @param reader - An initialized {@link Reader} to use for reading image * data. * @param type - The {@link Type} T of the output {@link ImgPlus}, which must * match the typing of the {@link ImgFactory}. * @param config - {@link SCIFIOConfig} to use when opening this dataset * @return - the {@link ImgPlus} or null * @throws ImgIOException if there is a problem reading the image data. */ public <T extends RealType<T> & NativeType<T>> List<SCIFIOImgPlus<T>> openImgs(final Reader reader, final T type, SCIFIOConfig config) throws ImgIOException { if (config == null) { config = new SCIFIOConfig().imgOpenerSetComputeMinMax(true); } final ImgFactoryHeuristic heuristic = getHeuristic(config); ImgFactory<T> imgFactory; try { imgFactory = heuristic.createFactory(reader.getMetadata(), config .imgOpenerGetImgModes(), type); } catch (final IncompatibleTypeException e) { throw new ImgIOException(e); } return openImgs(reader, imgFactory, config); }
/** * @param reader - An initialized {@link Reader} to use for reading image * data. * @param type - The {@link Type} T of the output {@link ImgPlus}, which must * match the typing of the {@link ImgFactory}. * @param config - {@link SCIFIOConfig} to use when opening this dataset * @return - the {@link ImgPlus} or null * @throws ImgIOException if there is a problem reading the image data. */ public <T extends RealType<T> & NativeType<T>> List<SCIFIOImgPlus<T>> openImgs(final Reader reader, final T type, SCIFIOConfig config) throws ImgIOException { if (config == null) { config = new SCIFIOConfig().imgOpenerSetComputeMinMax(true); } final ImgFactoryHeuristic heuristic = getHeuristic(config); ImgFactory<T> imgFactory; try { imgFactory = heuristic.createFactory(reader.getMetadata(), config .imgOpenerGetImgModes(), type); } catch (final IncompatibleTypeException e) { throw new ImgIOException(e); } return openImgs(reader, imgFactory, config); }
/** * @param reader - An initialized {@link Reader} to use for reading image * data. * @param config - {@link SCIFIOConfig} to use when opening this dataset * @return - the {@link ImgPlus} or null * @throws ImgIOException if there is a problem reading the image data. */ @SuppressWarnings({ "unchecked", "rawtypes" }) public List<SCIFIOImgPlus<?>> openImgs(final Reader reader, SCIFIOConfig config) throws ImgIOException { final RealType t = getType(reader); if (config == null) { config = new SCIFIOConfig().imgOpenerSetComputeMinMax(true); } final ImgFactoryHeuristic heuristic = getHeuristic(config); ImgFactory imgFactory; try { if (t instanceof NativeType) { imgFactory = heuristic.createFactory(reader.getMetadata(), // config.imgOpenerGetImgModes(), (NativeType) t); } else return null; } catch (final IncompatibleTypeException e) { throw new ImgIOException(e); } return openImgs(reader, imgFactory, config); }
/** * @param reader - An initialized {@link Reader} to use for reading image * data. * @param config - {@link SCIFIOConfig} to use when opening this dataset * @return - the {@link ImgPlus} or null * @throws ImgIOException if there is a problem reading the image data. */ @SuppressWarnings({ "unchecked", "rawtypes" }) public List<SCIFIOImgPlus<?>> openImgs(final Reader reader, SCIFIOConfig config) throws ImgIOException { final RealType t = getType(reader); if (config == null) { config = new SCIFIOConfig().imgOpenerSetComputeMinMax(true); } final ImgFactoryHeuristic heuristic = getHeuristic(config); ImgFactory imgFactory; try { if (t instanceof NativeType) { imgFactory = heuristic.createFactory(reader.getMetadata(), // config.imgOpenerGetImgModes(), (NativeType) t); } else return null; } catch (final IncompatibleTypeException e) { throw new ImgIOException(e); } return openImgs(reader, imgFactory, config); }