@Override public double[][] getMipmapResolutions() { return wrappedImgLoader.getSetupImgLoader( setupId ).getMipmapResolutions(); }
public static int findLowestResolutionLevel( final MultiResolutionImgLoader mrImgLoader, final ViewId view ) { final double[][] mipmapResolutions = mrImgLoader.getSetupImgLoader( view.getViewSetupId() ).getMipmapResolutions(); int maxMul = Integer.MIN_VALUE; int bestLevel = -1; for ( int i = 0; i < mipmapResolutions.length; ++i ) { int mul = 1; for ( int d = 0; d < mipmapResolutions[ i ].length; ++d ) mul *= mipmapResolutions[ i ][ d ]; if ( mul > maxMul ) { maxMul = mul; bestLevel = i; } } return bestLevel; }
public static String[] availableDownsamplings( final AbstractSpimData< ? > data, final ViewId viewId ) { final String[] dsStrings; if (MultiResolutionImgLoader.class.isInstance( data.getSequenceDescription().getImgLoader() )) { final MultiResolutionImgLoader mrImgLoader = (MultiResolutionImgLoader) data.getSequenceDescription().getImgLoader(); final double[][] mipmapResolutions = mrImgLoader.getSetupImgLoader( viewId.getViewSetupId()).getMipmapResolutions(); dsStrings = new String[mipmapResolutions.length]; for (int i = 0; i<mipmapResolutions.length; i++) { final String fx = ((Long)Math.round( mipmapResolutions[i][0] )).toString(); final String fy = ((Long)Math.round( mipmapResolutions[i][1] )).toString(); final String fz = ((Long)Math.round( mipmapResolutions[i][2] )).toString(); final String dsString = String.join( ", ", fx, fy, fz ); dsStrings[i] = dsString; } } else { dsStrings = new String[]{ "1, 1, 1" }; } return dsStrings; }
public static RandomAccessibleInterval< FloatType > openAtLowestLevelFloat( final ImgLoader imgLoader, final ViewId view, final AffineTransform3D t ) { final RandomAccessibleInterval< FloatType > input; if ( MultiResolutionImgLoader.class.isInstance( imgLoader ) ) { final MultiResolutionImgLoader mrImgLoader = ( MultiResolutionImgLoader ) imgLoader; final double[][] mipmapResolutions = mrImgLoader.getSetupImgLoader( view.getViewSetupId() ).getMipmapResolutions(); final int bestLevel = findLowestResolutionLevel( mrImgLoader, view ); IOFunctions.println( "(" + new Date(System.currentTimeMillis()) + "): Loading level " + Util.printCoordinates( mipmapResolutions[ bestLevel ] ) ); input = mrImgLoader.getSetupImgLoader( view.getViewSetupId() ).getFloatImage( view.getTimePointId(), bestLevel, false ); if ( t != null ) t.set( mrImgLoader.getSetupImgLoader( view.getViewSetupId() ).getMipmapTransforms()[ bestLevel ] ); } else { IOFunctions.println( "(" + new Date(System.currentTimeMillis()) + "): Loading full-resolution images :( " ); input = imgLoader.getSetupImgLoader( view.getViewSetupId() ).getFloatImage( view.getTimePointId(), false ); if ( t != null ) t.identity(); } return input; }
public static RandomAccessibleInterval openAtLowestLevel( final ImgLoader imgLoader, final ViewId view, final AffineTransform3D t ) { final RandomAccessibleInterval input; if ( MultiResolutionImgLoader.class.isInstance( imgLoader ) ) { final MultiResolutionImgLoader mrImgLoader = ( MultiResolutionImgLoader ) imgLoader; final double[][] mipmapResolutions = mrImgLoader.getSetupImgLoader( view.getViewSetupId() ).getMipmapResolutions(); final int bestLevel = findLowestResolutionLevel( mrImgLoader, view ); IOFunctions.println( "(" + new Date(System.currentTimeMillis()) + "): Loading level " + Util.printCoordinates( mipmapResolutions[ bestLevel ] ) ); input = mrImgLoader.getSetupImgLoader( view.getViewSetupId() ).getImage( view.getTimePointId(), bestLevel ); if ( t != null ) t.set( mrImgLoader.getSetupImgLoader( view.getViewSetupId() ).getMipmapTransforms()[ bestLevel ] ); } else { IOFunctions.println( "(" + new Date(System.currentTimeMillis()) + "): Loading full-resolution images :( " ); input = imgLoader.getSetupImgLoader( view.getViewSetupId() ).getImage( view.getTimePointId() ); if ( t != null ) t.identity(); } return input; }
double[][] mipmapResolutions = mrImgLoader.getSetupImgLoader( vd.getViewSetupId() ).getMipmapResolutions();
final double[][] mipmapResolutions = mrImgLoader.getSetupImgLoader( viewId.getViewSetupId() ).getMipmapResolutions();
final double[] dsD = wrpSetupIL.getMipmapResolutions()[level]; for ( int d = 0; d < n; d++ )
final double[] dsD = wrpSetupIL.getMipmapResolutions()[level]; for ( int d = 0; d < n; d++ )