Skip to content
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

Fix non-32-aligned bucket requests #6047

Merged
merged 3 commits into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ class BinaryDataController @Inject()(
@ApiParam(value = "Name of the dataset’s organization", required = true) organizationName: String,
@ApiParam(value = "Dataset name", required = true) dataSetName: String,
@ApiParam(value = "Layer name of the dataset", required = true) dataLayerName: String,
@ApiParam(value = "x coordinate of the top-left corner of the bounding box", required = true) x: Int,
@ApiParam(value = "y coordinate of the top-left corner of the bounding box", required = true) y: Int,
@ApiParam(value = "z coordinate of the top-left corner of the bounding box", required = true) z: Int,
@ApiParam(value = "width of the bounding box", required = true) width: Int,
@ApiParam(value = "height of the bounding box", required = true) height: Int,
@ApiParam(value = "depth of the bounding box", required = true) depth: Int,
@ApiParam(value = "Mag1 x coordinate of the top-left corner of the bounding box", required = true) x: Int,
@ApiParam(value = "Mag1 y coordinate of the top-left corner of the bounding box", required = true) y: Int,
@ApiParam(value = "Mag1 z coordinate of the top-left corner of the bounding box", required = true) z: Int,
@ApiParam(value = "Target-mag width of the bounding box", required = true) width: Int,
@ApiParam(value = "Target-mag height of the bounding box", required = true) height: Int,
@ApiParam(value = "Target-mag depth of the bounding box", required = true) depth: Int,
@ApiParam(value = "Exponent of the dataset mag (e.g. 4 for mag 16-16-8)", required = true) resolution: Int,
@ApiParam(value = "If true, use lossy compression by sending only half-bytes of the data") halfByte: Boolean
): Action[AnyContent] = Action.async { implicit request =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ case class BucketPosition(
BucketPosition(globalX, globalY, globalZ + (bucketLength * resolution.z), resolution)

def toHighestResBoundingBox: BoundingBox =
new BoundingBox(Point3D(globalX, globalY, globalZ),
bucketLength * resolution.x,
bucketLength * resolution.y,
bucketLength * resolution.z)
new BoundingBox(
Point3D(topLeft.x * resolution.x, topLeft.y * resolution.y, topLeft.z * resolution.z),
bucketLength * resolution.x,
bucketLength * resolution.y,
bucketLength * resolution.z
)

override def toString: String =
s"BucketPosition($globalX, $globalY, $globalZ, mag$resolution)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ case class DataServiceDataRequest(
dataLayerMapping: Option[String],
cuboid: Cuboid,
settings: DataServiceRequestSettings,
voxelDimensions: Vector3I = Vector3I(1, 1, 1)
voxelDimensions: Vector3I = Vector3I(1, 1, 1) // if != 1, skip voxels when loading (used for isosurface generation)
)

case class DataReadInstruction(
Expand Down