@Override public void removeHierarchyNode(MediaSeriesGroup root, MediaSeriesGroup leaf) { synchronized (model) { Tree<MediaSeriesGroup> tree = model.getTree(root); if (tree != null) { tree.removeLeaf(leaf); } } }
@Override public void addHierarchyNode(MediaSeriesGroup root, MediaSeriesGroup leaf) { synchronized (model) { model.addLeaf(root, leaf); } }
@Override public Collection<MediaSeriesGroup> getChildren(MediaSeriesGroup node) { return model.getSuccessors(node); }
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 openSequenceInPlugin(ViewerPluginBuilder builder) { if (builder == null) { return; } DataExplorerModel model = builder.getModel(); model.firePropertyChange(new ObservableEvent(ObservableEvent.BasicAction.REGISTER, model, null, builder)); }
public AbstractFileModel() { model = new Tree<>(MediaSeriesGroupNode.rootNode); }
public void dispose() { synchronized (model) { for (Iterator<MediaSeriesGroup> iterator = this.getChildren(MediaSeriesGroupNode.rootNode).iterator(); iterator.hasNext();) { iterator.next().dispose(); } } model.clear(); }
public Collection<T> getSuccessors(T root) { Collection<T> successors = new ArrayList<>(); Tree<T> tree = getTree(root); if (null != tree) { for (Tree<T> leaf : tree.leafs) { successors.add(leaf.head); } } return successors; }
@Override public String toString() { return printTree(0); }
public static void closeSeriesViewer(View2dContainer view2dContainer) { // Unregister the PropertyChangeListener DataExplorerView dicomView = UIManager.getExplorerplugin(DicomExplorer.NAME); if (dicomView != null) { dicomView.getDataExplorerModel().removePropertyChangeListener(view2dContainer); } }
@Override public void removeHierarchyNode(MediaSeriesGroup root, MediaSeriesGroup leaf) { synchronized (model) { Tree<MediaSeriesGroup> tree = model.getTree(root); if (tree != null) { tree.removeLeaf(leaf); } } }
@Override public Collection<MediaSeriesGroup> getChildren(MediaSeriesGroup node) { return model.getSuccessors(node); }
private Tree<T> addLeaf(T leaf) { Tree<T> t = new Tree<>(leaf); leafs.add(t); t.parent = this; t.locate = this.locate; locate.put(leaf, t); return t; }
@Override public void addHierarchyNode(MediaSeriesGroup root, MediaSeriesGroup leaf) { synchronized (model) { model.addLeaf(root, leaf); } }
public static void closeSeriesViewer(SRContainer mprContainer) { // Unregister the PropertyChangeListener DataExplorerView dicomView = UIManager.getExplorerplugin(DicomExplorer.NAME); if (dicomView != null) { dicomView.getDataExplorerModel().removePropertyChangeListener(mprContainer); } }
public static <T> Collection<T> getSuccessors(T of, Collection<Tree<T>> in) { for (Tree<T> tree : in) { if (tree.locate.containsKey(of)) { return tree.getSuccessors(of); } } return new ArrayList<>(); }
public Tree<T> setAsParent(T parentRoot) { Tree<T> t = new Tree<>(parentRoot); t.leafs.add(this); this.parent = t; t.locate = this.locate; t.locate.put(head, this); t.locate.put(parentRoot, t); return t; }
@Override public MediaSeriesGroup getHierarchyNode(MediaSeriesGroup parent, Object value) { if (parent != null || value != null) { synchronized (model) { for (MediaSeriesGroup node : model.getSuccessors(parent)) { if (node.matchIdValue(value)) { return node; } } } } return null; }
public DicomModel() { model = new Tree<>(MediaSeriesGroupNode.rootNode); splittingRules = new SplittingRules(); }