public void setSlicesAllPanes( int new_x, int new_y, int new_z ) { xy.setSlice( new_z + 1 ); xy.updateImage(); xz.setSlice( new_y + 1 ); xz.updateImage(); zy.setSlice( new_x + 1 ); zy.updateImage(); repaintAllPanes(); }
/** * Apply a given B-spline transformation to the source (gray-scale) image. * The source image is modified. The target image is used to know * the output size (Multi-thread version). * * @param sourceImp source image representation * @param targetImp target image representation * @param source source image model * @param intervals intervals in the deformation * @param cx x- B-spline coefficients * @param cy y- B-spline coefficients */ public static void applyTransformationToSourceMT( ImagePlus sourceImp, ImagePlus targetImp, BSplineModel source, int intervals, double [][]cx, double [][]cy) { ImageProcessor result_imp = applyTransformationMT(sourceImp, targetImp, source, intervals, cx, cy); sourceImp.setProcessor(sourceImp.getTitle(), result_imp); sourceImp.updateImage(); } // end applyTransformationToSourceMT
if (imageUpdated) { imageUpdated = false; img.updateImage();
public void paintDoubleBuffered(Graphics g) { final int srcRectWidthMag = (int)(srcRect.width*magnification); final int srcRectHeightMag = (int)(srcRect.height*magnification); if (offScreenImage==null || offScreenWidth!=srcRectWidthMag || offScreenHeight!=srcRectHeightMag) { offScreenImage = createImage(srcRectWidthMag, srcRectHeightMag); offScreenWidth = srcRectWidthMag; offScreenHeight = srcRectHeightMag; } try { if (imageUpdated) { imageUpdated = false; imp.updateImage(); } Graphics offScreenGraphics = offScreenImage.getGraphics(); Java2.setBilinearInterpolation(offScreenGraphics, Prefs.interpolateScaledImages); Image img = imp.getProcessor().createImage(); waitForImage(img); if (img!=null) offScreenGraphics.drawImage(img, 0, 0, srcRectWidthMag, srcRectHeightMag, srcRect.x, srcRect.y, srcRect.x+srcRect.width, srcRect.y+srcRect.height, null); drawOverlay(offScreenGraphics); g.drawImage(offScreenImage, 0, 0, null); } catch(OutOfMemoryError e) {IJ.outOfMemory("Paint");} }
this.sourceImp.updateImage(); targetImp.updateImage();
/** * Show an image in a new bUnwarpJ window. * * @param title image title * @param array image in a double array */ public static void showImage( final String title, final double [][]array) { int Ydim=array.length; int Xdim=array[0].length; final FloatProcessor fp=new FloatProcessor(Xdim,Ydim); for (int i=0; i<Ydim; i++) for (int j=0; j<Xdim; j++) fp.setf(j,i, (float) array[i][j]); fp.resetMinAndMax(); final ImagePlus ip=new ImagePlus(title, fp); ip.updateImage(); ip.show(); } // end showImage
/** * Apply a given B-spline transformation to the source (gray-scale) image. * The source image is modified. The target image is used to know * the output size (Multi-thread version). * * @param sourceImp source image representation * @param targetImp target image representation * @param intervals intervals in the deformation * @param cx x- B-spline coefficients * @param cy y- B-spline coefficients */ public static void applyTransformationToSourceMT( ImagePlus sourceImp, ImagePlus targetImp, int intervals, double [][]cx, double [][]cy) { BSplineModel source = new BSplineModel (sourceImp.getProcessor(), false, 1); ImageProcessor result_imp = applyTransformationMT(sourceImp, targetImp, source, intervals, cx, cy); sourceImp.setProcessor(sourceImp.getTitle(), result_imp); sourceImp.updateImage(); } // end applyTransformationToSourceMT
/** * Show an image in a new bUnwarpJ window. * * @param title image title * @param array image in a double array * @param Ydim image height * @param Xdim image width */ public static void showImage( final String title, final double [] array, final int Ydim, final int Xdim) { final FloatProcessor fp=new FloatProcessor(Xdim,Ydim); int ij=0; for (int i=0; i<Ydim; i++) for (int j=0; j<Xdim; j++, ij++) fp.setf(j,i, (float) array[ij]); fp.resetMinAndMax(); final ImagePlus ip=new ImagePlus(title, fp); ip.updateImage(); ip.show(); }
if (imageUpdated) { imageUpdated = false; imp.updateImage();
if (imageUpdated) { imageUpdated = false; imp.updateImage();
if (imageUpdated) { imageUpdated = false; imp.updateImage();
target.setPixels( temp.getPixels() ); temp.setPixels( targetPixels ); imp.updateImage(); imp.draw();
target.setPixels( temp.getPixels() ); temp.setPixels( targetPixels ); imp.updateImage(); imp.draw();
/** Sets the current hyperstack position and updates the display, where 'channel', 'slice' and 'frame' are one-based indexes. */ public void setPosition(int channel, int slice, int frame) { //IJ.log("setPosition: "+channel+" "+slice+" "+frame+" "+noUpdateMode); verifyDimensions(); if (channel<0) channel=0; if (slice<0) slice=0; if (frame<0) frame=0; if (channel==0) channel=getC(); if (slice==0) slice=getZ(); if (frame==0) frame=getT(); if (channel>nChannels) channel=nChannels; if (slice>nSlices) slice=nSlices; if (frame>nFrames) frame=nFrames; if (isDisplayedHyperStack()) ((StackWindow)win).setPosition(channel, slice, frame); else { boolean channelChanged = channel!=getChannel(); setSlice((frame-1)*nChannels*nSlices + (slice-1)*nChannels + channel); updatePosition(channel, slice, frame); if (channelChanged && isComposite() && !noUpdateMode) updateImage(); } }
/** Sets the current hyperstack position and updates the display, where 'channel', 'slice' and 'frame' are one-based indexes. */ public void setPosition(int channel, int slice, int frame) { //IJ.log("setPosition: "+channel+" "+slice+" "+frame+" "+noUpdateMode); verifyDimensions(); if (channel<0) channel=0; if (slice<0) slice=0; if (frame<0) frame=0; if (channel==0) channel=getC(); if (slice==0) slice=getZ(); if (frame==0) frame=getT(); if (channel>nChannels) channel=nChannels; if (slice>nSlices) slice=nSlices; if (frame>nFrames) frame=nFrames; if (isDisplayedHyperStack()) ((StackWindow)win).setPosition(channel, slice, frame); else { boolean channelChanged = channel!=getChannel(); setSlice((frame-1)*nChannels*nSlices + (slice-1)*nChannels + channel); updatePosition(channel, slice, frame); if (channelChanged && isComposite() && !noUpdateMode) updateImage(); } }
if (imageUpdated) { imageUpdated = false; imp.updateImage();
if (imageUpdated) { imageUpdated = false; imp.updateImage();
sourceImp.updateImage(); sourceImp.updateImage();
imp.updateImage(); saveID = imp.getID(); IJ.register(MontageMaker.class);
imp.updateImage(); saveID = imp.getID(); IJ.register(MontageMaker.class);