Commit ab592b44 authored by Tobias Pietzsch's avatar Tobias Pietzsch
Browse files

fix uses of deprecated bigdataviewer and imglib2 API

parent c67b9af0
......@@ -150,7 +150,9 @@ public class BigDataBrowserPlugIn implements PlugIn
System.out.println( key );
try
{
BigDataViewer.view( datasetUrlMap.get( key ), new ProgressWriterIJ() );
final String filename = datasetUrlMap.get( key );
final String title = new File( filename ).getName();
BigDataViewer.open( filename, title, new ProgressWriterIJ(), ViewerOptions.options() );
}
catch ( final SpimDataException e )
{
......
package bdv.ij;
import ij.Prefs;
import ij.plugin.PlugIn;
import java.awt.FileDialog;
import java.awt.Frame;
import java.io.File;
......@@ -15,6 +12,9 @@ import javax.swing.filechooser.FileFilter;
import bdv.BigDataViewer;
import bdv.ij.util.ProgressWriterIJ;
import bdv.viewer.ViewerOptions;
import ij.Prefs;
import ij.plugin.PlugIn;
public class BigDataViewerPlugIn implements PlugIn
{
......@@ -105,7 +105,7 @@ public class BigDataViewerPlugIn implements PlugIn
try
{
lastDatasetPath = file.getAbsolutePath();
BigDataViewer.view( file.getAbsolutePath(), new ProgressWriterIJ() );
BigDataViewer.open( file.getAbsolutePath(), file.getName(), new ProgressWriterIJ(), ViewerOptions.options() );
}
catch ( final Exception e )
{
......
package bdv.ij;
import ij.ImageJ;
import ij.Prefs;
import ij.plugin.PlugIn;
import java.awt.FileDialog;
import java.awt.Frame;
import java.io.File;
......@@ -18,6 +14,10 @@ import bdv.BigDataViewer;
import bdv.ij.util.ProgressWriterIJ;
import bdv.img.imaris.Imaris;
import bdv.spimdata.SpimDataMinimal;
import bdv.viewer.ViewerOptions;
import ij.ImageJ;
import ij.Prefs;
import ij.plugin.PlugIn;
public class OpenImarisPlugIn implements PlugIn
{
......@@ -114,7 +114,7 @@ public class OpenImarisPlugIn implements PlugIn
{
lastDatasetPath = file.getAbsolutePath();
final SpimDataMinimal spimData = Imaris.openIms( file.getAbsolutePath() );
new BigDataViewer( spimData, file.getName(), new ProgressWriterIJ() );
BigDataViewer.open( spimData, file.getName(), new ProgressWriterIJ(), ViewerOptions.options() );
}
catch ( final IOException e )
{
......
......@@ -328,8 +328,13 @@ public class SpimRegistrationSequence
else
imgD = conf.cropSizeZ/scale;
// TODO: this should be a RealInterval
return FinalRealInterval.createMinSize( ( int ) min.x + cropOffsetX, (int ) min.y + cropOffsetY, ( int ) min.z + cropOffsetZ, imgW, imgH, imgD );
return FinalRealInterval.createMinMax(
( int ) min.x + cropOffsetX,
( int ) min.y + cropOffsetY,
( int ) min.z + cropOffsetZ,
( int ) min.x + cropOffsetX + imgW - 1,
( int ) min.y + cropOffsetY + imgH - 1,
( int ) min.z + cropOffsetZ + imgD - 1 );
}
protected static ViewRegistrations createViewRegistrations( final SPIMConfiguration conf, final ArrayList< ViewSetup > setups )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment