Skip to content

Commit

Permalink
start freeview
Browse files Browse the repository at this point in the history
  • Loading branch information
birm committed Jan 5, 2025
1 parent f6686f4 commit 37d2976
Show file tree
Hide file tree
Showing 5 changed files with 4,247 additions and 0 deletions.
83 changes: 83 additions & 0 deletions apps/freeview/dataloaders.js
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);
}


Loading

0 comments on commit 37d2976

Please sign in to comment.