APISonar


net.imglib2.img.Axes.TIME

> net > imglib2 > img > Axes > TIME
net APIs imglib2 APIs img APIs Axes APIs TIME APIs

Example 1
private static int getDim(final Axis 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
public static boolean repeated(final Axis[] axes) {
		int cCount = 0, zCount = 0, tCount = 0;
		for (final Axis axis : axes) {
			if (axis == Axes.CHANNEL) cCount++;
			if (axis == Axes.Z) zCount++;
			if (axis == Axes.TIME) tCount++;
		}
		return (cCount > 1 || zCount > 1 || tCount > 1);
	}
Example 3
public void testAxisOrderingIJ2DatasetToImageJ1() {
		final Axis[] axes = new Axis[] { null, Axes.CHANNEL, Axes.Z, Axes.TIME };
		for (final Axis outer : axes) {
			for (final Axis middle : axes) {
				for (final Axis inner : axes) {
					if (LegacyTestUtils.allNull(new Axis[] { outer, middle, inner })) continue;
					if (LegacyTestUtils.repeated(new Axis[] { outer, middle, inner })) continue;
					testOrdering(new Axis[] { outer, middle, inner });
				}
			}
		}
	}
Example 4
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);
	}