本文整理汇总了Java中mpicbg.spim.data.generic.sequence.BasicViewSetup类的典型用法代码示例。如果您正苦于以下问题:Java BasicViewSetup类的具体用法?Java BasicViewSetup怎么用?Java BasicViewSetup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BasicViewSetup类属于mpicbg.spim.data.generic.sequence包,在下文中一共展示了BasicViewSetup类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getComparisons
import mpicbg.spim.data.generic.sequence.BasicViewSetup; //导入依赖的package包/类
public List<Pair<? extends Group< ? extends BasicViewDescription< ? extends BasicViewSetup > >, ? extends Group< ? extends BasicViewDescription< ? extends BasicViewSetup >>>> getComparisons()
{
final List<Pair<? extends Group< ? extends BasicViewDescription< ? extends BasicViewSetup > >, ? extends Group< ? extends BasicViewDescription< ? extends BasicViewSetup >>>> res = new ArrayList<>();
// filter first
final List<BasicViewDescription< ? > > ungroupedElements =
SpimDataTools.getFilteredViewDescriptions( data.getSequenceDescription(), filters);
// then group
final List< Group< BasicViewDescription< ? > >> groupedElements =
Group.combineBy(ungroupedElements, groupingFactors);
// go through possible group pairs
for (int i = 0; i < groupedElements.size(); ++i)
for(int j = i+1; j < groupedElements.size(); ++j)
{
// we will want to process the pair if:
// the groups do not differ along an axis along which we want to treat elements individually (e.g. Angle)
// but they differ along an axis that we want to register (e.g Tile)
if (!groupsDifferByAny( groupedElements.get( i ), groupedElements.get( j ), axesOfApplication )
&& groupsDifferByAny( groupedElements.get( i ), groupedElements.get( j ), axesOfComparison ))
res.add(new ValuePair<>(groupedElements.get( i ), groupedElements.get( j )));
}
return res;
}
开发者ID:PreibischLab,项目名称:BigStitcher,代码行数:25,代码来源:SpimDataFilteringAndGrouping.java
示例2: askUserForFiltering
import mpicbg.spim.data.generic.sequence.BasicViewSetup; //导入依赖的package包/类
public SpimDataFilteringAndGrouping< AS> askUserForFiltering(FilteredAndGroupedExplorerPanel< AS, ?> panel)
{
List< BasicViewDescription< ? extends BasicViewSetup > > views;
if (panel instanceof GroupedRowWindow)
{
Collection< List< BasicViewDescription< ? extends BasicViewSetup > > > selectedRowsGroups = ((GroupedRowWindow)panel).selectedRowsGroups();
views = selectedRowsGroups.stream().reduce( new ArrayList<>(), (x, y) -> {x.addAll(y); return x;} );
}
else
views = panel.selectedRows();
SpimDataFilteringAndGrouping< AS > res = askUserForFiltering( views );
return res;
}
开发者ID:PreibischLab,项目名称:BigStitcher,代码行数:17,代码来源:SpimDataFilteringAndGrouping.java
示例3: askUserForGrouping
import mpicbg.spim.data.generic.sequence.BasicViewSetup; //导入依赖的package包/类
public SpimDataFilteringAndGrouping< AS> askUserForGrouping( FilteredAndGroupedExplorerPanel< AS, ?> panel)
{
List< BasicViewDescription< ? extends BasicViewSetup > > views;
if (panel instanceof GroupedRowWindow)
{
Collection< List< BasicViewDescription< ? extends BasicViewSetup > > > selectedRowsGroups = ((GroupedRowWindow)panel).selectedRowsGroups();
views = selectedRowsGroups.stream().reduce( new ArrayList<>(), (x, y) -> {x.addAll(y); return x;} );
}
else
views = panel.selectedRows();
final HashSet< Class<? extends Entity> > comparisonsRequested = new HashSet<>();
if (StitchingExplorerPanel.class.isInstance( panel ) )
{
if (!panel.channelsGrouped())
comparisonsRequested.add( Channel.class );
if (!panel.illumsGrouped())
comparisonsRequested.add( Illumination.class );
if (!panel.tilesGrouped())
comparisonsRequested.add( Tile.class );
}
return askUserForGrouping( views, panel.getTableModel().getGroupingFactors(), comparisonsRequested);
}
开发者ID:PreibischLab,项目名称:BigStitcher,代码行数:25,代码来源:SpimDataFilteringAndGrouping.java
示例4: selectedViewDescriptions
import mpicbg.spim.data.generic.sequence.BasicViewSetup; //导入依赖的package包/类
@Override
public void selectedViewDescriptions(
List< List< BasicViewDescription< ? extends BasicViewSetup > > > viewDescriptions)
{
//System.out.println( " selection upd " );
selectedVDs = viewDescriptions;
// sort the selected groups by the view id of the first member
Collections.sort( selectedVDs, (x, y) -> x.get( 0 ).compareTo( y.get( 0 ) ) );
// hacky solution, wait a bit with update since parent will reset BDV after selection change
new Timer().schedule(new TimerTask()
{
public void run()
{
update();
}
}, 100 );
}
开发者ID:PreibischLab,项目名称:BigStitcher,代码行数:23,代码来源:PreviewRegularGridPanel.java
示例5: selectedViewDescriptions
import mpicbg.spim.data.generic.sequence.BasicViewSetup; //导入依赖的package包/类
@Override
public void selectedViewDescriptions(
List< List< BasicViewDescription< ? extends BasicViewSetup > > > viewDescriptions)
{
List<Pair<Group<ViewId>, Group<ViewId>>> res = new ArrayList<>();
for (int i = 0; i<viewDescriptions.size(); i++)
for (int j = i+1; j<viewDescriptions.size(); j++)
{
Group<ViewId> groupA = new Group<>();
groupA.getViews().addAll( viewDescriptions.get( i ) );
Group<ViewId> groupB = new Group<>();
groupB.getViews().addAll( viewDescriptions.get( j ) );
res.add( new ValuePair< Group<ViewId>, Group<ViewId> >( groupA, groupB ) );
}
setActiveLinks( res );
}
开发者ID:PreibischLab,项目名称:BigStitcher,代码行数:18,代码来源:DemoLinkOverlay.java
示例6: elements
import mpicbg.spim.data.generic.sequence.BasicViewSetup; //导入依赖的package包/类
protected ArrayList< BasicViewDescription< ? extends BasicViewSetup > > elements()
{
final ArrayList< BasicViewDescription< ? extends BasicViewSetup > > elementsNew = new ArrayList< BasicViewDescription< ? extends BasicViewSetup > >();
for ( final TimePoint t : panel.getSpimData().getSequenceDescription().getTimePoints().getTimePointsOrdered() )
for ( final BasicViewSetup v : panel.getSpimData().getSequenceDescription().getViewSetupsOrdered() )
{
final ViewId viewId = new ViewId( t.getId(), v.getId() );
final BasicViewDescription< ? > viewDesc = panel.getSpimData().getSequenceDescription().getViewDescriptions().get( viewId );
if ( viewDesc.isPresent() )
elementsNew.add( viewDesc );
}
if ( this.elements == null || this.elements.size() != elementsNew.size() )
this.elements = elementsNew;
return elements;
}
开发者ID:PreibischLab,项目名称:BigStitcher,代码行数:20,代码来源:StitchingExplorerTableModel.java
示例7: getValueAt
import mpicbg.spim.data.generic.sequence.BasicViewSetup; //导入依赖的package包/类
@Override
public Object getValueAt( final int row, final int column )
{
final BasicViewDescription< ? extends BasicViewSetup > vd = elements().get( row );
if ( column == 0 )
return vd.getTimePoint().getId();
else if ( column == 1 )
return vd.getViewSetupId();
else
{
final Entity e = vd.getViewSetup().getAttributes().get( columnNames.get( column ) );
if ( e instanceof NamedEntity )
return ((NamedEntity)e).getName() + " (id = " + e.getId() + ")";
else
return e.getId() + " (no name available)";
}
}
开发者ID:PreibischLab,项目名称:BigStitcher,代码行数:20,代码来源:StitchingExplorerTableModel.java
示例8: createSetupName
import mpicbg.spim.data.generic.sequence.BasicViewSetup; //导入依赖的package包/类
private static String createSetupName( final BasicViewSetup setup )
{
if ( setup.hasName() )
return setup.getName();
String name = "";
final Angle angle = setup.getAttribute( Angle.class );
if ( angle != null )
name += ( name.isEmpty() ? "" : " " ) + "a " + angle.getName();
final Channel channel = setup.getAttribute( Channel.class );
if ( channel != null )
name += ( name.isEmpty() ? "" : " " ) + "c " + channel.getName();
return name;
}
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:18,代码来源:BigWarpInit.java
示例9: initSetupsARGBTypeNonVolatile
import mpicbg.spim.data.generic.sequence.BasicViewSetup; //导入依赖的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 ) );
}
}
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:25,代码来源:BigWarpInit.java
示例10: updateProposedMipmaps
import mpicbg.spim.data.generic.sequence.BasicViewSetup; //导入依赖的package包/类
protected boolean updateProposedMipmaps( final String fusionDirectory, final SPIMConfiguration conf )
{
final Pair< String, Integer > pair = detectPatternAndNumSlices( new File ( fusionDirectory ), conf.timepoints[0] );
if ( pair != null )
{
final String filenamePattern = pair.getA();
final int numSlices = pair.getB();
final String fn = fusionDirectory + "/" + String.format( filenamePattern, conf.timepoints[0], conf.channels[0], 0 );
final ImagePlus imp = new ImagePlus( fn );
final int width = imp.getWidth();
final int height = imp.getHeight();
imp.close();
final Dimensions size = new FinalDimensions( new int[] { width, height, numSlices } );
final VoxelDimensions voxelSize = new FinalVoxelDimensions( "px", 1, 1, 1 );
final ExportMipmapInfo info = ProposeMipmaps.proposeMipmaps( new BasicViewSetup( 0, "", size, voxelSize ) );
autoSubsampling = ProposeMipmaps.getArrayString( info.getExportResolutions() );
autoChunkSizes = ProposeMipmaps.getArrayString( info.getSubdivisions() );
return true;
}
else
return false;
}
开发者ID:bigdataviewer,项目名称:bigdataviewer_fiji,代码行数:23,代码来源:ExportSpimFusionPlugIn.java
示例11: fix
import mpicbg.spim.data.generic.sequence.BasicViewSetup; //导入依赖的package包/类
public static void fix( final String xmlFilename ) throws SpimDataException, IOException
{
final XmlIoSpimDataMinimal spimDataIo = new XmlIoSpimDataMinimal();
final SpimDataMinimal spimData = spimDataIo.load( xmlFilename );
final SequenceDescriptionMinimal seq = spimData.getSequenceDescription();
final Hdf5ImageLoader il = ( Hdf5ImageLoader) seq.getImgLoader();
final String outfn = il.getHdf5File().getCanonicalPath() + "FIXED";
final HashMap< Integer, ExportMipmapInfo > perSetupMipmapInfo = new HashMap<>();
for ( final BasicViewSetup setup : seq.getViewSetupsOrdered() )
{
final int setupId = setup.getId();
final MipmapInfo info = il.getSetupImgLoader( setupId ).getMipmapInfo();
perSetupMipmapInfo.put( setupId, new ExportMipmapInfo(
Util.castToInts( info.getResolutions() ),
info.getSubdivisions() ) );
}
final ArrayList< Partition > partitions = il.getPartitions();
WriteSequenceToHdf5.writeHdf5PartitionLinkFile( seq, perSetupMipmapInfo, partitions, new File( outfn ) );
System.out.println( "fixed hdf5 master file written to " + outfn );
System.out.println( "rename it to " + il.getHdf5File().getCanonicalPath() + " to use it." );
}
开发者ID:bigdataviewer,项目名称:bigdataviewer_fiji,代码行数:23,代码来源:FixAbsolutePathsInHdf5Partitions.java
示例12: create
import mpicbg.spim.data.generic.sequence.BasicViewSetup; //导入依赖的package包/类
public static FusionResult create(
final SpimRegistrationSequence spimseq,
final String filepath,
final String filepattern,
final int numSlices,
final double sliceValueMin,
final double sliceValueMax,
final Map< Integer, AffineTransform3D > perTimePointFusionTransforms )
{
// add one fused ViewSetup per channel in the SpimRegistrationSequence
final List< Integer > channels = new ArrayList<>();
for ( final BasicViewSetup setup : spimseq.getSequenceDescription().getViewSetupsOrdered() )
{
final int channel = setup.getAttribute( Channel.class ).getId();
if ( ! channels.contains( channel ) )
channels.add( channel );
}
final TimePoints timepoints = spimseq.getSequenceDescription().getTimePoints();
return new FusionResult( filepath, filepattern, channels, timepoints, numSlices, sliceValueMin, sliceValueMax, perTimePointFusionTransforms );
}
开发者ID:bigdataviewer,项目名称:bigdataviewer_fiji,代码行数:21,代码来源:FusionResult.java
示例13: FusionResult
import mpicbg.spim.data.generic.sequence.BasicViewSetup; //导入依赖的package包/类
public FusionResult(
final String filepath,
final String filepattern,
final TimePoints timepoints,
final int numSlices,
final double sliceValueMin,
final double sliceValueMax,
final Map< Integer, AffineTransform3D > perTimePointFusionTransforms )
{
final HashMap< Integer, Integer > setupIdToChannelId = new HashMap<>();
setupIdToChannelId.put( 0, 0 );
final ImgLoader fusionLoader = new FusionImageLoader<>( filepath +"/" + filepattern, setupIdToChannelId, numSlices, new FusionImageLoader.Gray32ImagePlusLoader(), sliceValueMin, sliceValueMax );
final int setupId = 0;
final String name = "fused";
final int timepointId = timepoints.getTimePointsOrdered().get( 0 ).getId();
final Dimensions size = fusionLoader.getSetupImgLoader( setupId ).getImageSize( timepointId );
final VoxelDimensions voxelSize = fusionLoader.getSetupImgLoader( setupId ).getVoxelSize( timepointId );
final BasicViewSetup setup = new BasicViewSetup( setupId, name, size, voxelSize );
desc = new SequenceDescriptionMinimal( timepoints, Entity.idMap( Arrays.asList( setup ) ), fusionLoader, null );
final ArrayList< ViewRegistration > registrations = new ArrayList<>();
for ( final TimePoint timepoint : timepoints.getTimePointsOrdered() )
registrations.add( new ViewRegistration( timepoint.getId(), 0, perTimePointFusionTransforms.get( timepoint.getId() ) ) );
regs = new ViewRegistrations( registrations );
}
开发者ID:bigdataviewer,项目名称:bigdataviewer_fiji,代码行数:25,代码来源:FusionResult.java
示例14: createUniqueName
import mpicbg.spim.data.generic.sequence.BasicViewSetup; //导入依赖的package包/类
protected String createUniqueName()
{
long idSum = 1;
for ( final TimePoint t : getTimePointsToProcess() )
idSum *= t.getId();
for ( final BasicViewSetup v : getViewSetupsToProcess() )
idSum += v.getId();
long nano = System.nanoTime();
long millis = System.currentTimeMillis();
long finalHash = nano + millis + idSum;
if ( debugRandomClusterHash )
{
IOFunctions.println( "idsum=" + idSum );
IOFunctions.println( "nano=" + nano );
IOFunctions.println( "millis=" + millis );
IOFunctions.println( "final=" + finalHash );
}
return "" + finalHash;
}
开发者ID:fiji,项目名称:SPIM_Registration,代码行数:25,代码来源:GenericLoadParseQueryXML.java
示例15: getValueAt
import mpicbg.spim.data.generic.sequence.BasicViewSetup; //导入依赖的package包/类
@Override
public Object getValueAt( final int row, final int column )
{
final BasicViewDescription< ? extends BasicViewSetup > vd = elements().get( row );
if ( column == 0 )
return vd.getTimePoint().getId();
else if ( column == 1 )
return vd.getViewSetupId();
else if ( column == registrationColumn )
return this.viewRegistrations.getViewRegistration( vd ).getTransformList().size();
else if ( column == interestPointsColumn && viewInterestPoints != null )
return viewInterestPoints.getViewInterestPointLists( vd ).getHashMap().keySet().size();
else
{
final Entity e = vd.getViewSetup().getAttributes().get( columnNames.get( column ) );
if ( e instanceof NamedEntity )
return ((NamedEntity)e).getName() + " (id = " + e.getId() + ")";
else
return e.getId() + " (no name available)";
}
}
开发者ID:fiji,项目名称:SPIM_Registration,代码行数:24,代码来源:ViewSetupTableModel.java
示例16: LegacyDHMImgLoader
import mpicbg.spim.data.generic.sequence.BasicViewSetup; //导入依赖的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;
}
开发者ID:fiji,项目名称:SPIM_Registration,代码行数:24,代码来源:LegacyDHMImgLoader.java
示例17: getInstancesOfAttribute
import mpicbg.spim.data.generic.sequence.BasicViewSetup; //导入依赖的package包/类
public static Set<Entity> getInstancesOfAttribute(Collection<? extends BasicViewDescription< ? extends BasicViewSetup >> vds, Class<? extends Entity> cl)
{
Set<Entity> res = new HashSet<>();
for (BasicViewDescription< ? extends BasicViewSetup > vd : vds)
if (cl == TimePoint.class)
res.add( vd.getTimePoint() );
else
res.add( vd.getViewSetup().getAttribute( cl ) );
return res;
}
开发者ID:PreibischLab,项目名称:BigStitcher,代码行数:11,代码来源:SpimDataFilteringAndGrouping.java
示例18: selectedViewDescriptions
import mpicbg.spim.data.generic.sequence.BasicViewSetup; //导入依赖的package包/类
@Override
public void selectedViewDescriptions(
List< List< BasicViewDescription< ? extends BasicViewSetup > > > viewDescriptions)
{
if (viewDescriptions.size() < 1) // nothing selected
{
setActiveLinks( new ArrayList<>() );
return;
}
// get pairwise results for first (and only) selected view group
final HashSet< ViewId > vid = new HashSet<>( viewDescriptions.iterator().next());
SpimData2.filterMissingViews( parent.getSpimData(), vid );
ArrayList< PairwiseStitchingResult< ViewId > > pairwiseResults = results.getAllPairwiseResultsForViewId( vid );
setActiveLinks( pairwiseResults.stream().map( (p) -> p.pair() ).filter( p -> parent.getSavedFilteringAndGrouping().getComparisons().contains( p )).collect( Collectors.toList() ) );
}
开发者ID:PreibischLab,项目名称:BigStitcher,代码行数:16,代码来源:LinkExplorerPanel.java
示例19: getBDVSourceIndex
import mpicbg.spim.data.generic.sequence.BasicViewSetup; //导入依赖的package包/类
public static int getBDVSourceIndex(final BasicViewSetup vs, final AbstractSpimData< ? > data)
{
final List< ? extends BasicViewSetup > list = data.getSequenceDescription().getViewSetupsOrdered();
for ( int i = 0; i < list.size(); ++i )
if ( list.get( i ).getId() == vs.getId() )
return i;
return 0;
}
开发者ID:PreibischLab,项目名称:BigStitcher,代码行数:11,代码来源:StitchingExplorerPanel.java
示例20: readSetupNames
import mpicbg.spim.data.generic.sequence.BasicViewSetup; //导入依赖的package包/类
protected String[] readSetupNames( final AbstractSequenceDescription< ?, ?, ? > sequenceDescriptionMinimal )
{
final List< ? extends BasicViewSetup > viewSetupsOrdered = sequenceDescriptionMinimal.getViewSetupsOrdered();
final int numViewSetups = viewSetupsOrdered.size();
final String[] angles = new String[ numViewSetups ];
for ( int setup = 0; setup < numViewSetups; setup++ )
{
final Angle angle = viewSetupsOrdered.get( setup ).getAttribute( Angle.class );
angles[ setup ] = "angle " + ( angle == null ? setup : angle.getName() );
}
return angles;
}
开发者ID:fiji,项目名称:MaMuT,代码行数:13,代码来源:LoadTGMMAnnotationPlugIn.java
注:本文中的mpicbg.spim.data.generic.sequence.BasicViewSetup类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论