void registerDataExplorer(DataExplorerView explorer) { if (explorer != null && !UIManager.EXPLORER_PLUGINS.contains(explorer)) { UIManager.EXPLORER_PLUGINS.add(explorer); Optional.ofNullable(explorer.getDataExplorerModel()).ifPresent(e -> e.addPropertyChangeListener(this)); if (explorer instanceof DockableTool) { final DockableTool dockable = (DockableTool) explorer; dockable.showDockable(); } LOGGER.info("Register data explorer Plug-in: {}", explorer.getUIName()); //$NON-NLS-1$ } }
private boolean dropDicomFiles(List<File> files) { if (files != null) { DataExplorerView dicomView = UIManager.getExplorerplugin(DicomExplorer.NAME); if (dicomView == null) { return false; } DicomModel model = (DicomModel) dicomView.getDataExplorerModel(); LoadLocalDicom dicom = new LoadLocalDicom(files.stream().toArray(File[]::new), true, model); DicomModel.LOADING_EXECUTOR.execute(dicom); return true; } return false; } }
public static void closeSeriesViewer(View2dContainer view2dContainer) { // Unregister the PropertyChangeListener DataExplorerView dicomView = UIManager.getExplorerplugin(DicomExplorer.NAME); if (dicomView != null) { dicomView.getDataExplorerModel().removePropertyChangeListener(view2dContainer); } }
public static void closeSeriesViewer(AuContainer container) { // Unregister the PropertyChangeListener DataExplorerView dicomView = UIManager.getExplorerplugin(DicomExplorer.NAME); if (dicomView != null) { dicomView.getDataExplorerModel().removePropertyChangeListener(container); } }
public static void closeSeriesViewer(SRContainer mprContainer) { // Unregister the PropertyChangeListener DataExplorerView dicomView = UIManager.getExplorerplugin(DicomExplorer.NAME); if (dicomView != null) { dicomView.getDataExplorerModel().removePropertyChangeListener(mprContainer); } }
public static void closeSeriesViewer(MPRContainer mprContainer) { // Unregister the PropertyChangeListener DataExplorerView dicomView = UIManager.getExplorerplugin(DicomExplorer.NAME); if (dicomView != null) { dicomView.getDataExplorerModel().removePropertyChangeListener(mprContainer); } }
public static void closeSeriesViewer(WaveContainer container) { // Unregister the PropertyChangeListener DataExplorerView dicomView = UIManager.getExplorerplugin(DicomExplorer.NAME); if (dicomView != null) { dicomView.getDataExplorerModel().removePropertyChangeListener(container); } }
@Override public void setSelected(boolean selected) { if (selected) { eventManager.setSelectedView2dContainer(this); // Send event to select the related patient in Dicom Explorer. DataExplorerView dicomView = UIManager.getExplorerplugin(DicomExplorer.NAME); if (dicomView != null && dicomView.getDataExplorerModel() instanceof DicomModel) { dicomView.getDataExplorerModel().firePropertyChange( new ObservableEvent(ObservableEvent.BasicAction.SELECT, this, null, getGroupID())); } } else { eventManager.setSelectedView2dContainer(null); } }
@Override public void setSelected(boolean selected) { if (selected) { eventManager.setSelectedView2dContainer(this); // Send event to select the related patient in Dicom Explorer. DataExplorerView dicomView = UIManager.getExplorerplugin(DicomExplorer.NAME); if (dicomView != null && dicomView.getDataExplorerModel() instanceof DicomModel) { dicomView.getDataExplorerModel().firePropertyChange( new ObservableEvent(ObservableEvent.BasicAction.SELECT, this, null, getGroupID())); } } else { eventManager.setSelectedView2dContainer(null); } }
@Override public void setSelected(boolean selected) { if (selected) { eventManager.setSelectedView2dContainer(this); // Send event to select the related patient in Dicom Explorer. DataExplorerView dicomView = UIManager.getExplorerplugin(DicomExplorer.NAME); if (dicomView != null && dicomView.getDataExplorerModel() instanceof DicomModel) { dicomView.getDataExplorerModel().firePropertyChange( new ObservableEvent(ObservableEvent.BasicAction.SELECT, this, null, getGroupID())); } } else { eventManager.setSelectedView2dContainer(null); } }
DataExplorerModel model = dataExplorerView.getDataExplorerModel(); if (model != null) { List<Codec> cList = model.getCodecPlugins();
@Override public void setSelected(boolean selected) { if (selected) { eventManager.setSelectedView2dContainer(this); // Send event to select the related patient in Dicom Explorer. DataExplorerView dicomView = UIManager.getExplorerplugin(DicomExplorer.NAME); if (dicomView != null && dicomView.getDataExplorerModel() instanceof DicomModel) { dicomView.getDataExplorerModel().firePropertyChange( new ObservableEvent(ObservableEvent.BasicAction.SELECT, this, null, getGroupID())); } if (ecgview != null && !TOOLS.isEmpty() && TOOLS.get(0) instanceof MeasureAnnotationTool) { MeasureAnnotationTool tool = (MeasureAnnotationTool) TOOLS.get(0); ecgview.setAnnotationTool(tool); tool.setSeries(ecgview.getSeries()); ecgview.updateMarkersTable(); } } else { eventManager.setSelectedView2dContainer(null); } }
void removeDataExplorer(DataExplorerViewFactory factory) { GuiExecutor.instance().execute(() -> { final DataExplorerView explorer = factory.createDataExplorerView(null); if (UIManager.EXPLORER_PLUGINS.contains(explorer)) { Optional.ofNullable(explorer.getDataExplorerModel()) .ifPresent(e -> e.removePropertyChangeListener(this)); UIManager.EXPLORER_PLUGINS.remove(explorer); // Update toolbar List<Toolbar> tb = mainWindow.getToolbarContainer().getRegisteredToolBars(); tb.removeIf(b -> b.getComponent().getAttachedInsertable() == explorer); mainWindow.getToolbarContainer().registerToolBar(tb); UIManager.VIEWER_PLUGINS .forEach(v -> v.getToolBar().removeIf(b -> b.getComponent().getAttachedInsertable() == explorer)); explorer.dispose(); LOGGER.info("Unregister data explorer Plug-in: {}", explorer.getUIName()); //$NON-NLS-1$ } }); }
private static void updateViewerUI(BasicAction action) { ImageViewerPlugin<DicomImageElement> view = EventManager.getInstance().getSelectedView2dContainer(); if (view instanceof View2dContainer) { DataExplorerView dicomView = UIManager.getExplorerplugin(DicomExplorer.NAME); DataExplorerModel model = dicomView.getDataExplorerModel(); if (model != null) { model.firePropertyChange(new ObservableEvent(action, view, null, view)); } } } }
DicomModel model = null; if (dicomView != null) { model = (DicomModel) dicomView.getDataExplorerModel();
DicomModel model = null; if (dicomView != null) { model = (DicomModel) dicomView.getDataExplorerModel();
List<DataExplorerView> explorers = UIManager.EXPLORER_PLUGINS; for (DataExplorerView dataExplorerView : explorers) { if (dataExplorerView.getDataExplorerModel() == model) { view = dataExplorerView; break;
if (dicomView != null && dicomView.getDataExplorerModel() instanceof DicomModel) { dicomView.getDataExplorerModel().firePropertyChange( new ObservableEvent(ObservableEvent.BasicAction.SELECT, this, null, getGroupID()));