Skip to content

Commit

Permalink
fix: test and opening on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
cmhulbert committed Aug 31, 2023
1 parent 4b692d2 commit bc0da63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/main/kotlin/org/janelia/saalfeldlab/util/n5/N5Helpers.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import org.janelia.saalfeldlab.labels.blocks.LabelBlockLookupAdapter
import org.janelia.saalfeldlab.labels.blocks.n5.LabelBlockLookupFromN5Relative
import org.janelia.saalfeldlab.n5.DatasetAttributes
import org.janelia.saalfeldlab.n5.N5Reader
import org.janelia.saalfeldlab.n5.N5URI
import org.janelia.saalfeldlab.n5.N5Writer
import org.janelia.saalfeldlab.n5.hdf5.N5HDF5Reader
import org.janelia.saalfeldlab.n5.universe.N5DatasetDiscoverer
Expand Down Expand Up @@ -721,8 +722,9 @@ object N5Helpers {
?.takeIf { it.isJsonObject }
?.let { gson.fromJson(it, LabelBlockLookup::class.java) as LabelBlockLookup }
?: let {
val labelToBlockDataset = Paths.get(group, "label-to-block-mapping").toString()
val relativeLookup = LabelBlockLookupFromN5Relative("label-to-block-mapping/s%d")
val labelToBlockDataset = N5URI.normalizeGroupPath(group + reader.groupSeparator + "label-to-block-mapping");
val scaleDatasetPattern = N5URI.normalizeGroupPath("label-to-block-mapping" + reader.groupSeparator + "s%d")
val relativeLookup = LabelBlockLookupFromN5Relative(scaleDatasetPattern)
val numScales = if (metadataState is MultiScaleMetadataState) metadataState.scaleTransforms.size else 1
val labelBlockLookupMetadata = LabelBlockLookupGroup(labelToBlockDataset, numScales)
labelBlockLookupMetadata.write(metadataState.writer!!)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -603,10 +603,6 @@ public DummyMetadataState(String labelsDataset, N5Writer container) {

}

@Override public void setWriter(@Nullable N5Writer writer) {

}

@Override public void setGroup(String group) {

}
Expand Down

0 comments on commit bc0da63

Please sign in to comment.