void dupN(){ int n = (int)IJ.getNumber("Number of times to duplicate the slice",1); for (int i = 0; i < n;i++)dup(); } void ins(){
public void run(ImageProcessor ip) { double radius = IJ.getNumber("Radius_of_Gaussian_blur", 3); focus(image, radius, true).show(); }
void delN(){ int maxDelete; if(slice == 1) maxDelete = numSlices - 1; else maxDelete = numSlices - slice + 1; int nDelete = 1; if(maxDelete>1){ nDelete = maxDelete+1; while((nDelete > maxDelete)||(nDelete < 0 )){ nDelete = (int)IJ.getNumber("Number of slices to delete (max "+maxDelete+")",1); if(nDelete==IJ.CANCELED)return; if((nDelete > maxDelete)||(nDelete < 0 ))IJ.beep(); } } if(nDelete==0)return; for(int i = 0; i < nDelete; i++){ del(); } } public void clearOutside(ImageProcessor ip,ImagePlus imp, Roi roi, Rectangle r) {
average = (int)IJ.getNumber(sPrompt,4);
public void run(String arg) { IJ.log("Starting plugin Graph Cut"); // read image imp = WindowManager.getCurrentImage(); if (imp == null) { IJ.showMessage("Please open an image first."); return; } int channels = imp.getNChannels(); if (channels > 1) { int channel = 0; while (channel <= 0 || channel > channels) channel = (int)IJ.getNumber("Please give the number of the channel you wish to consider for the segmentation (1 - " + channels + "):", 1); imp = extractChannel(imp, channel); } // start GUI displayImage = new ImagePlus(); displayImage.setProcessor("Graph Cut", imp.getProcessor().duplicate()); IJ.log("Starting GUI..."); SwingUtilities.invokeLater( new Runnable() { public void run() { IJ.log("Creating window..."); win = new GraphCutWindow(displayImage); win.pack(); } }); }
void lineWidth() { int width = (int)IJ.getNumber("Line Width:", Line.getWidth()); if (width==IJ.CANCELED) return; Line.setWidth(width); LineWidthAdjuster.update(); ImagePlus imp = WindowManager.getCurrentImage(); if (imp!=null && imp.isProcessor()) { ImageProcessor ip = imp.getProcessor(); ip.setLineWidth(Line.getWidth()); Roi roi = imp.getRoi(); if (roi!=null && roi.isLine()) imp.draw(); } }
void lineWidth() { int width = (int)IJ.getNumber("Line Width:", Line.getWidth()); if (width==IJ.CANCELED) return; Line.setWidth(width); LineWidthAdjuster.update(); ImagePlus imp = WindowManager.getCurrentImage(); if (imp!=null && imp.isProcessor()) { ImageProcessor ip = imp.getProcessor(); ip.setLineWidth(Line.getWidth()); Roi roi = imp.getRoi(); if (roi!=null && roi.isLine()) imp.draw(); } }
+numStacks+"):"; int numSubStacks = (int)IJ.getNumber(sPrompt,numStacks); if(numSubStacks==IJ.CANCELED) return;
int linewidth = (int)IJ.getNumber(sPrompt,1);
nInsert = maxInsert+1; while((nInsert > maxInsert)||(nInsert < 0 )){ nInsert = (int)IJ.getNumber("Number of slices to insert (max "+maxInsert+")",1); if(nInsert==IJ.CANCELED)return; if((nInsert > maxInsert)||(nInsert < 0 ))IJ.beep();
int numDiff = (int)IJ.getNumber(sPrompt,1);