Tabnine Logo
PlanarImgFactory.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
net.imglib2.img.planar.PlanarImgFactory
constructor

Best Java code snippets using net.imglib2.img.planar.PlanarImgFactory.<init> (Showing top 20 results out of 315)

origin: net.imglib2/imglib2

@Override
public PlanarImgFactory< T > factory()
{
  return new PlanarImgFactory<>( linkedType );
}
origin: net.imglib2/imglib2

@SuppressWarnings( { "unchecked", "rawtypes" } )
@Override
public < S > ImgFactory< S > imgFactory( final S type ) throws IncompatibleTypeException
{
  if ( NativeType.class.isInstance( type ) )
    return new PlanarImgFactory( ( NativeType ) type );
  throw new IncompatibleTypeException( this, type.getClass().getCanonicalName() + " does not implement NativeType." );
}
origin: net.imagej/ij-data

@Override
public <T extends RealType<T> & NativeType<T>> Dataset create(
  final T type, final long[] dims, final String name, final AxisType[] axes)
{
  final PlanarImgFactory<T> imgFactory = new PlanarImgFactory<T>();
  return create(imgFactory, type, dims, name, axes);
}
origin: imglib/imglib2

@SuppressWarnings( { "unchecked", "rawtypes" } )
@Override
public < S > ImgFactory< S > imgFactory( final S type ) throws IncompatibleTypeException
{
  if ( NativeType.class.isInstance( type ) )
    return new PlanarImgFactory( ( NativeType ) type );
  throw new IncompatibleTypeException( this, type.getClass().getCanonicalName() + " does not implement NativeType." );
}
origin: net.imglib2/imglib2

/**
 * Create an {@link PlanarImg}&lt;{@link LongType}, {@link LongArray}&gt;.
 */
@SuppressWarnings( "unchecked" )
final static public PlanarImg< LongType, LongArray > longs( final long... dim )
{
  return ( PlanarImg< LongType, LongArray > ) new PlanarImgFactory<>( new LongType() ).create( dim );
}
origin: net.imglib2/imglib2

/**
 * Create an {@link PlanarImg}&lt;{@link UnsignedByteType}, {@link ByteArray}&gt;.
 */
@SuppressWarnings( "unchecked" )
final static public PlanarImg< UnsignedByteType, ByteArray > unsignedBytes( final long... dim )
{
  return ( PlanarImg< UnsignedByteType, ByteArray > ) new PlanarImgFactory<>( new UnsignedByteType() ).create( dim );
}
origin: net.imglib2/imglib2

/**
 * Create an {@link PlanarImg}&lt;{@link UnsignedShortType}, {@link ShortArray}
 * &gt;.
 */
@SuppressWarnings( "unchecked" )
final static public PlanarImg< UnsignedShortType, ShortArray > unsignedShorts( final long... dim )
{
  return ( PlanarImg< UnsignedShortType, ShortArray > ) new PlanarImgFactory<>( new UnsignedShortType() ).create( dim );
}
origin: net.imglib2/imglib2

/**
 * Create an {@link PlanarImg}&lt;{@link NativeBoolType}, {@link BooleanArray}&gt;.
 */
@SuppressWarnings( "unchecked" )
final static public PlanarImg< NativeBoolType, BooleanArray > booleans( final long... dim )
{
  return ( PlanarImg< NativeBoolType, BooleanArray > ) new PlanarImgFactory<>( new NativeBoolType() ).create( dim );
}
origin: net.imglib2/imglib2

/**
 * Create an {@link PlanarImg}&lt;{@link BitType}, {@link LongArray}&gt;.
 */
@SuppressWarnings( "unchecked" )
final static public PlanarImg< BitType, LongArray > bits( final long... dim )
{
  return ( PlanarImg< BitType, LongArray > ) new PlanarImgFactory<>( new BitType() ).create( dim );
}
origin: imglib/imglib2

/**
 * Create an {@link PlanarImg}&lt;{@link IntType}, {@link IntArray}&gt;.
 */
@SuppressWarnings( "unchecked" )
final static public PlanarImg< IntType, IntArray > ints( final long... dim )
{
  return ( PlanarImg< IntType, IntArray > ) new PlanarImgFactory<>( new IntType() ).create( dim );
}
origin: imglib/imglib2

/**
 * Create an {@link PlanarImg}&lt;{@link FloatType}, {@link FloatArray}&gt;.
 */
@SuppressWarnings( "unchecked" )
final static public PlanarImg< FloatType, FloatArray > floats( final long... dim )
{
  return ( PlanarImg< FloatType, FloatArray > ) new PlanarImgFactory<>( new FloatType() ).create( dim );
}
origin: imglib/imglib2

