/** Sets the current hyperstack position without updating the display, where 'channel', 'slice' and 'frame' are one-based indexes. */ public void setPositionWithoutUpdate(int channel, int slice, int frame) { noUpdateMode = true; setPosition(channel, slice, frame); noUpdateMode = false; }
/** Sets the current hyperstack position without updating the display, where 'channel', 'slice' and 'frame' are one-based indexes. */ public void setPositionWithoutUpdate(int channel, int slice, int frame) { noUpdateMode = true; setPosition(channel, slice, frame); noUpdateMode = false; }
/** Set the current hyperstack position based on the stack index 'n' (one-based). */ public void setPosition(int n) { int[] pos = convertIndexToPosition(n); setPosition(pos[0], pos[1], pos[2]); }
/** Set the current hyperstack position based on the stack index 'n' (one-based). */ public void setPosition(int n) { int[] pos = convertIndexToPosition(n); setPosition(pos[0], pos[1], pos[2]); }
void setsliders(final int c, final int z, final int t) { switch (imagetype) { case IMAGE5D: I5DResource.position(image,0,0,c-1,z-1,t-1); break; case HYPERSTACK: image.setPosition(c,z,t); break; case IMAGESTACK: image.setSlice(t); break; case SINGLEIMAGE: break; } }
/** Sets the hyperstack channel position (one based). */ public void setC(int channel) { setPosition(channel, getZ(), getT()); }
/** Sets the hyperstack frame position (one based). */ public void setT(int frame) { setPosition(getC(), getZ(), frame); }
/** Sets the hyperstack slice position (one based). */ public void setZ(int slice) { setPosition(getC(), slice, getT()); }
@Override public void centerViewOn( final Spot spot ) { final int frame = spot.getFeature( Spot.FRAME ).intValue(); final double dz = imp.getCalibration().pixelDepth; final long z = Math.round( spot.getFeature( Spot.POSITION_Z ) / dz ) + 1; imp.setPosition( imp.getC(), ( int ) z, frame + 1 ); }
@Override public void centerViewOn( final Spot spot ) { final int frame = spot.getFeature( Spot.FRAME ).intValue(); final double dz = imp.getCalibration().pixelDepth; final long z = Math.round( spot.getFeature( Spot.POSITION_Z ) / dz ) + 1; imp.setPosition( imp.getC(), ( int ) z, frame + 1 ); }
void setPosition(ImagePlus img) { int channel = (int)getFirstArg(); int slice = (int)getNextArg(); int frame = (int)getLastArg(); img.setPosition(channel, slice, frame); }
void setchannel(final int c) { switch (imagetype) { case IMAGE5D: I5DResource.position(image,2,c-1); break; case HYPERSTACK: image.setPosition(c,image.getSlice(),image.getFrame()); break; case IMAGESTACK: case SINGLEIMAGE: break; } }
void setslice(final int z) { switch (imagetype) { case IMAGE5D: I5DResource.position(image,3,z-1); break; case HYPERSTACK: image.setPosition(image.getChannel(),z,image.getFrame()); break; case IMAGESTACK: case SINGLEIMAGE: break; } }
/** * Updates the given {@link ImagePlus}'s position to match that of its * paired {@link ImageDisplay}. */ @Override public void updateLegacyImage(ImageDisplay disp, ImagePlus imp) { // When this is called we know that we have a IJ1 compatible display. So we // can make assumptions about dimensional sizes re: safe casting. final int cPos = (int) calcIJ1ChannelPos(disp); final int zPos = (int) disp.getLongPosition(Axes.Z); final int tPos = (int) disp.getLongPosition(Axes.TIME); imp.setPosition(cPos+1, zPos+1, tPos+1); }
void setPosition(ImagePlus img) { int channel = (int)getFirstArg(); int slice = (int)getNextArg(); int frame = (int)getLastArg(); img.setPosition(channel, slice, frame); }
void setframe(final int t) { switch (imagetype) { case IMAGE5D: I5DResource.position(image,4,t-1); break; case HYPERSTACK: image.setPosition(image.getChannel(),image.getSlice(),t); break; case IMAGESTACK: image.setSlice(t); break; case SINGLEIMAGE: break; } }
/** Updates the ImagePlus's displayed plane to match the slider values. */ private void syncPlane() { for (int i=0; i<cSliders.length; i++) { cIndex[i] = cSliders[i].getValue() - 1; } int c = FormatTools.positionToRaster(cLengths, cIndex) + 1; int z = zScroll == null ? 1 : zScroll.getValue(); int t = tScroll == null ? 1 : tScroll.getValue(); setPosition(c, z, t); imp.setPosition(c, z, t); }
/** Updates the ImagePlus's displayed plane to match the slider values. */ private void syncPlane() { for (int i=0; i<cSliders.length; i++) { cIndex[i] = cSliders[i].getValue() - 1; } int c = FormatTools.positionToRaster(cLengths, cIndex) + 1; int z = zScroll == null ? 1 : zScroll.getValue(); int t = tScroll == null ? 1 : tScroll.getValue(); setPosition(c, z, t); imp.setPosition(c, z, t); }
void setSlice() { GenericDialog gd = new GenericDialog("Set Slice"); gd.addNumericField("Slice Number (1-"+nSlices+"):", slice, 0); gd.showDialog(); if (!gd.wasCanceled()) { int n = (int)gd.getNextNumber(); if (imp.isDisplayedHyperStack()) imp.setPosition(n); else imp.setSlice(n); } }
void setSlice() { GenericDialog gd = new GenericDialog("Set Slice"); gd.addNumericField("Slice Number (1-"+nSlices+"):", slice, 0); gd.showDialog(); if (!gd.wasCanceled()) { int n = (int)gd.getNextNumber(); if (imp.isDisplayedHyperStack()) imp.setPosition(n); else imp.setSlice(n); } }