public static void main(String[] args) { SpimData sd2 = createSpimDataFromUserInput(); RandomAccessibleInterval< UnsignedShortType > img2 = (RandomAccessibleInterval< UnsignedShortType >) sd2.getSequenceDescription().getImgLoader().getSetupImgLoader( 0 ).getImage( 0, null ); ImageJFunctions.show( img2 ); if (true) return; List<double[]> channelShifts = new ArrayList<>(); channelShifts.add( new double[3] ); List<double[]> illumShifts = new ArrayList<>(); illumShifts.add( new double[3] ); List<double[]> timeShifts = new ArrayList<>(); timeShifts.add( new double[3] ); timeShifts.add( new double[3] ); List<double[]> tileShifts = new ArrayList<>(); tileShifts.add( new double[3] ); SpimData sd = createSpimData( 1000, new double[] {1, 1, 3 }, Intervals.createMinMax( 0,0,0,256,256,100 ), Intervals.createMinMax( 0,0,0,256,256,100 ), 1, new double[] {0, 90}, channelShifts, illumShifts, timeShifts, tileShifts , 0.9, true); RandomAccessibleInterval< UnsignedShortType > img = (RandomAccessibleInterval< UnsignedShortType >) sd.getSequenceDescription().getImgLoader().getSetupImgLoader( 0 ).getImage( 1, null ); ImageJFunctions.show( img ); }
@SuppressWarnings({ "unchecked", "rawtypes" }) public static < T extends RealType< T > > RandomAccessibleInterval< T > getImage( final T type, ImgLoader imgLoader, final ViewId view, final boolean normalize ) { if ( (RealType)type instanceof FloatType ) return (RandomAccessibleInterval)imgLoader.getSetupImgLoader( view.getViewSetupId() ).getFloatImage( view.getTimePointId(), normalize, LOAD_COMPLETELY ); else if ( (RealType)type instanceof UnsignedShortType ) return (RandomAccessibleInterval)imgLoader.getSetupImgLoader( view.getViewSetupId() ).getImage( view.getTimePointId(), LOAD_COMPLETELY ); else return null; }
@SuppressWarnings({ "unchecked", "rawtypes" }) public PSFExtraction( final SpimData2 data, final ViewId viewId, final String label, final boolean useCorresponding, final T type, final long[] size, final boolean multithreaded ) { this( (RandomAccessibleInterval)data.getSequenceDescription().getImgLoader().getSetupImgLoader( viewId.getViewSetupId() ).getImage( viewId.getTimePointId() ), getPoints( data, viewId, label, useCorresponding ), type, size, multithreaded ); }
final RandomAccessibleInterval input = imgLoader.getSetupImgLoader( viewId.getViewSetupId() ).getImage( viewId.getTimePointId() );
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; }
continue; final RandomAccessibleInterval img = spimData.getSequenceDescription().getImgLoader().getSetupImgLoader( viewId.getViewSetupId() ).getImage( viewId.getTimePointId(), LOAD_COMPLETELY );
( RandomAccessibleInterval< UnsignedShortType > ) ((ImgLoader)spimData.getSequenceDescription().getImgLoader()).getSetupImgLoader( viewId.getViewSetupId() ).getImage( viewId.getTimePointId() ); export.exportImage( img, name );
(RandomAccessibleInterval< T >) wrappedImgLoader.getSetupImgLoader( setupId ).getImage( timepointId, hints ), getBrightImg( new ViewId( timepointId, setupId ) ),
final RandomAccessibleInterval< UnsignedShortType > img = ( RandomAccessibleInterval< UnsignedShortType > ) spimData.getSequenceDescription().getImgLoader().getSetupImgLoader( vd.getViewSetupId() ).getImage( vd.getTimePointId() ); di.exportImage( img, name ); interval = img;