Tabnine Logo
ImagePlusImg
Code IndexAdd Tabnine to your IDE (free)

How to use
ImagePlusImg
in
net.imglib2.img.imageplus

Best Java code snippets using net.imglib2.img.imageplus.ImagePlusImg (Showing top 16 results out of 315)

origin: net.imglib2/imglib2-ij

@Override
public NativeImg< T, LongArray > createLongInstance( long[] dimensions, final int entitiesPerPixel )
{
  if ( dimensions.length > 5 )
    throw new RuntimeException( "Unsupported dimensionality: " + dimensions.length );
  return new ImagePlusImg< T, LongArray >( new LongArray( 1 ), dimensions, entitiesPerPixel );
}
origin: net.imglib2/imglib2-ij

protected ImagePlusImg(
    final int width,
    final int height,
    final int depth,
    final int frames,
    final int channels,
    final int entitiesPerPixel )
{
  super( reduceDimensions( new long[] { width, height, channels, depth, frames } ), entitiesPerPixel );
  this.width = width;
  this.height = height;
  this.depth = depth;
  this.frames = frames;
  this.channels = channels;
}
origin: fiji/Stitching

final ImagePlus outImp = ((ImagePlusImg<?,?>)outputSlice).getImagePlus();
final FileSaver fs = new FileSaver( outImp );
fs.saveAsTiff( new File( outputDirectory, "img_t" + lz( t, numTimePoints ) + "_z" + lz( slice+1, numSlices ) + "_c" + lz( c, numChannels ) ).getAbsolutePath() );
origin: net.imglib2/imglib2-ij

  protected static < T extends Type< T > > Img< FloatType > convertToFloat(
      final Img< T > input, final Converter< T, FloatType > c )
      {        
    final ImagePlusImg< FloatType, ? > output = new ImagePlusImgFactory< FloatType >().create( input, new FloatType() );

    final Cursor< T > in = input.cursor();
    final Cursor< FloatType > out = output.cursor();

    while ( in.hasNext() )
    {
      in.fwd();
      out.fwd();

      c.convert(in.get(), out.get());
    }

    return output;
      }
}
origin: fiji/Stitching

fusionImp[0] = ((ImagePlusImg<?, ?>) output).getImagePlus();
fusionImp[0].setTitle("fusing...");
fusionImp[0].show();
origin: fiji/Stitching

try 
  final ImagePlus outImp = ((ImagePlusImg<?,?>)out).getImagePlus();
  for ( int z = 1; z <= out.dimension( 2 ); ++z )
    stack.addSlice( imp.getTitle(), outImp.getStack().getProcessor( z ) );
origin: net.imglib2/imglib2-ij

@Override
public NativeImg< T, BitArray > createBitInstance( long[] dimensions, final int entitiesPerPixel )
{
  if ( dimensions.length > 5 )
    throw new RuntimeException( "Unsupported dimensionality: " + dimensions.length );
  return new ImagePlusImg< T, BitArray >( new BitArray( 1 ), dimensions, entitiesPerPixel );
}
origin: net.imglib2/imglib2-ij

/**
 * Compute the minimal required number of dimensions for a given
 * {@link ImagePlus}, whereas width and height are always first.
 *
 * E.g. a gray-scale 2d time series would have three dimensions
 * [width,height,frames], a gray-scale 3d stack [width,height,depth] and a
 * 2d composite image [width,height,channels] as well.  A composite 3d
 * stack has four dimensions [width,height,channels,depth], as a time
 * series five [width,height,channels,depth,frames].
 */
protected static long[] reduceDimensions( final ImagePlus imp )
{
  final int[] dimensions = imp.getDimensions();
  final long[] impDimensions = new long[ dimensions.length ];
  for ( int d = 0; d < dimensions.length; ++d )
    impDimensions[ d ] = dimensions[ d ];
  return reduceDimensions( impDimensions );
}
origin: fiji/Stitching

fusionImp = ((ImagePlusImg<?, ?>) output).getImagePlus();
fusionImp.setTitle( "fusing..." );
fusionImp.show();
origin: net.imglib2/imglib2-ij

@Override
public NativeImg< T, CharArray > createCharInstance( long[] dimensions, final int entitiesPerPixel )
{
  if ( dimensions.length > 5 )
    throw new RuntimeException( "Unsupported dimensionality: " + dimensions.length );
  return new ImagePlusImg< T, CharArray >( new CharArray( 1 ), dimensions, entitiesPerPixel );
}
origin: net.preibisch/multiview-reconstruction

@SuppressWarnings("unchecked")
public static < T extends RealType< T > & NativeType< T > > ImagePlus getImagePlusInstance(
    final RandomAccessibleInterval< T > img,
    final boolean virtualDisplay,
    final String title,
    final double min,
    final double max )
{
  ImagePlus imp = null;
  if ( img instanceof ImagePlusImg )
    try { imp = ((ImagePlusImg<T, ?>)img).getImagePlus(); } catch (ImgLibException e) {}
  if ( imp == null )
  {
    if ( virtualDisplay )
      imp = ImageJFunctions.wrap( img, title, DeconViews.createExecutorService() );
    else
      imp = ImageJFunctions.wrap( img, title, DeconViews.createExecutorService() ).duplicate();
  }
  final double[] minmax = getFusionMinMax( img, min, max );
  imp.setTitle( title );
  imp.setDimensions( 1, (int)img.dimension( 2 ), 1 );
  imp.setDisplayRange( minmax[ 0 ], minmax[ 1 ] );
  return imp;
}
origin: net.imglib2/imglib2-ij

@Override
public NativeImg< T, DoubleArray > createDoubleInstance( long[] dimensions, final int entitiesPerPixel )
{
  if ( dimensions.length > 5 )
    throw new RuntimeException( "Unsupported dimensionality: " + dimensions.length );
  return new ImagePlusImg< T, DoubleArray >( new DoubleArray( 1 ), dimensions, entitiesPerPixel );
}
origin: sc.fiji/blockmatching_

img.getImagePlus().show();
origin: sc.fiji/blockmatching_

try
  impVis = img.getImagePlus();
  ipVis = ( ColorProcessor )impVis.getProcessor();
  while ( ipVis.getWidth() > meshResolution * minGridSize )
origin: fiji/Stitching

final ImagePlus outImp = ((ImagePlusImg<?, ?>)out).getImagePlus();
for ( int z = 1; z <= out.dimension( 2 ); ++z )
  stack.addSlice( "", outImp.getStack().getProcessor( z ) );
origin: fiji/Stitching

final ImagePlus outImp = ((ImagePlusImg<?,?>)out).getImagePlus();
for ( int z = 1; z <= out.dimension( 2 ); ++z )
  stack.addSlice( imp.getTitle(), outImp.getStack().getProcessor( z ) );
net.imglib2.img.imageplusImagePlusImg

Javadoc

A container that stores data in an array of 2d-slices each as a linear array of basic types. For types that are supported by ImageJ (byte, short, int, float), an actual ImagePlus is created or used to store the data. Alternatively, an ImagePlusImg can be created using an already existing ImagePlus instance. ImagePlusImg provides a legacy layer to apply imglib-based algorithm implementations directly on the data stored in an ImageJ ImagePlus. For all types that are supported by ImageJ, the ImagePlusImg provides access to the pixels of an ImagePlus instance that can be accessed via getImagePlus(). Johannes Schindelin

Most used methods

  • getImagePlus
  • <init>
    Standard constructor as called by default factories.Note that this constructor does not know about t
  • cursor
  • reduceDimensions

Popular in Java

  • Start an intent from android
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • scheduleAtFixedRate (Timer)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Top plugins for WebStorm
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