-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
4,247 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
|
||
|
||
function FormTempaltesLoader() { | ||
function loadingFormTemplates() { | ||
$CAMIC.store.findTemplate() | ||
// | ||
.then(function(temps) { | ||
// get templates data | ||
$D.templates = temps; | ||
}) | ||
// | ||
.catch(function(error) { | ||
// templates schema | ||
|
||
console.error(error); | ||
}) | ||
// | ||
.finally(function() { | ||
if ($D.templates) { | ||
// load UI | ||
} else { | ||
// set message | ||
$UI.message.addError('Loading Templates is Error'); | ||
} | ||
}); | ||
} | ||
|
||
var checkCoreIsReady = setInterval(function() { | ||
if ($CAMIC) { | ||
clearInterval(checkCoreIsReady); | ||
// load data | ||
loadingFormTemplates(); | ||
} | ||
}, 500); | ||
} | ||
|
||
function layersLoader() { | ||
// human | ||
function loadingHumanOverlayers() { | ||
$CAMIC.store.findMarkTypes($D.params.slideId, 'human').then(function(layers) { | ||
// convert part not nesscary | ||
$D.humanlayers = [...layers.map(covertToHumanLayer)]; | ||
|
||
// add data and create ui item | ||
addHumanLayerItems(); | ||
}).catch(function(error) { | ||
// overlayers schema | ||
$UI.message.addError('Loading Human Layers is Error'); | ||
console.error(error); | ||
}); | ||
} | ||
// ruler | ||
function loadingRulerOverlayers() { | ||
console.info("Ignoring ruler because htt. Using Empty list.") | ||
$D.rulerlayers = []; | ||
addRulerLayerItems(); | ||
} | ||
// heatmap | ||
function loadingHeatmapOverlayers() { | ||
console.info("Ignoring heatmap because htt. Using Empty list.") | ||
$D.heatmaplayers = []; | ||
addHeatmapLayerItems(); | ||
} | ||
|
||
// segmentation | ||
function loadingComputerOverlayers() { | ||
onsole.info("Ignoring segmentation because htt. Using Empty list.") | ||
$D.computerlayers=[]; | ||
addComputerLayerItems(); | ||
|
||
} | ||
var checkCoreIsReady = setInterval(function() { | ||
if ($UI.layersViewer && $UI.layersViewerMinor) { | ||
clearInterval(checkCoreIsReady); | ||
loadingHumanOverlayers(); | ||
loadingRulerOverlayers(); | ||
loadingHeatmapOverlayers(); | ||
loadingComputerOverlayers(); | ||
} | ||
}, 500); | ||
} | ||
|
||
|
Oops, something went wrong.