APISonar


net.imglib2.meta.Axes.TIME

> net > imglib2 > meta > Axes > TIME
net APIs imglib2 APIs meta APIs Axes APIs TIME APIs

Example 1
private static int getDim(final AxisType axis, final int[] fullDimensions) {
		if (axis == Axes.X) return fullDimensions[0];
		else if (axis == Axes.Y) return fullDimensions[1];
		else if (axis == Axes.CHANNEL) return fullDimensions[2];
		else if (axis == Axes.Z) return fullDimensions[3];
		else if (axis == Axes.TIME) return fullDimensions[4];
		else throw new IllegalArgumentException(
			"incompatible dimension type specified");
	}
Example 2
static boolean hasNonIJ1Axes(final AxisType[] axes) {
		for (final AxisType axis : axes) {
			if (axis == Axes.X) continue;
			if (axis == Axes.Y) continue;
			if (axis == Axes.CHANNEL) continue;
			if (axis == Axes.Z) continue;
			if (axis == Axes.TIME) continue;
			return true;
		}
		return false;
	}
Example 3
private void fillIJ2Position(ImageDisplay disp, ImagePlus imp,
		long[] dimensions, AxisType[] axes, long[] workspace)
	{
		fillIndex(disp, Axes.X, workspace);
		fillIndex(disp, Axes.Y, workspace);
		fillIndex(disp, Axes.Z, workspace);
		fillIndex(disp, Axes.TIME, workspace);
		LegacyUtils.fillChannelIndices(
			dimensions, axes, imp.getChannel()-1, workspace);
	}
Example 4
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); 
	}
Example 5
public static void testMetadataSame(final Dataset ds, final ImagePlus imp) {
		final int xIndex = ds.getAxisIndex(Axes.X);
		final int yIndex = ds.getAxisIndex(Axes.Y);
		final int cIndex = ds.getAxisIndex(Axes.CHANNEL);
		final int zIndex = ds.getAxisIndex(Axes.Z);
		final int tIndex = ds.getAxisIndex(Axes.TIME);
		final Calibration cal = imp.getCalibration();

		assertEquals(ds.getName(), imp.getTitle());
		assertEquals(ds.calibration(xIndex), cal.pixelWidth, 0);
		assertEquals(ds.calibration(yIndex), cal.pixelHeight, 0);
		assertEquals(ds.calibration(cIndex), 1, 0);
		assertEquals(ds.calibration(zIndex), cal.pixelDepth, 0);
		assertEquals(ds.calibration(tIndex), cal.frameInterval, 0);
	}