if (stackSize>1) win = new StackWindow(this); else win = new ImageWindow(this);
new StackWindow(imp, cc); else new ImageWindow(imp, cc);
private void doGraph() { if (flow instanceof FlowJFlow && trueFlow instanceof FlowJFlow) { ImagePlus imp = new ImagePlus("True-Estimate "+description, GUI.createBlankImage(300,300)); ImageWindow imw = new ImageWindow(imp); imp.show(); Image img = imp.getImage(); FlowJError.map(img.getGraphics(), 300, 300, flow, trueFlow); } else IJ.error("flow or true flow not known"); } /**
if (win!=null) { if (dimensionsChanged) win = new ImageWindow(this); else repaintWindow();
if (win!=null) { if (dimensionsChanged) win = new ImageWindow(this); else repaintWindow();
v139t ? img.getCanvas().getDisplayList() : null; ic = new CellCntrImageCanvas(counterImg, typeVector, this, displayList); new ImageWindow(counterImg, ic);
if (win!=null) new ImageWindow(imp, imp.getCanvas()); // replace StackWindow with ImageWindow } else if (stack.isHSB() && item.equals("RGB Color")) { new ImageConverter(imp).convertHSBToRGB(); if (win!=null) new ImageWindow(imp, imp.getCanvas()); } else if (stack.isLab() && item.equals("RGB Color")) { new ImageConverter(imp).convertLabToRGB(); if (win!=null) new ImageWindow(imp, imp.getCanvas()); } else if (item.equals("8-bit")) new StackConverter(imp).convertToGray8();
if (win!=null) new ImageWindow(imp, imp.getCanvas()); // replace StackWindow with ImageWindow } else if (stack.isHSB() && item.equals("RGB Color")) { new ImageConverter(imp).convertHSBToRGB(); if (win!=null) new ImageWindow(imp, imp.getCanvas()); } else if (stack.isLab() && item.equals("RGB Color")) { new ImageConverter(imp).convertLabToRGB(); if (win!=null) new ImageWindow(imp, imp.getCanvas()); } else if (item.equals("8-bit")) new StackConverter(imp).convertToGray8();
void del() { if (!imp.lock()) return; ImageStack stack = imp.getStack(); int n = imp.getCurrentSlice(); stack.deleteSlice(n); if (stack.getSize()==1) { imp.setProcessor(null, stack.getProcessor(1)); new ImageWindow(imp); } imp.setStack(null, stack); numSlices--; if (n>numSlices) imp.setSlice(numSlices); else imp.setSlice(n); imp.unlock(); } void delN(){
private void loadLabels(ImagePlus labelImage) { labelImage.hide();//don't want the extra one visible to the user new SegmentatorModel(currentImage).setLabelImagePlus(labelImage); AmiraParameters params = new AmiraParameters(labelImage); populateLabelList(params); SegmentationViewerCanvas canvas = new SegmentationViewerCanvas(currentImage, labelImage); new SegmentatorModel(currentImage).setLabelCanvas(canvas); if (currentImage.getStackSize() > 1) new StackWindow(currentImage, canvas); else new ImageWindow(currentImage, canvas); //after a new window is constructed. the old one is //cloased and the listener tidied up //so we need to make sure we add a new one //we do not need to do this for ROIs becuase //they work by polling new SliceWatcher(currentImage).addSliceListener(this); currentImage.getWindow().addWindowFocusListener(this); //new RoiWatcher(currentImage).addRoiListener(this); }
/** Overrides ImagePlus.show(). */ public void show() { img = ip.createImage(); ImageCanvas ic = new PlotsCanvas(this); win = new ImageWindow(this, ic); IJ.showStatus(""); if (ic.getMagnification()==1.0) return; while(ic.getMagnification()<1.0) ic.zoomIn(0,0); Point loc = win.getLocation(); int w = getWidth()+20; int h = getHeight()+30; Dimension screen = IJ.getScreenSize(); if (loc.x+w>screen.width) w = screen.width-loc.x-20; if (loc.y+h>screen.height) h = screen.height-loc.y-30; win.setSize(w, h); win.validate(); repaintWindow(); }
/** Overrides ImagePlus.show(). */ public void show() { img = ip.createImage(); ImageCanvas ic = new PlotsCanvas(this); win = new ImageWindow(this, ic); IJ.showStatus(""); if (ic.getMagnification()==1.0) return; while(ic.getMagnification()<1.0) ic.zoomIn(0,0); Point loc = win.getLocation(); int w = getWidth()+20; int h = getHeight()+30; Dimension screen = IJ.getScreenSize(); if (loc.x+w>screen.width) w = screen.width-loc.x-20; if (loc.y+h>screen.height) h = screen.height-loc.y-30; win.setSize(w, h); win.validate(); repaintWindow(); }
new StackWindow(currentImage, canvas); else new ImageWindow(currentImage, canvas);
win = new PlotWindow(this, (Plot)(getProperty(Plot.PROPERTY_KEY))); else win = new ImageWindow(this); if (roi!=null) roi.setImage(this); if (overlay!=null && getCanvas()!=null)
win = new PlotWindow(this, (Plot)(getProperty(Plot.PROPERTY_KEY))); else win = new ImageWindow(this); if (roi!=null) roi.setImage(this); if (overlay!=null && getCanvas()!=null)
new StackWindow(imp, cc).addKeyListener(cc); else new ImageWindow(imp, cc).addKeyListener(cc); Roi roi = imp.getRoi(); if (roi != null)
win = new ImageWindow(this, new FlowJCanvas(this)); win.setLayout(new FlowLayout());
cp.setColor(new Color(0xffffff)); cp.fill(); impViewer = new ImagePlus("VJViewerCanvas", cp); new ImageWindow(impViewer, new VJViewerCanvas(impViewer)); mappingChoice.select(ISOSURFACE);