Ejemplo n.º 1
0
    private ForDeprecatedConstructors(
        final AbstractSpimData<?> spimData,
        final String windowTitle,
        final ProgressWriter progressWriter) {
      this.windowTitle = windowTitle;
      this.progressWriter = progressWriter;
      this.spimData = spimData;

      windowWidth = 800;
      windowHeight = 600;

      if (WrapBasicImgLoader.wrapImgLoaderIfNecessary(spimData)) {
        System.err.println(
            "WARNING:\nOpening <SpimData> dataset that is not suited for interactive browsing.\nConsider resaving as HDF5 for better performance.");
      }

      converterSetups = new ArrayList<ConverterSetup>();
      sources = new ArrayList<SourceAndConverter<?>>();
      initSetups(spimData, converterSetups, sources);

      final AbstractSequenceDescription<?, ?, ?> seq = spimData.getSequenceDescription();
      numTimepoints = seq.getTimePoints().size();
      cache = ((ViewerImgLoader<?, ?>) seq.getImgLoader()).getCache();

      WrapBasicImgLoader.removeWrapperIfPresent(spimData);
    }
Ejemplo n.º 2
0
  public static BigDataViewer open(
      final AbstractSpimData<?> spimData,
      final String windowTitle,
      final ProgressWriter progressWriter) {
    final int width = 800;
    final int height = 600;

    if (WrapBasicImgLoader.wrapImgLoaderIfNecessary(spimData)) {
      System.err.println(
          "WARNING:\nOpening <SpimData> dataset that is not suited for interactive browsing.\nConsider resaving as HDF5 for better performance.");
    }

    final ArrayList<ConverterSetup> converterSetups = new ArrayList<ConverterSetup>();
    final ArrayList<SourceAndConverter<?>> sources = new ArrayList<SourceAndConverter<?>>();
    initSetups(spimData, converterSetups, sources);

    final AbstractSequenceDescription<?, ?, ?> seq = spimData.getSequenceDescription();
    final int numTimepoints = seq.getTimePoints().size();
    final Cache cache = ((ViewerImgLoader<?, ?>) seq.getImgLoader()).getCache();

    final BigDataViewer bdv =
        new BigDataViewer(
            converterSetups,
            sources,
            spimData,
            numTimepoints,
            cache,
            windowTitle,
            width,
            height,
            progressWriter);

    WrapBasicImgLoader.removeWrapperIfPresent(spimData);

    bdv.viewerFrame.setVisible(true);
    InitializeViewerState.initTransform(bdv.viewer);
    return bdv;
  }