public static BasicViewDescription< ? > getAnyPresentViewDescriptionForViewSetup(AbstractSequenceDescription< ?, ?, ? > sd, int viewSetupId) { for (final ViewId vid : sd.getViewDescriptions().keySet()) if (vid.getViewSetupId() == viewSetupId) if (!sd.getMissingViews().getMissingViews().contains( vid )) return sd.getViewDescriptions().get( vid ); return null; }
public static List<BasicViewDescription<?>> getFilteredViewDescriptions(AbstractSequenceDescription<?, ?, ?> seq, Map<Class<? extends Entity>, List<? extends Entity>> filters, final boolean filterMissing) { ArrayList<BasicViewDescription<?>> res = new ArrayList<>(); for (BasicViewDescription<?> vd : seq.getViewDescriptions().values()) { if (filterMissing && seq.getMissingViews() != null && seq.getMissingViews().getMissingViews().contains( vd )) continue; boolean matches = true; for (Class<? extends Entity> cl : filters.keySet()) { if (cl.equals(TimePoint.class)) { if (!filters.get(cl).contains(vd.getTimePoint())) matches = false; } else { Entity e = vd.getViewSetup().getAttribute(cl); if (!filters.get(cl).contains(e)) matches = false; } } if (matches) res.add(vd); } return res; }
for ( final ViewId view : m.getMissingViews() ) System.out.println( "Missing: " + view.getTimePointId() + " " + view.getViewSetupId() );
final Set< ViewId > mv = seq.getMissingViews().getMissingViews(); final Set< ViewId > newMv = new HashSet<>(); for ( final ViewId view : mv )
final HashSet< ViewId > missingViews = new HashSet< ViewId >(); if ( oldMissingViews != null && oldMissingViews.getMissingViews() != null ) for ( final ViewId id : oldMissingViews.getMissingViews() ) if ( views.contains( id ) ) missingViews.add( id );
final HashSet< ViewId > missingViews = new HashSet< ViewId >(); if( oldMissingViews != null && oldMissingViews.getMissingViews() != null ) for ( final ViewId id : oldMissingViews.getMissingViews() ) if ( views.contains( id ) ) missingViews.add( id );
if ( data.getSequenceDescription().getMissingViews() != null && data.getSequenceDescription().getMissingViews().getMissingViews() != null && data.getSequenceDescription().getMissingViews().getMissingViews().size() != 0 ) ids.addAll( data.getSequenceDescription().getMissingViews().getMissingViews() ); Collections.sort( ids );
newMissingViews.addAll( m.getMissingViews() ); m = new MissingViews( newMissingViews );
missingViews = seq.getMissingViews() == null ? new HashSet<>() : seq.getMissingViews().getMissingViews(); voxelDimensions = seq.getViewSetups().get( setupId ).getVoxelSize(); numMipmapLevels = ( ( ViewerImgLoader ) seq.getImgLoader() ).getSetupImgLoader( setupId ).numMipmapLevels();