Skip to content

Commit f874f68

Browse files
authored
Revert "Support other units than nm for datasets (#7783)" (#7896)
This reverts commit b6930e5.
1 parent 4d10869 commit f874f68

File tree

110 files changed

+1127
-1469
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+1127
-1469
lines changed

CHANGELOG.unreleased.md

-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
1616
- Added the option to set a default mapping for a dataset in the dataset view configuration. The default mapping is loaded when the dataset is opened and the user / url does not configure something else. [#7858](https://github.com/scalableminds/webknossos/pull/7858)
1717
- Uploading an annotation into a dataset that it was not created for now also works if the dataset is in a different organization. [#7816](https://github.com/scalableminds/webknossos/pull/7816)
1818
- When downloading + reuploading an annotation that is based on a segmentation layer with active mapping, that mapping is now still be selected after the reupload. [#7822](https://github.com/scalableminds/webknossos/pull/7822)
19-
- Added the ability to change the unit of the dataset voxel size to any supported unit of the [ome/ngff standard](https://github.com/ome/ngff/blob/39605eec64ceff481bb3a98f0adeaa330ab1ef26/latest/index.bs#L192). This allows users to upload and work with low-resolution datasets with a different base unit than nanometer. [#7783](https://github.com/scalableminds/webknossos/pull/7783)
2019
- In the Voxelytics workflow list, the name of the WEBKNOSSOS user who started the job is displayed. [#7794](https://github.com/scalableminds/webknossos/pull/7795)
2120
- Start an alignment job (aligns the section in a dataset) via the "AI Analysis" button. [#7820](https://github.com/scalableminds/webknossos/pull/7820)
2221
- Added additional validation for the animation job modal. Bounding boxes must be larger then zero. [#7883](https://github.com/scalableminds/webknossos/pull/7883)
@@ -39,8 +38,6 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
3938
- Fixed that dataset composition did not work when selecting only one dataset for composition. [#7889](https://github.com/scalableminds/webknossos/pull/7889)
4039

4140
### Removed
42-
- REST API versions 1 and 2 are no longer supported. Current is 7.
43-
data
4441
- If the datasource-properties.json file for a dataset is missing or contains errors, WEBKNOSSOS no longer attempts to guess its contents from the raw data. Exploring remote datasets will still create the file. [#7697](https://github.com/scalableminds/webknossos/pull/7697)
4542

4643
### Breaking Changes

MIGRATIONS.unreleased.md

-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@ User-facing changes are documented in the [changelog](CHANGELOG.released.md).
1717
- [114-ai-models.sql](conf/evolutions/114-ai-models.sql)
1818
- [115-annotation-locked-by-user.sql](conf/evolutions/115-annotation-locked-by-user.sql)
1919
- [116-drop-overtimemailinglist.sql](conf/evolutions/116-drop-overtimemailinglist.sql)
20-
- [117-voxel-size-unit.sql](conf/evolutions/117-voxel-size-unit.sql)

app/controllers/AnnotationController.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,8 @@ class AnnotationController @Inject()(
398398
allItems.grouped(batchSize).toList
399399
}
400400

401-
private def percent(done: Int, pending: Int) = {
402-
val value = done.toDouble / pending.toDouble * 100
401+
private def percent(done: Int, todo: Int) = {
402+
val value = done.toDouble / todo.toDouble * 100
403403
f"$value%1.1f %%"
404404
}
405405

app/controllers/AnnotationIOController.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ class AnnotationIOController @Inject()(
424424
"temp",
425425
fetchedAnnotationLayers,
426426
Some(annotation),
427-
dataset.voxelSize,
427+
dataset.scale,
428428
None,
429429
organizationName,
430430
conf.Http.uri,
@@ -452,7 +452,7 @@ class AnnotationIOController @Inject()(
452452
volumeVersion,
453453
skipVolumeData,
454454
volumeDataZipFormat,
455-
dataset.voxelSize)
455+
dataset.scale)
456456
} ?~> "annotation.download.fetchVolumeLayer.failed"
457457
fetchedSkeletonLayers: List[FetchedAnnotationLayer] <- Fox.serialCombined(annotation.skeletonAnnotationLayers) {
458458
skeletonAnnotationLayer =>
@@ -464,7 +464,7 @@ class AnnotationIOController @Inject()(
464464
name,
465465
fetchedSkeletonLayers ::: fetchedVolumeLayers,
466466
Some(annotation),
467-
dataset.voxelSize,
467+
dataset.scale,
468468
None,
469469
organizationName,
470470
conf.Http.uri,

app/controllers/JobController.scala

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package controllers
22

33
import play.silhouette.api.Silhouette
4-
import com.scalableminds.util.geometry.{BoundingBox, Vec3Double, Vec3Int}
4+
import com.scalableminds.util.geometry.Vec3Int
55
import com.scalableminds.util.accesscontext.GlobalAccessContext
66
import com.scalableminds.util.tools.Fox
77
import models.dataset.{DataStoreDAO, DatasetDAO, DatasetService}
@@ -19,7 +19,7 @@ import java.util.Date
1919
import javax.inject.Inject
2020
import scala.concurrent.ExecutionContext
2121
import com.scalableminds.util.enumeration.ExtendedEnumeration
22-
import com.scalableminds.webknossos.datastore.models.{LengthUnit, VoxelSize}
22+
import com.scalableminds.util.geometry.BoundingBox
2323
import models.team.PricingPlan
2424

2525
object MovieResolutionSetting extends ExtendedEnumeration {
@@ -109,18 +109,12 @@ class JobController @Inject()(
109109
}
110110

111111
// Note that the dataset has to be registered by reserveUpload via the datastore first.
112-
def runConvertToWkwJob(organizationName: String,
113-
datasetName: String,
114-
scale: String,
115-
unit: Option[String]): Action[AnyContent] =
112+
def runConvertToWkwJob(organizationName: String, datasetName: String, scale: String): Action[AnyContent] =
116113
sil.SecuredAction.async { implicit request =>
117114
log(Some(slackNotificationService.noticeFailedJobRequest)) {
118115
for {
119116
organization <- organizationDAO.findOneByName(organizationName) ?~> Messages("organization.notFound",
120117
organizationName)
121-
voxelSizeFactor <- Vec3Double.fromUriLiteral(scale).toFox
122-
voxelSizeUnit <- Fox.runOptional(unit)(u => LengthUnit.fromString(u).toFox)
123-
voxelSize = VoxelSize.fromFactorAndUnitWithDefault(voxelSizeFactor, voxelSizeUnit)
124118
_ <- bool2Fox(request.identity._organization == organization._id) ~> FORBIDDEN
125119
dataset <- datasetDAO.findOneByNameAndOrganization(datasetName, organization._id) ?~> Messages(
126120
"dataset.notFound",
@@ -130,7 +124,7 @@ class JobController @Inject()(
130124
"organization_name" -> organizationName,
131125
"organization_display_name" -> organization.displayName,
132126
"dataset_name" -> datasetName,
133-
"scale" -> voxelSize.toNanometer.toUriLiteral
127+
"scale" -> scale
134128
)
135129
job <- jobService.submitJob(command, commandArgs, request.identity, dataset._dataStore) ?~> "job.couldNotRunCubing"
136130
js <- jobService.publicWrites(job)

0 commit comments

Comments
 (0)