public static ArrayList< TimePoint > getAllTimePointsSorted( final Collection< ? extends ViewDescription > vds ) { final HashSet< TimePoint > timepointSet = new HashSet< TimePoint >(); for ( final ViewDescription vd : vds ) if ( vd.isPresent() ) timepointSet.add( vd.getTimePoint() ); final ArrayList< TimePoint > timepoints = new ArrayList< TimePoint >(); timepoints.addAll( timepointSet ); Collections.sort( timepoints, new Comparator< TimePoint >() { @Override public int compare( final TimePoint o1, final TimePoint o2 ) { return o1.getId() - o2.getId(); } }); return timepoints; }
public void add( final ViewDescription vd ) { if ( vd == null ) return; this.ts.add( vd.getTimePoint() ); this.cs.add( vd.getViewSetup().getChannel() ); this.is.add( vd.getViewSetup().getIllumination() ); this.as.add( vd.getViewSetup().getAngle() ); this.vds.add( vd ); }
private static final void locationForViewDescription( final int[] l, final ViewDescription vd, final HashMap< TimePoint, Integer > mapT, final HashMap< Channel, Integer > mapC, final HashMap< Illumination, Integer > mapI, final HashMap< Angle, Integer > mapA ) { final TimePoint t = vd.getTimePoint(); final Channel c = vd.getViewSetup().getChannel(); final Illumination i = vd.getViewSetup().getIllumination(); final Angle a = vd.getViewSetup().getAngle(); l[ 0 ] = mapA.get( a ); l[ 1 ] = mapI.get( i ); l[ 2 ] = mapC.get( c ); l[ 3 ] = mapT.get( t ); }
return DisplayImage.getImagePlusInstance( img, false, "tp: " + viewDescription.getTimePoint().getName() + " viewSetup: " + viewDescription.getViewSetupId(), Double.NaN, Double.NaN ); else return DisplayImage.getImagePlusInstance( img, false, "tp: " + viewDescription.getTimePoint().getName() + " viewSetup: " + viewDescription.getViewSetupId(), minIntensity, maxIntensity );
registrations.put( viewId, model ); dimensions.put( viewId, ViewSetupUtils.getSizeOrLoad( viewId.getViewSetup(), viewId.getTimePoint(), spimData.getSequenceDescription().getImgLoader() ) );
TimePoint tpNew = old.getTimePoint(); // stays the same ViewSetup vsNew = null; TimePoint tpNew = old.getTimePoint(); // stays the same ViewSetup vsNew = null;
final String modelDesc = modelLinks.get( vd ).getB(); final TimePoint t = vd.getTimePoint(); final Channel c = vd.getViewSetup().getChannel(); final Illumination i = vd.getViewSetup().getIllumination();
final ViewSetup targetVS = targetVD.getViewSetup(); IOFunctions.println( "Source viewId t=" + sourceVD.getTimePoint().getName() + ", ch=" + sourceVS.getChannel().getName() + ", ill=" + sourceVS.getIllumination().getName() + ", angle=" + sourceVS.getAngle().getName() ); IOFunctions.println( "Target viewId t=" + targetVD.getTimePoint().getName() + ", ch=" + targetVS.getChannel().getName() + ", ill=" + targetVS.getIllumination().getName() + ", angle=" + targetVS.getAngle().getName() );
public static void setModelToCalibration( final SpimData spimData, final ViewId viewId, final double minResolution ) { setModelToIdentity( spimData, viewId ); final ViewRegistrations viewRegistrations = spimData.getViewRegistrations(); final ViewRegistration r = viewRegistrations.getViewRegistration( viewId ); final ViewDescription viewDescription = spimData.getSequenceDescription().getViewDescription( viewId.getTimePointId(), viewId.getViewSetupId() ); VoxelDimensions voxelSize = ViewSetupUtils.getVoxelSizeOrLoad( viewDescription.getViewSetup(), viewDescription.getTimePoint(), spimData.getSequenceDescription().getImgLoader() ); final double calX = voxelSize.dimension( 0 ) / minResolution; final double calY = voxelSize.dimension( 1 ) / minResolution; final double calZ = voxelSize.dimension( 2 ) / minResolution; final AffineTransform3D m = new AffineTransform3D(); m.set( calX, 0.0f, 0.0f, 0.0f, 0.0f, calY, 0.0f, 0.0f, 0.0f, 0.0f, calZ, 0.0f ); final ViewTransform vt = new ViewTransformAffine( "calibration", m ); r.preconcatenateTransform( vt ); }
" timepoint: " + vd.getTimePoint().getName() + " angle: " + vd.getViewSetup().getAngle().getName() + " channel: " + vd.getViewSetup().getChannel().getName() + " timepoint: " + vd.getTimePoint().getName() + " angle: " + vd.getViewSetup().getAngle().getName() + " channel: " + vd.getViewSetup().getChannel().getName() +