Commit 04413bee authored by Curtis Rueden's avatar Curtis Rueden
Browse files

TEMP: update to SCIFIO 0.38.x

This commit should not be necessary -- at least w.r.t. SCIFIO.
Rather, breaking changes in the SCIFIO API can be restored,
such that this project continues to work as-is.
parent 669b37bf
......@@ -95,6 +95,8 @@
<!-- NB: Deploy releases to the ImageJ Maven repository. -->
<releaseProfiles>deploy-to-imagej</releaseProfiles>
<scifio.version>0.38.0</scifio.version>
</properties>
<repositories>
......
......@@ -90,13 +90,10 @@ public class FusionImageLoader< T extends RealType< T > > implements ImgLoader
final ArrayImgFactory< T > factory;
final T type;
public ArrayImgLoader( final T type )
{
opener = new ImgOpener();
factory = new ArrayImgFactory<>();
this.type = type;
factory = new ArrayImgFactory<>( type );
}
@Override
......@@ -105,7 +102,7 @@ public class FusionImageLoader< T extends RealType< T > > implements ImgLoader
try
{
System.out.println( fn );
return opener.openImgs( fn, factory, type ).get( 0 );
return opener.openImgs( fn, factory ).get( 0 );
}
catch ( final ImgIOException e )
{
......
......@@ -5,6 +5,7 @@ import java.util.HashMap;
import org.scijava.Context;
import org.scijava.app.AppService;
import org.scijava.app.StatusService;
import org.scijava.io.location.FileLocation;
import ij.ImagePlus;
import io.scif.SCIFIOService;
......@@ -40,8 +41,6 @@ public class LegacyStackImageLoader implements LegacyBasicImgLoader< UnsignedSho
private final ArrayImgFactory< UnsignedShortType > factory;
private final UnsignedShortType type;
final HashMap< ViewId, String > filenames;
private boolean useImageJOpener;
......@@ -51,8 +50,7 @@ public class LegacyStackImageLoader implements LegacyBasicImgLoader< UnsignedSho
this.filenames = filenames;
this.useImageJOpener = useImageJOpener;
opener = useImageJOpener ? null : new ImgOpener( new Context( SCIFIOService.class, AppService.class, StatusService.class ) );
factory = new ArrayImgFactory<>();
type = new UnsignedShortType();
factory = new ArrayImgFactory<>( new UnsignedShortType() );
}
@Override
......@@ -87,7 +85,7 @@ public class LegacyStackImageLoader implements LegacyBasicImgLoader< UnsignedSho
try
{
return opener.openImg( fn, factory, type );
return opener.openImgs( new FileLocation( fn ), factory ).get( 0 );
}
catch ( final ImgIOException e )
{
......@@ -98,6 +96,6 @@ public class LegacyStackImageLoader implements LegacyBasicImgLoader< UnsignedSho
@Override
public UnsignedShortType getImageType()
{
return type;
return factory.type();
}
}
Markdown is supported
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