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; }
input = mrImgLoader.getSetupImgLoader( vd.getViewSetupId() ).getFloatImage( vd.getTimePointId(), bestLevel, false, LOAD_COMPLETELY ); else input = mrImgLoader.getSetupImgLoader( vd.getViewSetupId() ).getFloatImage( vd.getTimePointId(), bestLevel, false );
public static void main(String[] args) { GenericLoadParseQueryXML< SpimData2, SequenceDescription, ViewSetup, ViewDescription, ImgLoader, XmlIoSpimData2 > lpq = new GenericLoadParseQueryXML<>( new XmlIoSpimData2( "" ) ); lpq.queryXML(); SpimData2 data = lpq.getData(); // this will crash if il is not multires MultiResolutionImgLoader il = (MultiResolutionImgLoader) data.getSequenceDescription().getImgLoader(); MultiResolutionFlatfieldCorrectionWrappedImgLoader ffcil = new MultiResolutionFlatfieldCorrectionWrappedImgLoader( il ); ffcil.setDarkImage( new ViewId( 0, 0 ), new File( "/Users/david/desktop/ff.tif" ) ); data.getSequenceDescription().setImgLoader( ffcil ); new ImageJ(); RandomAccessibleInterval< FloatType > image = ( (MultiResolutionImgLoader) data.getSequenceDescription() .getImgLoader() ).getSetupImgLoader( 0 ).getFloatImage( 0, 1, false ); ImageJFunctions.show( image ); }
return wrpSetupIL.getFloatImage( timepointId, level, normalize, hints );