Skip to content

Commit

Permalink
Switch to label-dev.deepcell.org
Browse files Browse the repository at this point in the history
  • Loading branch information
tddough98 committed Jun 14, 2022
1 parent 467bdea commit 60eaa1a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
22 changes: 9 additions & 13 deletions src/Predict/JobCompleteButtons/VisualizeButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,20 @@ function VisualizeButton({ url, imagesUrl, dimensionOrder, labelsUrl }) {
formData.append('labels', labelsUrl);
formData.append('axes', dimensionOrder);

// TODO: make mesmer and spots visualizers behave consistently
// mesmer (viewer.deepcell.org): must be only base URL
// spots, tracks, label, anolytics: need to add /project
const viewerUrl = url.includes('viewer') ? url : `${url}/project`;
const newTab = window.open(viewerUrl, '_blank');
const newTab = window.open(`${url}/loading`, '_blank');
axios({
method: 'post',
url: `${url}/api/project`,
data: formData,
headers: { 'Content-Type': 'multipart/form-data' },
}).then((res) => {
// TODO: make mesmer and spots API return the same response
// memser: { projectId: "EXAMPLEID" }
// spots: "EXAMPLEID"
const projectId = res.data.projectId ?? res.data;
const projectUrl = `${viewerUrl}?projectId=${projectId}`;
newTab.location.href = projectUrl;
});
})
.then((res) => {
newTab.location.href = `${url}/project?projectId=${res.data}`;
})
.catch((err) => {
console.log(err);
newTab.location.href = `${url}/loading?error=${err.message}`;
});
};

return (
Expand Down
6 changes: 3 additions & 3 deletions src/Predict/jobData.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const jobCards = {
channelEnabled: false, // Caliban form does not have a channel form so this value doesn't matter
requiredChannels: ['nuclei'],
modelResolution: 0.5,
visualizer: 'https://tracks.deepcell.org',
visualizer: 'https://label-dev.deepcell.org',
},
mesmer: {
file: 'tiff_stack_examples/vectra_breast_cancer.tif',
Expand All @@ -41,7 +41,7 @@ const jobCards = {
channelEnabled: true,
requiredChannels: ['nuclei', 'cytoplasm'],
modelResolution: 0.5,
visualizer: 'https://viewer.deepcell.org',
visualizer: 'https://label-dev.deepcell.org',
},
polaris: {
file: 'tiff_stack_examples/20220601-MERFISH_example_RGB.png',
Expand All @@ -57,7 +57,7 @@ const jobCards = {
channelEnabled: false,
requiredChannels: ['spots'],
modelResolution: 0.1,
visualizer: 'https://spots.deepcell.org',
visualizer: 'https://label-dev.deepcell.org',
},
};

Expand Down

0 comments on commit 60eaa1a

Please sign in to comment.