/**
 * Create an {@link PlanarImg}&lt;{@link UnsignedByteType}, {@link ByteArray}&gt;.
 */
@SuppressWarnings( "unchecked" )
final static public PlanarImg< UnsignedByteType, ByteArray > unsignedBytes( final long... dim )
{
  return ( PlanarImg< UnsignedByteType, ByteArray > ) new PlanarImgFactory<>( new UnsignedByteType() ).create( dim );
}
origin: imglib/imglib2

/**
 * Create an {@link PlanarImg}&lt;{@link UnsignedShortType}, {@link ShortArray}
 * &gt;.
 */
@SuppressWarnings( "unchecked" )
final static public PlanarImg< UnsignedShortType, ShortArray > unsignedShorts( final long... dim )
{
  return ( PlanarImg< UnsignedShortType, ShortArray > ) new PlanarImgFactory<>( new UnsignedShortType() ).create( dim );
}
origin: imglib/imglib2

/**
 * Create an {@link PlanarImg}&lt;{@link NativeBoolType}, {@link BooleanArray}&gt;.
 */
@SuppressWarnings( "unchecked" )
final static public PlanarImg< NativeBoolType, BooleanArray > booleans( final long... dim )
{
  return ( PlanarImg< NativeBoolType, BooleanArray > ) new PlanarImgFactory<>( new NativeBoolType() ).create( dim );
}
origin: imglib/imglib2

/**
 * Create an {@link PlanarImg}&lt;{@link ComplexFloatType}, {@link FloatArray}
 * &gt;.
 */
@SuppressWarnings( "unchecked" )
final static public PlanarImg< ComplexFloatType, FloatArray > complexFloats( final long... dim )
{
  return ( PlanarImg< ComplexFloatType, FloatArray > ) new PlanarImgFactory<>( new ComplexFloatType() ).create( dim );
}
origin: net.imglib2/imglib2

/**
 * Create an {@link PlanarImg}&lt;{@link ByteType}, {@link ByteArray}&gt;.
 */
@SuppressWarnings( "unchecked" )
final static public PlanarImg< ByteType, ByteArray > bytes( final long... dim )
{
  return ( PlanarImg< ByteType, ByteArray > ) new PlanarImgFactory<>( new ByteType() ).create( dim );
}
origin: net.imglib2/imglib2

/**
 * Create an {@link PlanarImg}&lt;{@link UnsignedIntType}, {@link IntArray}&gt;.
 */
@SuppressWarnings( "unchecked" )
final static public PlanarImg< UnsignedIntType, IntArray > unsignedInts( final long... dim )
{
  return ( PlanarImg< UnsignedIntType, IntArray > ) new PlanarImgFactory<>( new UnsignedIntType() ).create( dim );
}
origin: net.imagej/imagej-legacy

private ImgPlus<UnsignedByteType> splitColorChannels(ImgPlus<ARGBType> input) {
  Img<ARGBType> colored = input.getImg();
  RandomAccessibleInterval<UnsignedByteType> colorStack = Views.stack(
      Converters.argbChannel( colored, 1 ),
      Converters.argbChannel( colored, 2 ),
      Converters.argbChannel( colored, 3 ) );
  ImgPlus<UnsignedByteType> result = new ImgPlus<>(ImgView.wrap(colorStack, new PlanarImgFactory<>()), input.getName());
  int lastAxis = colored.numDimensions();
  for (int i = 0; i < lastAxis; i++) result.setAxis(input.axis(i).copy(), i);
  result.setAxis(new DefaultLinearAxis(Axes.CHANNEL), lastAxis);
  return ImgPlusViews.moveAxis(result, lastAxis, 2);
}
origin: imglib/imglib2

@Test
public void testCopyToPlanarContainerWithSourceIteration()
{
  final PlanarImg< IntType, ? > planarImg = new PlanarImgFactory<>( new IntType() ).create( dimensions );
  copyWithSourceIteration( intImg, planarImg );
  assertArrayEquals( intData, getImgAsInts( planarImg ) );
}
origin: imglib/imglib2

  @Test
  public void testCopyToPlanarContainerWithDestIteration()
  {
    final PlanarImg< IntType, ? > planarImg = new PlanarImgFactory<>( new IntType() ).create( dimensions );
    copyWithDestIteration( intImg, planarImg );
    assertArrayEquals( intData, getImgAsInts( planarImg ) );
  }
}
net.imglib2.img.planarPlanarImgFactory<init>

Popular methods of PlanarImgFactory

  • create
  • cache
  • type

Popular in Java

  • Running tasks concurrently on multiple threads
  • onCreateOptionsMenu (Activity)
  • setScale (BigDecimal)
  • runOnUiThread (Activity)
  • Menu (java.awt)
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now