-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:scalableminds/webknossos into red…
…esign-right-sidebar * 'master' of github.com:scalableminds/webknossos: Create bounding box by dragging with box tool (#7118) Prevent 'negative' buckets from being created (#7124) Lazy load onnx and canvas2html module (#7121) Disable editing of super voxel skeletons in skeleton mode (#7086) add missing evolution to migration guide (#7126) Change sttp backend to HttpURLConnectionBackend (#7125) Implement Zarr v3 and sharding codec (#7079) Fix decompression of garbage data after valid gzip data causing decompression to fail (#7119) When scanning volume buckets, skip those with unparseable key (#7115)
- Loading branch information
Showing
92 changed files
with
2,479 additions
and
954 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package models.binary.explore | ||
|
||
import com.scalableminds.util.geometry.{Vec3Double, Vec3Int} | ||
import com.scalableminds.util.tools.Fox | ||
import com.scalableminds.webknossos.datastore.dataformats.MagLocator | ||
import com.scalableminds.webknossos.datastore.dataformats.zarr3.{Zarr3DataLayer, Zarr3Layer, Zarr3SegmentationLayer} | ||
import com.scalableminds.webknossos.datastore.datareaders.AxisOrder | ||
import com.scalableminds.webknossos.datastore.datareaders.zarr3.Zarr3ArrayHeader | ||
import com.scalableminds.webknossos.datastore.datavault.VaultPath | ||
import com.scalableminds.webknossos.datastore.models.datasource.Category | ||
|
||
import scala.concurrent.ExecutionContext.Implicits.global | ||
|
||
class Zarr3ArrayExplorer extends RemoteLayerExplorer { | ||
|
||
override def name: String = "Zarr v3 Array" | ||
|
||
override def explore(remotePath: VaultPath, credentialId: Option[String]): Fox[List[(Zarr3Layer, Vec3Double)]] = | ||
for { | ||
zarrayPath <- Fox.successful(remotePath / Zarr3ArrayHeader.ZARR_JSON) | ||
name = guessNameFromPath(remotePath) | ||
zarrHeader <- parseJsonFromPath[Zarr3ArrayHeader](zarrayPath) ?~> s"failed to read zarr v3 header at $zarrayPath" | ||
_ <- zarrHeader.assertValid | ||
elementClass <- zarrHeader.elementClass ?~> "failed to read element class from zarr header" | ||
guessedAxisOrder = AxisOrder.asCxyzFromRank(zarrHeader.rank) | ||
boundingBox <- zarrHeader.boundingBox(guessedAxisOrder) ?~> "failed to read bounding box from zarr header. Make sure data is in (T/C)ZYX format" | ||
magLocator = MagLocator(Vec3Int.ones, | ||
Some(remotePath.toUri.toString), | ||
None, | ||
Some(guessedAxisOrder), | ||
None, | ||
credentialId) | ||
layer: Zarr3Layer = if (looksLikeSegmentationLayer(name, elementClass)) { | ||
Zarr3SegmentationLayer(name, boundingBox, elementClass, List(magLocator), largestSegmentId = None) | ||
} else Zarr3DataLayer(name, Category.color, boundingBox, elementClass, List(magLocator)) | ||
} yield List((layer, Vec3Double(1.0, 1.0, 1.0))) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.