Skip to content

Commit

Permalink
Merge 579110b into 3463ba8
Browse files Browse the repository at this point in the history
  • Loading branch information
tddough98 committed Oct 27, 2021
2 parents 3463ba8 + 579110b commit fb95688
Show file tree
Hide file tree
Showing 41 changed files with 654 additions and 488 deletions.
304 changes: 105 additions & 199 deletions README.md

Large diffs are not rendered by default.

Binary file added screenshots/channelOptions.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/deepcellLabelUI.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/displayControls.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/multiChannelDisplayControls.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/segmentControls.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/segmentationDisplayControls.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/singleChannelDisplayControls.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 1 addition & 5 deletions visualizer/src/Controls/ImageControls/FrameSlider.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FormLabel, makeStyles, Slider, Tooltip } from '@material-ui/core';
import { useSelector } from '@xstate/react';
import { bind, unbind } from 'mousetrap';
import { bind } from 'mousetrap';
import React, { useEffect, useState } from 'react';
import { useImage } from '../../ProjectContext';

Expand All @@ -21,10 +21,6 @@ function FrameSlider() {
const nextFrame = (frame + 1) % numFrames;
bind('a', () => image.send({ type: 'LOAD_FRAME', frame: prevFrame }));
bind('d', () => image.send({ type: 'LOAD_FRAME', frame: nextFrame }));
return () => {
unbind('a');
unbind('d');
};
}, [frame, image, numFrames]);

const handleFrameChange = (event, newValue) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Grid from '@material-ui/core/Grid';
import Select from '@material-ui/core/Select';
import Tooltip from '@material-ui/core/Tooltip';
import { useSelector } from '@xstate/react';
import { bind, unbind } from 'mousetrap';
import { bind } from 'mousetrap';
import React, { useEffect } from 'react';
import { useLabeled } from '../../../ProjectContext';

Expand All @@ -27,10 +27,6 @@ function FeatureSelect() {
const nextFeature = (feature + 1) % numFeatures;
bind('shift+f', () => labeled.send({ type: 'LOAD_FEATURE', feature: prevFeature }));
bind('f', () => labeled.send({ type: 'LOAD_FEATURE', feature: nextFeature }));
return () => {
unbind('shift+f');
unbind('f');
};
}, [labeled, feature, numFeatures]);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import FormGroup from '@material-ui/core/FormGroup';
import Switch from '@material-ui/core/Switch';
import Tooltip from '@material-ui/core/Tooltip';
import { useSelector } from '@xstate/react';
import { bind, unbind } from 'mousetrap';
import { bind } from 'mousetrap';
import React, { useEffect, useRef } from 'react';
import { useLabeled } from '../../../ProjectContext';

