本文整理汇总了Java中mpicbg.spim.data.generic.sequence.AbstractSequenceDescription类的典型用法代码示例。如果您正苦于以下问题:Java AbstractSequenceDescription类的具体用法?Java AbstractSequenceDescription怎么用?Java AbstractSequenceDescription使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AbstractSequenceDescription类属于mpicbg.spim.data.generic.sequence包,在下文中一共展示了AbstractSequenceDescription类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: aggregate
import mpicbg.spim.data.generic.sequence.AbstractSequenceDescription; //导入依赖的package包/类
public <T extends RealType<T>> RandomAccessibleInterval< T > aggregate(
List<RandomAccessibleInterval< T >> rais,
List<? extends ViewId> vids,
AbstractSequenceDescription< ?, ? extends BasicViewDescription< ? >, ? > sd
)
{
Map<BasicViewDescription< ? >, RandomAccessibleInterval<T>> map = new HashMap<>();
for (int i = 0; i < vids.size(); i++)
{
ViewId vid = vids.get( i );
BasicViewDescription< ? > vd = sd.getViewDescriptions().get( vid );
map.put( vd, rais.get( i ) );
}
for (Action< ? > action : actions)
{
map = action.aggregate( map );
}
// return the first RAI still present
// ideally, there should be only one left
return map.values().iterator().next();
}
示例2: fromXml
import mpicbg.spim.data.generic.sequence.AbstractSequenceDescription; //导入依赖的package包/类
@Override
public LabelblkImageLoader fromXml( final Element elem, final File basePath, final AbstractSequenceDescription< ?, ?, ? > sequenceDescription )
{
final String apiUrl = elem.getChildText( "apiUrl" );
final String nodeId = elem.getChildText( "nodeId" );
final String dataInstanceId = elem.getChildText( "dataInstanceId" );
try
{
return new LabelblkImageLoader( apiUrl, nodeId, dataInstanceId );
}
catch ( Exception e )
{
e.printStackTrace();
return null;
}
}
示例3: fromXml
import mpicbg.spim.data.generic.sequence.AbstractSequenceDescription; //导入依赖的package包/类
@Override
public DvidMultiscale2dImageLoader fromXml( final Element elem, final File basePath, final AbstractSequenceDescription< ?, ?, ? > sequenceDescription )
{
final String apiUrl = elem.getChildText( "apiUrl" );
final String nodeId = elem.getChildText( "nodeId" );
final String dataInstanceId = elem.getChildText( "dataInstanceId" );
try
{
return new DvidMultiscale2dImageLoader( apiUrl, nodeId, dataInstanceId );
}
catch ( Exception e )
{
e.printStackTrace();
return null;
}
}
示例4: fromXml
import mpicbg.spim.data.generic.sequence.AbstractSequenceDescription; //导入依赖的package包/类
@Override
public Uint8blkImageLoader fromXml( final Element elem, final File basePath, final AbstractSequenceDescription< ?, ?, ? > sequenceDescription )
{
final String apiUrl = elem.getChildText( "apiUrl" );
final String nodeId = elem.getChildText( "nodeId" );
final String dataInstanceId = elem.getChildText( "dataInstanceId" );
try
{
return new Uint8blkImageLoader( apiUrl, nodeId, dataInstanceId );
}
catch ( final Exception e )
{
e.printStackTrace();
return null;
}
}
示例5: initSetupsARGBTypeNonVolatile
import mpicbg.spim.data.generic.sequence.AbstractSequenceDescription; //导入依赖的package包/类
private static void initSetupsARGBTypeNonVolatile(
final AbstractSpimData< ? > spimData,
final ARGBType type,
final List< ConverterSetup > converterSetups,
final List< SourceAndConverter< ? > > sources )
{
final AbstractSequenceDescription< ?, ?, ? > seq = spimData.getSequenceDescription();
for ( final BasicViewSetup setup : seq.getViewSetupsOrdered() )
{
final ScaledARGBConverter.ARGB converter = new ScaledARGBConverter.ARGB( 0, 255 );
final int setupId = setup.getId();
final String setupName = createSetupName( setup );
final SpimSource< ARGBType > s = new SpimSource< ARGBType >( spimData, setupId, setupName );
// Decorate each source with an extra transformation, that can be
// edited manually in this viewer.
final TransformedSource< ARGBType > ts = new TransformedSource< ARGBType >( s );
final SourceAndConverter< ARGBType > soc = new SourceAndConverter< ARGBType >( ts, converter );
sources.add( soc );
converterSetups.add( new RealARGBColorConverterSetup( setupId, converter ) );
}
}
示例6: createBigWarpData
import mpicbg.spim.data.generic.sequence.AbstractSequenceDescription; //导入依赖的package包/类
/**
* Create {@link BigWarpData} from two {@link AbstractSpimData}.
*
* @param spimDataP array of moving SpimData
* @param spimDataQ array of fixed SpimData
* @return BigWarpData
*/
public static BigWarpData createBigWarpData( final AbstractSpimData< ? > spimDataP, final AbstractSpimData< ? > spimDataQ )
{
final AbstractSequenceDescription< ?, ?, ? > seqP = spimDataP.getSequenceDescription();
final AbstractSequenceDescription< ?, ?, ? > seqQ = spimDataQ.getSequenceDescription();
final ArrayList< ConverterSetup > converterSetups = new ArrayList< ConverterSetup >();
final ArrayList< SourceAndConverter< ? > > sources = new ArrayList< SourceAndConverter< ? > >();
BigWarpInit.initSetups( spimDataP, converterSetups, sources );
int numMovingSources = seqP.getViewSetups().size();
int numTargetSources = seqQ.getViewSetups().size();
int[] movingSourceIndices = ImagePlusLoader.range( 0, numMovingSources );
int[] targetSourceIndices = ImagePlusLoader.range( numMovingSources, numTargetSources );
/* Load the second source */
BigWarpInit.initSetups( spimDataQ, converterSetups, sources );
return new BigWarpData( sources, seqP, seqQ, converterSetups, movingSourceIndices, targetSourceIndices );
}
示例7: writeXML
import mpicbg.spim.data.generic.sequence.AbstractSequenceDescription; //导入依赖的package包/类
public static < T extends AbstractSpimData< A >, A extends AbstractSequenceDescription< ?, ?, ? super ImgLoader > > void writeXML(
final T spimData,
final XmlIoAbstractSpimData< A, T > io,
final Parameters params,
final ProgressWriter progressWriter )
throws SpimDataException
{
final A seq = spimData.getSequenceDescription();
final ArrayList< Partition > partitions = getPartitions( spimData, params );
final Hdf5ImageLoader hdf5Loader = new Hdf5ImageLoader( params.hdf5File, partitions, null, false );
seq.setImgLoader( hdf5Loader );
spimData.setBasePath( params.seqFile.getParentFile() );
try
{
if ( !params.onlyRunSingleJob || params.jobId == 0 )
io.save( spimData, params.seqFile.getAbsolutePath() );
progressWriter.setProgress( 1.0 );
}
catch ( final Exception e )
{
progressWriter.err().println( "Failed to write xml file " + params.seqFile );
e.printStackTrace( progressWriter.err() );
}
progressWriter.out().println( "done" );
}
示例8: LegacyStackImgLoader
import mpicbg.spim.data.generic.sequence.AbstractSequenceDescription; //导入依赖的package包/类
/**
* For a local initialization without the XML
*
* @param path
* @param fileNamePattern
* @param imgFactory
* @param layoutTP - 0 == one, 1 == one per file, 2 == all in one file
* @param layoutChannels - 0 == one, 1 == one per file, 2 == all in one file
* @param layoutIllum - 0 == one, 1 == one per file, 2 == all in one file
* @param layoutAngles - 0 == one, 1 == one per file, 2 == all in one file
*/
public LegacyStackImgLoader(
final File path, final String fileNamePattern, final ImgFactory< ? extends NativeType< ? > > imgFactory,
final int layoutTP, final int layoutChannels, final int layoutIllum, final int layoutAngles,
final AbstractSequenceDescription< ?, ?, ? > sequenceDescription )
{
super();
this.path = path;
this.fileNamePattern = fileNamePattern;
this.layoutTP = layoutTP;
this.layoutChannels = layoutChannels;
this.layoutIllum = layoutIllum;
this.layoutAngles = layoutAngles;
this.sequenceDescription = sequenceDescription;
this.init( imgFactory );
}
示例9: fromXml
import mpicbg.spim.data.generic.sequence.AbstractSequenceDescription; //导入依赖的package包/类
@Override
public MicroManagerImgLoader fromXml(
final Element elem, File basePath,
final AbstractSequenceDescription<?, ?, ?> sequenceDescription )
{
try
{
final File path = loadPath( elem, DIRECTORY_TAG, basePath );
final String masterFile = XmlHelpers.getText( elem, MASTER_FILE_TAG );
final String container = XmlHelpers.getText( elem, IMGLIB2CONTAINER_PATTERN_TAG );
if ( container == null )
System.out.println( "WARNING: No Img implementation defined in XML, using ArrayImg." );
else if ( !container.toLowerCase().contains( "arrayimg" ) )
System.out.println( "WARNING: Only ArrayImg supported for MicroManager ImgLoader, using ArrayImg." );
return new MicroManagerImgLoader( new File( path, masterFile ), sequenceDescription );
}
catch ( final Exception e )
{
throw new RuntimeException( e );
}
}
示例10: LegacyDHMImgLoader
import mpicbg.spim.data.generic.sequence.AbstractSequenceDescription; //导入依赖的package包/类
public LegacyDHMImgLoader(
final File directory,
final String stackDir,
final String amplitudeDir,
final String phaseDir,
final List< String > timepoints,
final List< String > zPlanes,
final String extension,
final int ampChannelId,
final int phaseChannelId,
final AbstractSequenceDescription< ? extends BasicViewSetup, ? extends BasicViewDescription< ? >, ? > sd )
{
this.directory = directory;
this.stackDir = stackDir;
this.amplitudeDir = amplitudeDir;
this.phaseDir = phaseDir;
this.timepoints = timepoints;
this.zPlanes = zPlanes;
this.extension = extension;
this.ampChannelId = ampChannelId;
this.phaseChannelId = phaseChannelId;
this.sd = sd;
}
示例11: filterNonOverlappingPairs
import mpicbg.spim.data.generic.sequence.AbstractSequenceDescription; //导入依赖的package包/类
/**
*
* @param pairs list of potentially overlapping pairs of view groups, this will be modified!
* @param vrs the view registrations
* @param sd the sequence description
* @param <V> view id type
* @return list of the pairs that were removed
*/
public static <V extends ViewId> List< Pair< Group< V >, Group< V > > > filterNonOverlappingPairs(
List< Pair< Group< V >, Group< V > > > pairs,
final ViewRegistrations vrs,
final AbstractSequenceDescription< ?, ? extends BasicViewDescription< ? >, ? > sd
)
{
final List< Pair< Group< V >, Group< V > > > removedPairs = new ArrayList<>();
for (int i = pairs.size() - 1; i >= 0; i--)
{
final List<Set<V>> pairAsGroups = new ArrayList<>();
pairAsGroups.add( pairs.get( i ).getA().getViews() );
pairAsGroups.add( pairs.get( i ).getB().getViews() );
final BoundingBoxMaximalGroupOverlap< V > ibbd = new BoundingBoxMaximalGroupOverlap< V >(pairAsGroups, sd, vrs);
BoundingBox bb = ibbd.estimate( "max overlap" );
if (bb == null)
{
removedPairs.add( pairs.get( i ) );
pairs.remove( i );
}
}
return removedPairs;
}
示例12: ExecuteGlobalOpt
import mpicbg.spim.data.generic.sequence.AbstractSequenceDescription; //导入依赖的package包/类
public ExecuteGlobalOpt(
final ExplorerWindow< ? extends AbstractSpimData< ? extends AbstractSequenceDescription< ?, ?, ? > >, ? > panel,
final boolean expertMode )
{
this.panel = panel;
this.expertMode = expertMode;
}
示例13: setExplorerWindow
import mpicbg.spim.data.generic.sequence.AbstractSequenceDescription; //导入依赖的package包/类
@Override
public JComponent setExplorerWindow(
ExplorerWindow< ? extends AbstractSpimData< ? extends AbstractSequenceDescription< ?, ?, ? > >, ? > panel)
{
this.panel = panel;
simpleOptimize.setExplorerWindow( panel );
expertOptimize.setExplorerWindow( panel );
return this;
}
示例14: setExplorerWindow
import mpicbg.spim.data.generic.sequence.AbstractSequenceDescription; //导入依赖的package包/类
@Override
public JComponent setExplorerWindow(
ExplorerWindow< ? extends AbstractSpimData< ? extends AbstractSequenceDescription< ?, ?, ? > >, ? > panel)
{
this.panel = panel;
return this;
}
示例15: setExplorerWindow
import mpicbg.spim.data.generic.sequence.AbstractSequenceDescription; //导入依赖的package包/类
@Override
public JComponent setExplorerWindow(
ExplorerWindow< ? extends AbstractSpimData< ? extends AbstractSequenceDescription< ?, ?, ? > >, ? > panel)
{
this.panel = (FilteredAndGroupedExplorerPanel< ?, ? >)panel;
return this;
}