Exemplo n.º 1
0
  static ImagePlotInfo[] makeAllNoBand(
      String workingCtxStr, PlotState stateAry[], FileReadInfo[] readAry, ZoomChoice zoomChoice)
      throws FailedRequestException, FitsException, GeomException, IOException {
    // never use this method with three color plots

    ImagePlotInfo piAry[] = new ImagePlotInfo[readAry.length];
    FileReadInfo readInfo;
    Map<Band, WebFitsData> wfDataMap = new LinkedHashMap<Band, WebFitsData>(5);
    for (int i = 0; (i < readAry.length); i++) {
      readInfo = readAry[i];
      WebPlotRequest req = stateAry[i].getPrimaryWebPlotRequest();
      if (readAry.length > 3) {
        PlotServUtils.updateProgress(
            req,
            ProgressStat.PType.CREATING,
            PlotServUtils.CREATING_MSG + ": " + (i + 1) + " of " + readAry.length);
      } else {
        PlotServUtils.updateProgress(req, ProgressStat.PType.CREATING, PlotServUtils.CREATING_MSG);
      }
      ActiveFitsReadGroup frGroup = new ActiveFitsReadGroup();
      frGroup.setFitsRead(readInfo.getBand(), readInfo.getFitsRead());
      ImagePlot plot =
          createImagePlot(
              stateAry[i],
              frGroup,
              readInfo.getBand(),
              readInfo.getDataDesc(),
              zoomChoice,
              readAry.length > 1);
      WebFitsData wfData =
          makeWebFitsData(plot, frGroup, readInfo.getBand(), readInfo.getOriginalFile());
      wfDataMap.put(Band.NO_BAND, wfData);
      Map<Band, ModFileWriter> fileWriterMap = new LinkedHashMap<Band, ModFileWriter>(1);
      if (readInfo.getModFileWriter() != null)
        fileWriterMap.put(Band.NO_BAND, readInfo.getModFileWriter());
      piAry[i] =
          new ImagePlotInfo(
              stateAry[i], plot, frGroup, readInfo.getDataDesc(), wfDataMap, fileWriterMap);
      VisContext.shouldContinue(workingCtxStr);
    }

    return piAry;
  }