Skip to content

Commit

Permalink
Merge branch 'docs' into docs_lili
Browse files Browse the repository at this point in the history
* docs:
  mpre pr feedback
  Updates to wK Docs (#5995)
  restored some sections in sharing docs
  added context-menu hint to shortcuts
  more pr feedback
  Connectome Tab (#5894)
  Fix duplicating annotations via toggling show archived annotations button and fix downsample modal rendering errors (#6058)
  • Loading branch information
hotzenklotz committed Mar 29, 2022
2 parents efb0f86 + ad6054d commit 5583e1e
Show file tree
Hide file tree
Showing 73 changed files with 3,276 additions and 329 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released

### Added
- The visible meshes are now included in the link copied from the "Share" modal or the "Share" button next to the dataset position. They are automatically loaded for users that open the shared link. [#5993](https://github.com/scalableminds/webknossos/pull/5993)
- Added a new "Connectome Tab" which can be used to explore connectomes by visualizing neurites and their synaptic connections. Connectome files need to be placed in a `connectomes` folder inside of the respective segmentation layer. It is possible to craft links that automatically load specific agglomerates and their synapses when openend. For more information refer to https://docs.webknossos.org/webknossos/sharing.html#sharing-link-format. [#5894](https://github.com/scalableminds/webknossos/pull/5894)

### Changed
- The maximum brush size now depends on the available magnifications. Consequentially, one can use a larger brush size when the magnifications of a volume layer are restricted. [#6066](https://github.com/scalableminds/webknossos/pull/6066)
- Improved stability and speed of volume annotations when annotating large areas. [#6055](https://github.com/scalableminds/webknossos/pull/6055)

### Fixed
- Fixed a bug that led to crashing the layer settings once the icon for the downsample modal was clicked. [#6058](https://github.com/scalableminds/webknossos/pull/6058)
- Fixed a bug where toggling between not archived and archived annotations in the "My Annotation" of the dashboard led to inconsistent states and duplicates of annotations. [#6058](https://github.com/scalableminds/webknossos/pull/6058)
- Fixed a bug where deactivated users would still be listed as allowed to access the datasets of their team. [#6070](https://github.com/scalableminds/webknossos/pull/6070)
- Fix occasionally "disappearing" data. [#6055](https://github.com/scalableminds/webknossos/pull/6055)

Expand Down
2 changes: 2 additions & 0 deletions conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ features {
exportTiffMaxVolumeMVx = 1024
exportTiffMaxEdgeLengthVx = 8192
defaultToLegacyBindings = false
# The Only valid item value is currently "ConnectomeView":
optInTabs = []
}

# Serve annotations. Only active if the corresponding play module is enabled
Expand Down
2 changes: 2 additions & 0 deletions docs/keyboard_shortcuts.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Note that skeleton-specific mouse actions are usually only available when the sk
| Left Click | Create New Node |
| Left Click | Select Node (Mark as Active Node) under cursor |
| Left Drag | Move node under cursor |
| Right Click (on node) | Bring up the context-menu with further actions |
| C | Create New Tree |
| CTRL + . | Navigate to the next Node (Mark as Active)|
| CTRL + , | Navigate to previous Node (Mark as Active) |
Expand Down Expand Up @@ -93,6 +94,7 @@ Note that you can enable *Classic Controls* which will behave slightly different
| Key Binding | Operation |
| --------------------------------- | ----------------------------------------------------------- |
| Left Mouse Drag or Arrow Keys | Move (Move Mode) / Add To Current Segment (Trace / Brush Mode) |
| Right Click | Bring up context-menu with further actions |
| SHIFT + Left Click | Select Active Segment |
| CTRL + Left Mouse Drag | Add Voxels To Current Segment while inverting the overwrite-mode (see toolbar for overwrite-mode) |
| CTRL + SHIFT + Left Mouse Drag | Remove Voxels From Segment |
Expand Down
25 changes: 15 additions & 10 deletions docs/sharing.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,21 @@ In many ways, the sharing by web link works similarly to products like Google Dr

webKnossos sharing is tightly integrated with user permissions and access rights. See the sections [on dataset management](./datasets.md#general) and [user administration](./users.md) for more info.

## Sharing
As mentioned earlier, any webKnossos resource can be shared as a normal web URL. The easiest way to obtain this sharing link is by clicking the `Share` button in the toolbar at the top of the screen next to the position/coordinate section (*Share icon*).
## Dataset Sharing

For more control, you can bring up the detailed sharing dialog. The sharing dialog is accessible from the menu next to the Save button at the top of the screen under `Share`. The sharing menu includes fine-grained options for internal and outside sharing, explained in more detail below:
Dataset sharing allows outside users to view your datasets and segmentation layers within webKnossos.
Shared resources can be accessed through a direct URL or can be featured.
[Please contact us](mailto:[email protected]) to feature your dataset on https://webknossos.org.

1. `Private`: Only you and your team manager have access to the annotation.
2. `Internal`: All members of your organization have access to the annotation.
3. `Public`: Everybody with access to the link, regardless their login status, can access this annotation.
4. (`Team Sharing`: Share this annotation with other organization members on the dashboard in the `Shared Annotations` tab)
The easiest way to obtain this sharing link is by clicking the `Share` button in the toolbar at the top of the screen next to the position/coordinate section (*Share icon*).
The the sharing link also encodes additional information, such as your current camera position/rotation, zoom level, any layers that are turned on/off, the selected node, etc ([Details below](#sharing_link_format). In other words, a sharing link typically captures your current webKnossos state so that any recipient can take off from the same situation.

In any case, the sharing link also encodes additional information, such as your current camera position/rotation, zoom level, any layers that are turned on/off, the selected node, etc ([Details below](#sharing_link_format). In other words, a sharing link typically captures your current webKnossos state so that any recipient can take off from the same situation.
Sharing a dataset is useful for multiple scenarios:
- You recorded a novel microscopy dataset and want to include links to it in your paper or for reviewers. Use wklink.org to shorten these URLs, e.g. https://wklink.org/5386 ([contact us](mailto:[email protected])) to create these shortlinks.
- You created an interesting, highly-accurate segmentation layer for an existing dataset and want to share it for your publication.
- You have worked and published several datasets over the years and want to have a single gallery for all your public datasets.

webKnossos shares datasets publicly (everyone can view them without any login) or privately (a login or special URLs are required to view the link).

### Private and Internal Sharing
A privately shared dataset can only be accessed from outside users using the correct URL.
Expand All @@ -55,8 +58,6 @@ To revoke a sharing link in the future, click the `Revoke` button to the right-h
Public sharing provides access to your dataset to the general public.
Anyone can access the shared dataset and view it on your webKnossos instance without the need for an account.

![The Dataset Gallery view provides a public showcase of all your published datasets. No webKnossos account is required to view these.](images/spotlight.png)

Public datasets provide an easy and convenient way of sharing your data with outside users after you have successfully published them.
Outside users can explore your data from the comfort of their browser without needing to sign up for an account.

Expand Down Expand Up @@ -166,6 +167,10 @@ The information is JSON-encoded in the URL fragment and has the following format
mappingType: MappingType,
agglomerateIdsToImport?: Array<number>,
},
connectomeInfo?: {
connectomeName: string,
agglomerateIdsToImport?: Array<number>,
}
},
};

Expand Down
2 changes: 1 addition & 1 deletion docs/skeleton_annotation.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Common tree operations include splitting and merging trees.
#### Tree Colors
A random color is assigned to each tree upon creation.
Colors can be shuffled for a single tree or for all trees in a skeleton.
Right-click on a tree to bring up several actions, .e.g `Shuffle Color`.
Right-click on a tree to bring up several actions, e.g. `Shuffle Color`.
When editing several trees, use the overflow menu under `More` in the `Skeleton` tab and select `Change Color` or `Shuffle All Colors` to assign new randomly chosen colors.
All nodes have the same color as their parent tree and can not be changed individually.
The active node, branch points, and nodes that have comments assigned to them are highlighted with a slight variation of the tree's color.
Expand Down
9 changes: 8 additions & 1 deletion docs/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ On webKnossos.org, users can either sign up for a webKnossos account by themselv

![Send an invite link to new users](./images/users_invite.png)

## Switching Organizations
A webKnossos user account can be part of more than one organization, .e.g., when your are invited to collaborate on projects of another institute, working as a different webKnossos organization.

If you are part of multiple organizations, you can switch between them from the "User avatar" menu.
Click on your user avatar in the top-right corner of the screen and select an entry from the "Switch Organization" menu.
webKnossos will quickly reload and switch your account to that organization, i.e. refresh your dashboard, access permissions, annotations, etc. to match your account in the selected organization.


## Activating New Users
- not applicable to webKnossos.org -
Expand All @@ -100,7 +107,7 @@ When activating new users, a popup opens for

## Password Reset / Change Email Address

Users can _change_ their account password by themselves if they are logged in. Password reset can be found by clicking on their username in the navigation bar in the top-right corner of the screen and selecting `Change Password`. Users need to provide their current password and choose a new one.
Users can _change_ their account password by themselves if they are logged in. Password reset can be found by clicking on their user avatar in the navigation bar in the top-right corner of the screen and selecting `Change Password`. Users need to provide their current password and choose a new one.

Logged-out users can _reset_ their password by clicking on `Forgot Password` in the navigation bar in the top-right corner of the screen. They have to provide their email address and will receive an email containing instructions to reset the password.

Expand Down
5 changes: 4 additions & 1 deletion flow-typed/npm/antd_vx.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ declare module "antd" {
static Group: typeof ButtonGroup;
}
declare export class Card<P> extends React$Component<P> {}
declare export class Checkbox<P> extends React$Component<P> {}
declare class CheckboxGroup<P> extends React$Component<P> {}
declare export class Checkbox<P> extends React$Component<P> {
static Group: typeof CheckboxGroup;
}
declare export class Col<P> extends React$Component<P> {}
declare class CollapsePanel<P> extends React$Component<P> {}
declare export class Collapse<P> extends React$Component<P> {
Expand Down
23 changes: 12 additions & 11 deletions flow-typed/npm/lodash_v4.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,8 @@ declare module "lodash" {
| matchesPropertyIterateeShorthand
| propertyIterateeShorthand;

declare type OIterateeWithResult<V, O, R> =
| Object
| string
| ((value: V, key: string, object: O) => R);
declare type OIteratee<O> = OIterateeWithResult<any, O, any>;
declare type OIterateeWithResult<K, V, O, R> = (value: V, key: K, object: O) => R;
declare type OIteratee<O> = OIterateeWithResult<any, any, O, any>;
declare type OFlatMapIteratee<T, O, U> =
| ((item: T, key: string, object: O) => Array<U>)
| propertyIterateeShorthand;
Expand Down Expand Up @@ -209,7 +206,7 @@ declare module "lodash" {
zip<A, B, C, D>(a1: A[], a2: B[], a3: C[], a4: D[]): Array<[A, B, C, D]>;
zip<A, B, C, D, E>(a1: A[], a2: B[], a3: C[], a4: D[], a5: E[]): Array<[A, B, C, D, E]>;

zipObject(props?: Array<any>, values?: Array<any>): Object;
zipObject<K, V>(props: Array<K>, values: Array<V>): { [K]: V };
zipObjectDeep(props?: any[], values?: any): Object;
//Workaround until (...parameter: T, parameter2: U) works
zipWith<T>(a1: NestedArray<T>, iteratee?: Iteratee<T>): Array<T>;
Expand Down Expand Up @@ -661,7 +658,9 @@ declare module "lodash" {
invoke(object?: ?Object, path?: ?Array<string> | string, ...args?: Array<any>): any;
keys(object?: ?Object): Array<string>;
keysIn(object?: ?Object): Array<string>;
mapKeys<K, V, R>(object: { [K]: V }, iteratee: OIterateeWithResult<K, V, *, R>): { [R]: V };
mapKeys(object?: ?Object, iteratee?: OIteratee<*>): Object;
mapValues<K, V, R>(object: { [K]: V }, iteratee: OIterateeWithResult<K, V, *, R>): { [K]: R };
mapValues(object?: ?Object, iteratee?: OIteratee<*>): Object;
merge(object?: ?Object, ...sources?: Array<?Object>): Object;
mergeWith<T: Object, A: Object>(
Expand Down Expand Up @@ -707,12 +706,14 @@ declare module "lodash" {
source: A | B | C | D,
) => any | void,
): Object;
omit(object?: ?Object, ...props: Array<string>): Object;
omit(object?: ?Object, props: Array<string>): Object;
omit<K>(object: { [K]: any }, ...props: Array<K>): { [K]: any };
omit<K>(object: { [K]: any }, props: Array<K>): { [K]: any };
omitBy<A, T: { [id: string]: A }>(object?: ?T, predicate?: OPredicate<A, T>): Object;
pick(object?: ?Object, ...props: Array<string>): Object;
pick(object?: ?Object, props: Array<string>): Object;
pickBy<A, T: { [id: string]: A }>(object?: ?T, predicate?: OPredicate<A, T>): Object;
pick<K, V>(object: { [K]: V }, ...props: Array<K>): { [K]: V };
pick<K, V>(object: { [K]: V }, props: Array<K>): { [K]: V };
pick(object: Object, ...props: Array<string>): Object;
pick(object: Object, props: Array<string>): Object;
pickBy<K, V>(object: { [K]: V }, predicate: OPredicate<A, T>): { [K]: V };
result(object?: ?Object, path?: ?Array<string> | string, defaultValue?: any): any;
set(object?: ?Object, path?: ?Array<string> | string, value: any): Object;
setWith<T>(
Expand Down
119 changes: 117 additions & 2 deletions frontend/javascripts/admin/admin_rest_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
type APIAnnotationVisibility,
type APIAnnotationWithTask,
type APIBuildInfo,
type APIConnectomeFile,
type APIDataSource,
type APIDataSourceWithMessages,
type APIDataStore,
Expand Down Expand Up @@ -61,6 +62,7 @@ import {
import { ControlModeEnum, type Vector3, type Vector6 } from "oxalis/constants";
import type {
DatasetConfiguration,
PartialDatasetConfiguration,
Tracing,
TraceOrViewCommand,
AnnotationType,
Expand Down Expand Up @@ -1163,7 +1165,7 @@ export async function getDatasetViewConfiguration(

export function updateDatasetConfiguration(
datasetId: APIDatasetId,
datasetConfig: DatasetConfiguration,
datasetConfig: PartialDatasetConfiguration,
options?: RequestOptions = {},
): Object {
return Request.sendJSONReceiveJSON(
Expand Down Expand Up @@ -1836,7 +1838,7 @@ export function getAgglomerateSkeleton(
}/layers/${layerName}/agglomerates/${mappingId}/skeleton/${agglomerateId}?token=${token}`,
// The webworker code cannot do proper error handling and always expects an array buffer from the server.
// In this case, the server sends an error json instead of an array buffer sometimes. Therefore, don't use the webworker code.
{ useWebworkerForArrayBuffer: false },
{ useWebworkerForArrayBuffer: false, showErrorToast: false },
),
);
}
Expand Down Expand Up @@ -1903,3 +1905,116 @@ export function getMeshfileChunkData(
return data;
});
}

// ### Connectomes

export function getConnectomeFilesForDatasetLayer(
dataStoreUrl: string,
datasetId: APIDatasetId,
layerName: string,
): Promise<Array<APIConnectomeFile>> {
return doWithToken(token =>
Request.receiveJSON(
`${dataStoreUrl}/data/datasets/${datasetId.owningOrganization}/${
datasetId.name
}/layers/${layerName}/connectomes?token=${token}`,
),
);
}

export function getSynapsesOfAgglomerates(
dataStoreUrl: string,
datasetId: APIDatasetId,
layerName: string,
connectomeFile: string,
agglomerateIds: Array<number>,
): Promise<Array<{| in: Array<number>, out: Array<number> |}>> {
return doWithToken(token =>
Request.sendJSONReceiveJSON(
`${dataStoreUrl}/data/datasets/${datasetId.owningOrganization}/${
datasetId.name
}/layers/${layerName}/connectomes/synapses?token=${token}`,
{
data: {
connectomeFile,
agglomerateIds,
},
},
),
);
}

function getSynapseSourcesOrDestinations(
dataStoreUrl: string,
datasetId: APIDatasetId,
layerName: string,
connectomeFile: string,
synapseIds: Array<number>,
srcOrDst: "src" | "dst",
): Promise<Array<number>> {
return doWithToken(token =>
Request.sendJSONReceiveJSON(
`${dataStoreUrl}/data/datasets/${datasetId.owningOrganization}/${
datasetId.name
}/layers/${layerName}/connectomes/synapses/${srcOrDst}?token=${token}`,
{
data: {
connectomeFile,
synapseIds,
},
},
),
);
}

export function getSynapseSources(...args: *): Promise<Array<number>> {
return getSynapseSourcesOrDestinations(...args, "src");
}

export function getSynapseDestinations(...args: *): Promise<Array<number>> {
return getSynapseSourcesOrDestinations(...args, "dst");
}

export function getSynapsePositions(
dataStoreUrl: string,
datasetId: APIDatasetId,
layerName: string,
connectomeFile: string,
synapseIds: Array<number>,
): Promise<Array<Vector3>> {
return doWithToken(token =>
Request.sendJSONReceiveJSON(
`${dataStoreUrl}/data/datasets/${datasetId.owningOrganization}/${
datasetId.name
}/layers/${layerName}/connectomes/synapses/positions?token=${token}`,
{
data: {
connectomeFile,
synapseIds,
},
},
),
);
}

export function getSynapseTypes(
dataStoreUrl: string,
datasetId: APIDatasetId,
layerName: string,
connectomeFile: string,
synapseIds: Array<number>,
): Promise<{| synapseTypes: Array<number>, typeToString: Array<string> |}> {
return doWithToken(token =>
Request.sendJSONReceiveJSON(
`${dataStoreUrl}/data/datasets/${datasetId.owningOrganization}/${
datasetId.name
}/layers/${layerName}/connectomes/synapses/types?token=${token}`,
{
data: {
connectomeFile,
synapseIds,
},
},
),
);
}
Loading

0 comments on commit 5583e1e

Please sign in to comment.