Expand All @@ -26,7 +26,13 @@ function HighlightToggle() {

useEffect(() => {
bind('h', () => labeled.send('TOGGLE_HIGHLIGHT'));
return () => unbind('h');
// const sendToggleHighlight = e => {
// if (e.key === 'h') {
// labeled.send('TOGGLE_HIGHLIGHT');
// }
// };
// document.addEventListener('keydown', sendToggleHighlight);
// return () => document.removeEventListener('keydown', sendToggleHighlight);
}, [labeled]);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Slider from '@material-ui/core/Slider';
import Tooltip from '@material-ui/core/Tooltip';
import Typography from '@material-ui/core/Typography';
import { useSelector } from '@xstate/react';
import { bind, unbind } from 'mousetrap';
import { bind } from 'mousetrap';
import React, { useEffect } from 'react';
import { useLabeled } from '../../../ProjectContext';

Expand Down Expand Up @@ -37,7 +37,6 @@ function OpacitySlider() {

useEffect(() => {
bind('z', () => labeled.send('CYCLE_OPACITY'));
return () => unbind('z');
}, [labeled]);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import FormGroup from '@material-ui/core/FormGroup';
import Switch from '@material-ui/core/Switch';
import Tooltip from '@material-ui/core/Tooltip';
import { useSelector } from '@xstate/react';
import { bind, unbind } from 'mousetrap';
import { bind } from 'mousetrap';
import React, { useEffect, useRef } from 'react';
import { useLabeled } from '../../../ProjectContext';

Expand All @@ -26,7 +26,6 @@ function OutlineToggle() {

useEffect(() => {
bind('o', () => labeled.send('TOGGLE_OUTLINE'));
return () => unbind('o');
}, [labeled]);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import FormControlLabel from '@material-ui/core/FormControlLabel';
import Switch from '@material-ui/core/Switch';
import Tooltip from '@material-ui/core/Tooltip';
import { useSelector } from '@xstate/react';
import { bind, unbind } from 'mousetrap';
import { bind } from 'mousetrap';
import React, { useCallback, useEffect, useRef } from 'react';
import { useRaw } from '../../../ProjectContext';

Expand All @@ -22,7 +22,6 @@ function ColorModeToggle() {

useEffect(() => {
bind('y', onClick);
return () => unbind('y');
}, [onClick]);

const toggleTooltip = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Slider from '@material-ui/core/Slider';
import Switch from '@material-ui/core/Switch';
import Tooltip from '@material-ui/core/Tooltip';
import { useSelector } from '@xstate/react';
import { bind, unbind } from 'mousetrap';
import { bind } from 'mousetrap';
import React, { useEffect, useRef } from 'react';
import { useRaw } from '../../../ProjectContext';

Expand Down Expand Up @@ -39,7 +39,6 @@ const InvertToggle = ({ channel }) => {

useEffect(() => {
bind('i', () => channel.send('TOGGLE_INVERT'));
return () => unbind('i');
}, [channel]);

return (
Expand Down Expand Up @@ -83,10 +82,6 @@ const ChannelSelector = () => {
const nextChannel = (channel + 1) % numChannels;
bind('shift+c', () => raw.send({ type: 'LOAD_CHANNEL', channel: prevChannel }));
bind('c', () => raw.send({ type: 'LOAD_CHANNEL', channel: nextChannel }));
return () => {
unbind('shift+c');
unbind('c');
};
}, [raw, channel, numChannels]);

return (
Expand Down Expand Up @@ -183,7 +178,6 @@ const GrayscaleControls = () => {

useEffect(() => {
bind('0', () => raw.send('RESET'));
return () => unbind('0');
}, [raw]);

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import MuiButton from '@material-ui/core/Button';
import { makeStyles, withStyles } from '@material-ui/core/styles';
import Tooltip from '@material-ui/core/Tooltip';
import { bind, unbind } from 'mousetrap';
import { bind } from 'mousetrap';
import React, { useEffect } from 'react';

export const useStyles = makeStyles(theme => ({
Expand Down Expand Up @@ -30,7 +30,6 @@ const ActionButton = ({ tooltipText, disabled, onClick, hotkey, ...other }) => {

useEffect(() => {
bind(hotkey, onClick);
return () => unbind(hotkey);
}, [hotkey, onClick]);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function AutofitButton(props) {

const tooltipText = (
<span>
Fits a label to a channel (<kbd>M</kbd>)
Fits a label to a channel <kbd>M</kbd>
</span>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function DeleteButton(props) {

const tooltipText = (
<span>
Removes a label (<kbd>Del</kbd> or <kbd>Backspace</kbd>)
Removes a label <kbd>Del</kbd> or <kbd>Backspace</kbd>
</span>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function GrowButton(props) {

const tooltipText = (
<span>
Expands a label by one pixel (<kbd>Shift</kbd> + <kbd>Q</kbd>)
Expands a label by one pixel <kbd>Shift</kbd> + <kbd>Q</kbd>
</span>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function ReplaceButton(props) {

const tooltipText = (
<span>
Combines two labels (<kbd>Shift</kbd> + <kbd>R</kbd>)
Combines two labels <kbd>Shift</kbd> + <kbd>R</kbd>
</span>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function ShrinkButton(props) {

const tooltipText = (
<span>
Contracts a label by one pixel (<kbd>Q</kbd>)
Contracts a label by one pixel <kbd>Q</kbd>
</span>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function SwapButton(props) {

const tooltipText = (
<span>
Switches the position of two labels (<kbd>Shift</kbd> + <kbd>S</kbd>)
Switches the position of two labels <kbd>Shift</kbd> + <kbd>S</kbd>
</span>
);

Expand Down

0 comments on commit fb95688

Please sign in to comment.