@Test(expected = NullPointerException.class) public void testToBitTypeImgPlusThrowsNPEIfOpEnvironmentNull() { final Img<DoubleType> img = ArrayImgs.doubles(3, 3); final ImgPlus<DoubleType> image = new ImgPlus<>(img); Common.toBitTypeImgPlus(null, image); }
public static <C extends ComplexType<C>> ImgPlus<BitType> toBitTypeImgPlus( final OpEnvironment ops, final ImgPlus<C> imgPlus) { final Img<BitType> convertedImg = ops.convert().bit(imgPlus.getImg()); final ImgPlus<BitType> convertedImgPlus = new ImgPlus<>(convertedImg); copyMetadata(imgPlus, convertedImgPlus); return convertedImgPlus; }
Common { public static <C extends ComplexType<C>> ImgPlus<BitType> toBitTypeImgPlus( final OpEnvironment ops, final ImgPlus<C> imgPlus) { final Img<BitType> convertedImg = ops.convert().bit(imgPlus.getImg()); final ImgPlus<BitType> convertedImgPlus = new ImgPlus<>(convertedImg); copyMetadata(imgPlus, convertedImgPlus); return convertedImgPlus; } }
Common { public static <C extends ComplexType<C>> ImgPlus<BitType> toBitTypeImgPlus( final OpEnvironment ops, final ImgPlus<C> imgPlus) { final Img<BitType> convertedImg = ops.convert().bit(imgPlus.getImg()); final ImgPlus<BitType> convertedImgPlus = new ImgPlus<>(convertedImg); copyMetadata(imgPlus, convertedImgPlus); return convertedImgPlus; }  }
Common { public static <C extends ComplexType<C>> ImgPlus<BitType> toBitTypeImgPlus( final OpEnvironment ops, final ImgPlus<C> imgPlus) { final Img<BitType> convertedImg = ops.convert().bit(imgPlus.getImg()); final ImgPlus<BitType> convertedImgPlus = new ImgPlus<>(convertedImg); copyMetadata(imgPlus, convertedImgPlus); return convertedImgPlus; }  static LUT makeFire(); static ImgPlus<BitType> toBitTypeImgPlus(
		final OpEnvironment ops, final ImgPlus<C> imgPlus); static boolean warnAnisotropy(final ImagePlus image,
		final UIService uiService); static void cancelMacroSafe(final ContextCommand command, final String reason); }
Common { public static <C extends ComplexType<C>> ImgPlus<BitType> toBitTypeImgPlus( final OpEnvironment ops, final ImgPlus<C> imgPlus) { final Img<BitType> convertedImg = ops.convert().bit(imgPlus.getImg()); final ImgPlus<BitType> convertedImgPlus = new ImgPlus<>(convertedImg); copyMetadata(imgPlus, convertedImgPlus); return convertedImgPlus; }  static LUT makeFire(); static ImgPlus<BitType> toBitTypeImgPlus(
		final OpEnvironment ops, final ImgPlus<C> imgPlus); static boolean warnAnisotropy(final ImagePlus image,
		final UIService uiService); static void cancelMacroSafe(final ContextCommand command, final String reason);  }