-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add nd support for tiff export job #7971
Conversation
… into nd-tiff-export
Hej, I managed to make the tiff export work on the worker side for nd datasets. Thus, this pr is ready for the first review round 👯 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the frontend lgtm 👍
@@ -97,6 +97,12 @@ case class FullAxisOrder(axes: Seq[Axis]) { | |||
def permuteIndicesArrayToWk(indices: Array[Int]): Array[Int] = | |||
arrayToWkPermutation.map(indices(_)) | |||
|
|||
def toWkLibsDictObject: JsValue = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def toWkLibsDictObject: JsValue = | |
def toWkLibsDictJson: JsValue = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also went for toWkLibsJson
here as below to have the naming more consistent. Feel free to argue
@@ -70,6 +71,9 @@ case class BoundingBox(topLeft: Vec3Int, width: Int, height: Int, depth: Int) { | |||
Vec3Int(width, height, depth) | |||
|
|||
def toLiteral: String = f"${topLeft.x},${topLeft.y},${topLeft.z},$width,$height,$depth" | |||
|
|||
def toWkLibsDict: JsObject = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def toWkLibsDict: JsObject = | |
def toWkLibsJson: JsObject = |
@@ -10,6 +10,17 @@ case class AdditionalAxis(name: String, bounds: Array[Int], index: Int) { | |||
lazy val lowerBound: Int = bounds(0) | |||
lazy val upperBound: Int = bounds(1) | |||
lazy val highestValue: Int = upperBound - 1 | |||
|
|||
def enclosingAdditionalCoordinates(additionalCoordinates: Seq[AdditionalCoordinate]): AdditionalAxis = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a comment what this is for? I didn’t quite understand it on first read. Also, if it returns an Axis, why is it called enclosingAdditionalCoordinates? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed the method and added comments. Is it clearer now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tried testing this, but the »Export« button didn’t have any effect for me on this branch. Also no console logging. Works on master branch. Can you reproduce that? I’m on the l4_sample dataset
Nope sorry 🙈. I just tried again and it works for me with the l4_sample dataset. Maybe your bounding box was special regarding dimensions or |
Huh, I re-tried and now it worked 🤔 Not sure what was different. Let’s assume it was a misconfiguration on my part. One more thing I noticed: the bbox in the job list view at By the way, I think 2d datasets should not be a problem (as they are handled as 3d with height=1 in wk) |
Thanks for the hint. Should be fixed now. I also checked for backwards compatiblity that bboxes of old export jobs can be rendered. |
This PR enables tiff export for nd datasets.
URL of deployed dev instance (used for testing):
Steps to test:
TODOs:
Issues:
(Please delete unneeded items, merge only when none are left open)