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

Make hybrid annotations the default #4939

Merged
merged 17 commits into from
Dec 2, 2020
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
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
-

### Changed
- The menu for viewing, editing and creating annotations for a dataset in the dashboard was cleaned up a bit. Creating a hybrid (skeleton + volume) annotation is now the default way of annotating a dataset. The other options are still available via a dropdown. [#4939](https://github.com/scalableminds/webknossos/pull/4939)
- For 2d-only datasets the view mode toggle is hidden. [#4952](https://github.com/scalableminds/webknossos/pull/4952)

### Fixed
Expand Down
20 changes: 9 additions & 11 deletions app/models/binary/DataSetService.scala
Original file line number Diff line number Diff line change
Expand Up @@ -241,22 +241,20 @@ class DataSetService @Inject()(organizationDAO: OrganizationDAO,

def dataSourceFor(dataSet: DataSet, organization: Option[Organization] = None, skipResolutions: Boolean = false)(
implicit ctx: DBAccessContext): Fox[InboxDataSource] =
for {
(for {
organization <- Fox.fillOption(organization) {
organizationDAO.findOne(dataSet._organization)(GlobalAccessContext) ?~> "organization.notFound"
}
dataLayersBox <- dataSetDataLayerDAO.findAllForDataSet(dataSet._id, skipResolutions).futureBox
dataLayers <- dataSetDataLayerDAO.findAllForDataSet(dataSet._id, skipResolutions)
dataSourceId = DataSourceId(dataSet.name, organization.name)
} yield {
dataLayersBox match {
case Full(dataLayers) if (dataLayers.nonEmpty) =>
for {
scale <- dataSet.scale
} yield GenericDataSource[DataLayer](dataSourceId, dataLayers, scale)
case _ =>
Some(UnusableDataSource[DataLayer](dataSourceId, dataSet.status, dataSet.scale))
}
}
if (dataSet.isUsable)
for {
scale <- dataSet.scale.toFox ?~> "dataSet.source.usableButNoScale"
} yield GenericDataSource[DataLayer](dataSourceId, dataLayers, scale)
else
Fox.successful(UnusableDataSource[DataLayer](dataSourceId, dataSet.status, dataSet.scale))
}).flatten

def logoUrlFor(dataSet: DataSet, organization: Option[Organization]): Fox[String] =
dataSet.logoUrl match {
Expand Down
1 change: 1 addition & 0 deletions conf/messages
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ dataSet.import.impossible.name=Import impossible. Dataset name can only consist
dataSet.name.alreadyTaken=This dataset name is already in use.
dataSet.name.notInSamples=This dataset name is not one of the available sample datasets.
dataSet.source.notFound=The data source for the data source couldn’t be found
dataSet.source.usableButNoScale=Dataset {0} is marked as active but has no scale.
dataSet.import.success=The import of the dataset was successful
dataSet.import.failed=Failed to import the dataset
dataSet.import.fileAccessDenied=Cannot create organization folder. Please make sure webKnossos has write permissions in the “binaryData” directory
Expand Down
1 change: 0 additions & 1 deletion frontend/javascripts/admin/admin_rest_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,6 @@ export async function getDatasets(
const parameters = isUnreported != null ? `?isUnreported=${String(isUnreported)}` : "";
const datasets = await Request.receiveJSON(`/api/datasets${parameters}`);
assertResponseLimit(datasets);

return datasets;
}

Expand Down
Loading