public LoadSeries(Series<?> dicomSeries, DicomModel dicomModel, JProgressBar progressBar, int concurrentDownloads, boolean writeInCache) { super(Messages.getString("DicomExplorer.loading"), writeInCache, true); //$NON-NLS-1$ if (dicomModel == null || dicomSeries == null || progressBar == null) { throw new IllegalArgumentException("null parameters"); //$NON-NLS-1$ } this.dicomModel = dicomModel; this.dicomSeries = dicomSeries; this.seriesInstanceList = Optional.ofNullable((SeriesInstanceList) dicomSeries.getTagValue(TagW.WadoInstanceReferenceList)) .orElseGet(SeriesInstanceList::new); this.progressBar = progressBar; this.writeInCache = writeInCache; this.dicomSeries.setSeriesLoader(this); this.concurrentDownloads = concurrentDownloads; }
@Override public boolean stop() { if (!isDone()) { boolean val = cancel(); dicomSeries.setSeriesLoader(this); return val; } return true; }
public LoadSeries(Series<?> dicomSeries, DicomModel dicomModel, int concurrentDownloads, boolean writeInCache) { super(Messages.getString("DicomExplorer.loading"), writeInCache, true); //$NON-NLS-1$ if (dicomModel == null || dicomSeries == null) { throw new IllegalArgumentException("null parameters"); //$NON-NLS-1$ } this.dicomModel = dicomModel; this.dicomSeries = dicomSeries; this.seriesInstanceList = Optional.ofNullable((SeriesInstanceList) dicomSeries.getTagValue(TagW.WadoInstanceReferenceList)) .orElseGet(SeriesInstanceList::new); this.writeInCache = writeInCache; this.progressBar = getBar(); if (!writeInCache) { progressBar.setVisible(false); } this.dicomSeries.setSeriesLoader(this); this.concurrentDownloads = concurrentDownloads; }
this.dicomSeries.setSeriesLoader(null); DownloadManager.removeLoadSeries(this, dicomModel);