本文整理汇总了Java中bdv.viewer.Source类的典型用法代码示例。如果您正苦于以下问题:Java Source类的具体用法?Java Source怎么用?Java Source使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Source类属于bdv.viewer包,在下文中一共展示了Source类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getViewSetupIdFromBDVSource
import bdv.viewer.Source; //导入依赖的package包/类
/**
* try to unwrap source to get the view setup id of wrapped and transformed SpimData view
* @param source - BigDataViewer source
* @return - view setup id if we can unwrap, null else
*/
public static Integer getViewSetupIdFromBDVSource(Source<?> source)
{
if (TransformedSource.class.isInstance( source ))
{
Source< ? > wrappedSource = ((TransformedSource< ? >) source).getWrappedSource();
if (SpimSource.class.isInstance( wrappedSource ))
{
return ( (SpimSource<?> ) wrappedSource).getSetupId();
}
else
return null;
}
else
return null;
}
开发者ID:PreibischLab,项目名称:BigStitcher,代码行数:21,代码来源:TranslateGroupManuallyPanel.java
示例2: createAccumulateProjector
import bdv.viewer.Source; //导入依赖的package包/类
@Override
public AccumulateProjectorCompositeARGB createAccumulateProjector(
ArrayList< VolatileProjector > sourceProjectors,
ArrayList< Source< ? > > sources,
ArrayList< ? extends RandomAccessible< ? extends ARGBType > > sourceScreenImages,
RandomAccessibleInterval< ARGBType > targetScreenImage,
int numThreads,
ExecutorService executorService )
{
return new AccumulateProjectorCompositeARGB(
sourceProjectors,
sourceScreenImages,
targetScreenImage,
numThreads,
executorService );
}
开发者ID:saalfeldlab,项目名称:bigcat,代码行数:17,代码来源:AccumulateProjectorCompositeARGB.java
示例3: createAccumulateProjector
import bdv.viewer.Source; //导入依赖的package包/类
@Override
public VolatileProjector createAccumulateProjector(
final ArrayList< VolatileProjector > sourceProjectors,
final ArrayList< Source< ? > > sources,
final ArrayList< ? extends RandomAccessible< ? extends A > > sourceScreenImages,
final RandomAccessibleInterval< A > targetScreenImage,
final int numThreads,
final ExecutorService executorService )
{
final CompositeProjector< A > projector = new CompositeProjector< A >(
sourceProjectors,
sourceScreenImages,
targetScreenImage,
numThreads,
executorService );
final ArrayList< Composite< A, A > > activeComposites = new ArrayList< Composite< A, A > >();
for ( final Source< ? > activeSource : sources )
activeComposites.add( composites.get( activeSource ) );
projector.setComposites( activeComposites );
return projector;
}
开发者ID:saalfeldlab,项目名称:bigcat,代码行数:25,代码来源:CompositeProjector.java
示例4: createAccumulateProjector
import bdv.viewer.Source; //导入依赖的package包/类
@Override
public VolatileProjector createAccumulateProjector(
ArrayList< VolatileProjector > sourceProjectors,
ArrayList< Source< ? > > sources,
ArrayList< ? extends RandomAccessible< ? extends ARGBType > > sourceScreenImages,
RandomAccessibleInterval< ARGBType > targetScreenImage,
int numThreads,
ExecutorService executorService)
{
return new MaximumProjectorARGB( sourceProjectors, sourceScreenImages, targetScreenImage, numThreads, executorService );
}
开发者ID:PreibischLab,项目名称:BigStitcher,代码行数:12,代码来源:MaximumProjectorARGB.java
示例5: createAccumulateProjector
import bdv.viewer.Source; //导入依赖的package包/类
@Override
public VolatileProjector createAccumulateProjector(ArrayList< VolatileProjector > sourceProjectors,
ArrayList< Source< ? > > sources,
ArrayList< ? extends RandomAccessible< ? extends ARGBType > > sourceScreenImages,
RandomAccessibleInterval< ARGBType > targetScreenImage, int numThreads, ExecutorService executorService)
{
return new AveragingProjectorARGB( sourceProjectors, sourceScreenImages, targetScreenImage, numThreads, executorService );
}
开发者ID:PreibischLab,项目名称:BigStitcher,代码行数:9,代码来源:AveragingProjectorARGB.java
示例6: WarpedSource
import bdv.viewer.Source; //导入依赖的package包/类
public WarpedSource( final Source< T > source, final String name )
{
this.source = source;
this.name = name;
this.isTransformed = false;
this.xfm = null;
sourceMipmapOrdering = MipmapOrdering.class.isInstance( source ) ?
( MipmapOrdering ) source : new DefaultMipmapOrdering( source );
}
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:12,代码来源:WarpedSource.java
示例7: getTransformedSources
import bdv.viewer.Source; //导入依赖的package包/类
private ArrayList< TransformedSource< ? > > getTransformedSources()
{
final ArrayList< TransformedSource< ? > > list = new ArrayList< TransformedSource< ? > >();
for ( final SourceState< ? > sourceState : state.getSources() )
{
final Source< ? > source = sourceState.getSpimSource();
if ( TransformedSource.class.isInstance( source ) )
list.add( ( TransformedSource< ? > ) source );
}
return list;
}
开发者ID:bigdataviewer,项目名称:bigdataviewer-server,代码行数:12,代码来源:ThumbnailGenerator.java
示例8: getSliceAround
import bdv.viewer.Source; //导入依赖的package包/类
@SuppressWarnings( "rawtypes" )
public static final Img< ? > getSliceAround( final Spot spot, final int width, final int height, final Source source )
{
final int frame = spot.getFeature( Spot.FRAME ).intValue();
// Get spot coords
final AffineTransform3D sourceToGlobal = new AffineTransform3D();
source.getSourceTransform( frame, 0, sourceToGlobal );
final Point roundedSourcePos = new Point( 3 );
sourceToGlobal.applyInverse( new Round< Point >( roundedSourcePos ), spot );
final long x = roundedSourcePos.getLongPosition( 0 );
final long y = roundedSourcePos.getLongPosition( 1 );
final long z = roundedSourcePos.getLongPosition( 2 );
// Grab patch
return getImgPatch( new long[] { x, y, z }, frame, width, height, source );
}
开发者ID:fiji,项目名称:MaMuT,代码行数:16,代码来源:MamutUtils.java
示例9: getStackAround
import bdv.viewer.Source; //导入依赖的package包/类
@SuppressWarnings( "rawtypes" )
public static final Img< ? > getStackAround( final Spot spot, final int width, final int height, final int depth, final Source source )
{
final int frame = spot.getFeature( Spot.FRAME ).intValue();
// Get spot coords
final AffineTransform3D sourceToGlobal = new AffineTransform3D();
source.getSourceTransform( frame, 0, sourceToGlobal );
final Point roundedSourcePos = new Point( 3 );
sourceToGlobal.applyInverse( new Round< Point >( roundedSourcePos ), spot );
final long x = roundedSourcePos.getLongPosition( 0 );
final long y = roundedSourcePos.getLongPosition( 1 );
final long z = roundedSourcePos.getLongPosition( 2 );
return getImgPatch( new long[] { x, y, z }, frame, width, height, depth, source );
}
开发者ID:fiji,项目名称:MaMuT,代码行数:15,代码来源:MamutUtils.java
示例10: create
import bdv.viewer.Source; //导入依赖的package包/类
@Override
public TrackMateModelView create( final Model model, final Settings settings, final SelectionModel selectionModel )
{
final SourceSettings ss = ( SourceSettings ) settings;
final List< SourceAndConverter< ? >> sources = ss.getSources();
final int numTimePoints = ss.nframes;
final CacheControl cache = ss.getCacheControl();
final Bookmarks bookmarks = new Bookmarks();
// Test if we have 2D images.
boolean is2D = true;
for ( final SourceAndConverter< ? > sac : sources )
{
final Source< ? > source = sac.getSpimSource();
for ( int t = 0; t < numTimePoints; t++ )
{
if ( source.isPresent( t ) )
{
final RandomAccessibleInterval< ? > level = source.getSource( t, 0 );
if ( level.dimension( 2 ) > 1 )
is2D = false;
break;
}
}
}
final ViewerOptions options = ViewerOptions.options();
if ( is2D )
options.transformEventHandlerFactory( BehaviourTransformEventHandlerPlanar.factory() );
return new MamutViewer( DEFAULT_WIDTH, DEFAULT_HEIGHT,
sources, numTimePoints, cache,
model, selectionModel,
options,
bookmarks );
}
开发者ID:fiji,项目名称:MaMuT,代码行数:37,代码来源:MamutViewerFactory.java
示例11: nonVolatile
import bdv.viewer.Source; //导入依赖的package包/类
public Source nonVolatile()
{
return this;
}
开发者ID:saalfeldlab,项目名称:bigcat,代码行数:5,代码来源:AbstractARGBConvertedLabelsSource.java
示例12: RenamableSource
import bdv.viewer.Source; //导入依赖的package包/类
public RenamableSource( Source<T> src )
{
this.src = src;
this.name = src.getName();
}
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:6,代码来源:RenamableSource.java
示例13: getImgPatch
import bdv.viewer.Source; //导入依赖的package包/类
@SuppressWarnings( { "rawtypes", "unchecked" } )
public static final Img< ? > getImgPatch( final long[] pos, final int frame, final int width, final int height, final int depth, final Source source )
{
/*
* Here be generics massacre...
*/
final Type type = ( Type ) source.getType();
final RealType rtype = ( RealType ) type.createVariable();
rtype.setZero();
final NativeType ntype = ( NativeType ) rtype;
final long[] size = new long[] { width, height, depth };
final RandomAccessibleInterval img = source.getSource( frame, 0 );
// Get coords
final long x = pos[ 0 ];
final long y = pos[ 1 ];
final long z = pos[ 2 ];
final int xp = width / 2;
final int xm = width - xp;
final int yp = height / 2;
final int ym = height - yp;
final int zp = depth / 2;
final int zm = depth - zp;
// Crop
final Interval cropInterval = Intervals.createMinMax( x - xm, y - ym, z - zm, x + xp, y + yp, z + zp );
if ( isEmpty( cropInterval ) )
{
final Img ret = new ArrayImgFactory().create( size, ntype );
return ret;
}
else
{
final ExtendedRandomAccessibleInterval extendZero = Views.extendZero( img );
final IntervalView crop = Views.zeroMin( Views.interval( extendZero, cropInterval ) );
final Img target = Util.getArrayOrCellImgFactory( crop, ntype ).create( size, ntype );
final RandomAccess randomAccess = crop.randomAccess();
final Cursor cursor = target.localizingCursor();
while ( cursor.hasNext() )
{
cursor.fwd();
randomAccess.setPosition( cursor );
( ( Type ) cursor.get() ).set( ( Type ) randomAccess.get() );
}
return target;
}
}
开发者ID:fiji,项目名称:MaMuT,代码行数:55,代码来源:MamutUtils.java
示例14: CompositeProjectorFactory
import bdv.viewer.Source; //导入依赖的package包/类
/**
* Constructor with a map that associates sources and {@link Composite Composites}.
*
* @param composites
*/
public CompositeProjectorFactory( final Map< Source< ? extends A >, Composite< A, A > > composites )
{
this.composites = composites;
}
开发者ID:saalfeldlab,项目名称:bigcat,代码行数:10,代码来源:CompositeProjector.java
注:本文中的bdv.viewer.Source类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论