-
Notifications
You must be signed in to change notification settings - Fork 29
Support OME-NGFF zarr dataset translation #8311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
9a8871c
Support 'units' key
frcroth 5bd3ec4
Ignore label layers for now
frcroth 58620ec
Support ngff coordinateTransformations translation property
frcroth eb7af06
Update changelog
frcroth a1c816d
Merge branch 'master' into suport-ngff-translate
frcroth adba7f8
Lint
frcroth 78301d7
Revert "Support 'units' key"
frcroth bbdde25
Use headOption instead of head
frcroth a4700cd
Combine generated ct with existing ct
frcroth 52fc186
Merge branch 'master' into suport-ngff-translate
frcroth ba5b24c
Merge branch 'master' into suport-ngff-translate
frcroth 851c88a
Readd label layer exploration
frcroth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -22,8 +22,8 @@ class NgffV0_4Explorer(implicit val ec: ExecutionContext) extends RemoteLayerExp | |
for { | ||
zattrsPath <- Fox.successful(remotePath / NgffMetadata.FILENAME_DOT_ZATTRS) | ||
ngffHeader <- zattrsPath.parseAsJson[NgffMetadata] ?~> s"Failed to read OME NGFF header at $zattrsPath" | ||
labelLayers <- exploreLabelLayers(remotePath, credentialId).orElse( | ||
Fox.successful(List[(DataLayerWithMagLocators, VoxelSize)]())) | ||
//labelLayers <- exploreLabelLayers(remotePath, credentialId).orElse( | ||
// Fox.successful(List[(DataLayerWithMagLocators, VoxelSize)]())) | ||
|
||
layerLists: List[List[(DataLayerWithMagLocators, VoxelSize)]] <- Fox.serialCombined(ngffHeader.multiscales)( | ||
multiscale => { | ||
|
@@ -34,7 +34,7 @@ class NgffV0_4Explorer(implicit val ec: ExecutionContext) extends RemoteLayerExp | |
} yield layers | ||
}) | ||
layers: List[(DataLayerWithMagLocators, VoxelSize)] = layerLists.flatten | ||
} yield layers ++ labelLayers | ||
} yield layers //++ labelLayers | ||
|
||
|
||
protected def createLayer(remotePath: VaultPath, | ||
credentialId: Option[String], | ||
|
@@ -58,6 +58,7 @@ class NgffV0_4Explorer(implicit val ec: ExecutionContext) extends RemoteLayerExp | |
channelIndex) | ||
boundingBox = boundingBoxFromMags(magsWithAttributes) | ||
additionalAxes <- getAdditionalAxes(multiscale, remotePath) | ||
translationOpt = getTranslation(multiscale) | ||
layer: ZarrLayer = if (looksLikeSegmentationLayer(datasetName, elementClass) || isSegmentation) { | ||
ZarrSegmentationLayer( | ||
channelName, | ||
|
@@ -67,6 +68,7 @@ class NgffV0_4Explorer(implicit val ec: ExecutionContext) extends RemoteLayerExp | |
largestSegmentId = None, | ||
additionalAxes = Some(additionalAxes), | ||
defaultViewConfiguration = Some(viewConfig), | ||
coordinateTransformations = translationOpt, | ||
dataFormat = DataFormat.zarr | ||
) | ||
} else | ||
|
@@ -78,6 +80,7 @@ class NgffV0_4Explorer(implicit val ec: ExecutionContext) extends RemoteLayerExp | |
magsWithAttributes.map(_.mag), | ||
additionalAxes = Some(additionalAxes), | ||
defaultViewConfiguration = Some(viewConfig), | ||
coordinateTransformations = translationOpt, | ||
dataFormat = DataFormat.zarr | ||
) | ||
} yield layer | ||
|
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.