/*
 * #%L
 * ImageJ software for multidimensional image processing and analysis.
 * %%
 * Copyright (C) 2014 Board of Regents of the University of
 * Wisconsin-Madison and University of Konstanz.
 * %%
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 * 
 * 1. Redistributions of source code must retain the above copyright notice,
 *    this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 *    this list of conditions and the following disclaimer in the documentation
 *    and/or other materials provided with the distribution.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 * #L%
 */

package net.imagej.ops.create;

import net.imagej.ops.Op;
import net.imagej.ops.Ops;
import net.imglib2.type.Type;

import org.scijava.plugin.Parameter;
import org.scijava.plugin.Plugin;

@Plugin(type = Op.class, name = Ops.CreateImg.NAME)
public class DefaultCreateImg<V extends Type<V>> extends AbstractCreateImg<V>
	implements Ops.CreateImg
{

	@Parameter
	private long[] dims;

	@Override
	public void run() {
		output = fac.create(dims, outType.copy());
	}
}

@@ -1620,91 +1620,397 @@
 ib2.
-type.Type;%0A%0Aimport org.scijava.plugin.Parameter;%0Aimport org.scijava.plugin.Plugin;%0A
+img.planar.PlanarImgFactory;%0Aimport net.imglib2.type.Type;%0Aimport net.imglib2.type.numeric.real.FloatType;%0A%0Aimport org.scijava.plugin.Parameter;%0Aimport org.scijava.plugin.Plugin;%0A%0A/**%0A * Creates a default image. If outType is not passed it is set to a default of%0A * FloatType. If fac is not passed in it is set to a default of%0A * PlanarImgFactory.%0A * %0A * @author bnorthan%0A * @param %3CV%3E%0A */
 %0A@Pl
@@ -2114,17 +2114,18 @@
  extends
- 
+%0A%09
 Abstract
@@ -2139,11 +2139,50 @@
 mg%3CV
-%3E%0A%09
+, FloatType, PlanarImgFactory%3CFloatType%3E%3E 
 impl
@@ -2187,17 +2187,18 @@
 plements
- 
+%0A%09
 Ops.Crea
@@ -2245,19 +2245,8 @@
 s;%0A%0A
-%09@Override%0A
 %09pub
@@ -2266,43 +2266,45 @@
 ) %7B%0A
+%0A
 %09%09
-output = fac.create
+createOutputImg
 (dims,
+ fac,
  outType
 .cop
@@ -2303,18 +2303,67 @@
 Type
-.copy
+, new PlanarImgFactory%3CFloatType%3E(),%0A%09%09%09new FloatType
 ());%0A
+%0A
 %09%7D%0A%7D

make factory and type optional