Skip to content

Commit

Permalink
fix InterestPointsN5
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanPreibisch committed Sep 4, 2024
1 parent 09d1397 commit 72b8c45
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,9 @@

import org.janelia.saalfeldlab.n5.DataType;
import org.janelia.saalfeldlab.n5.GzipCompression;
import org.janelia.saalfeldlab.n5.N5FSReader;
import org.janelia.saalfeldlab.n5.N5FSWriter;
import org.janelia.saalfeldlab.n5.N5Reader;
import org.janelia.saalfeldlab.n5.N5Writer;
import org.janelia.saalfeldlab.n5.imglib2.N5Utils;
import org.janelia.saalfeldlab.n5.universe.N5Factory;
import org.janelia.saalfeldlab.n5.universe.N5Factory.StorageFormat;

import mpicbg.spim.data.sequence.ViewId;
Expand Down Expand Up @@ -223,6 +220,8 @@ public boolean saveInterestPoints( final boolean forceWrite )
n5Writer.close();

IOFunctions.println( "Saved: " + URITools.appendName( baseDir, baseN5 ) + "/" + dataset );

modifiedInterestPoints = false;
}
catch (Exception e)
{
Expand Down Expand Up @@ -347,6 +346,8 @@ else if ( x == 1 )
IOFunctions.println( "Saved: " + URITools.appendName( baseDir, baseN5 ) + "/" + dataset );

n5Writer.close();

modifiedCorrespondingInterestPoints = false;
}
catch (Exception e)
{
Expand Down Expand Up @@ -384,6 +385,8 @@ protected boolean loadInterestPoints()
String version = n5.getAttribute(dataset, "pointcloud", String.class );
String type = n5.getAttribute(dataset, "type", String.class );

System.out.println( "Version: " + version + ", type: " + type );

if ( !type.equals("list") )
{
IOFunctions.println( "unsupported point cloud type: " + type );
Expand Down Expand Up @@ -489,9 +492,11 @@ protected boolean loadCorrespondences()
}

final String version = n5.getAttribute(dataset, "correspondences", String.class );

@SuppressWarnings("unchecked")
final Map< String, Long > idMap = n5.getAttribute(dataset, "idMap", Map.class ); // to store ID (viewId.getTimePointId() + "," + viewId.getViewSetupId() + "," + label)

System.out.println( version + ", " + idMap.size() + " correspondence codes" );
System.out.println( "Version: " + version + ", " + idMap.size() + " correspondence codes" );

if ( idMap.size() == 0 )
{
Expand Down

0 comments on commit 72b8c45

Please sign in to comment.