Moments implements PlugIn, DialogListener { static Object getEmptyPixels(final int w, final int h, final int bitDepth) throws IllegalArgumentException { if (bitDepth == 8) { return new byte[w * h]; } if (bitDepth == 16) { return new short[w * h]; } if (bitDepth == 24) { return new int[w * h]; } if (bitDepth == 32) { return new float[w * h]; } throw new IllegalArgumentException("Unrecognized bit depth"); }  @Override boolean dialogItemChanged(final GenericDialog gd, final AWTEvent e); @Override void run(final String arg); @Deprecated static ImagePlus alignImage(final ImagePlus imp, final Matrix E,
		final int endSlice);  }
@Test public void testGetEmptyPixels16bit() { final Object pixels = getEmptyPixels(1, 1, 16); assertTrue(pixels instanceof short[]); }
@Test public void testGetEmptyPixels24bit() { final Object pixels = getEmptyPixels(1, 1, 24); assertTrue(pixels instanceof int[]); }
@Test public void testGetEmptyPixels32bit() { final Object pixels = getEmptyPixels(1, 1, 32); assertTrue(pixels instanceof float[]); }
@Test public void testGetEmptyPixels8bit() { final Object pixels = getEmptyPixels(1, 1, 8); assertTrue(pixels instanceof byte[]); }
@Test(expected = IllegalArgumentException.class) public void testGetEmptyPixelsBadBitDepth() { getEmptyPixels(1, 1, 64); }