Commit cd176fbb authored by Andrew Cohen's avatar Andrew Cohen

all bright option in view

parent 93aae367
......@@ -523,7 +523,8 @@ function drawText(tHulls)
}
// draw an outline, then filled
if (undefined===lineageMap || undefined===lineageMap.get(tHulls[i].trackID)) {
if ( !gRenderParams[tHulls[i].channel-1].bAllBright &&
(undefined===lineageMap || undefined===lineageMap.get(tHulls[i].trackID)) ) {
// not on the family / lineage tree
context.fillStyle = "gray";
context.strokeStyle='black';
......@@ -601,7 +602,7 @@ function drawHulls(tHulls)
}
var color;
if (undefined==lineageMap) {
if (undefined==lineageMap || gRenderParams[tHulls[i].channel-1].bAllBright) {
color=tHulls[i].jsColor.bright ;
}
else {
......
......@@ -26,7 +26,8 @@ function DefaultTransfer()
this.bVisible=true;
this.bShowLabels=true;
this.bShowSurface=true;
this.bAllBright=false;
this.alpha=1;
this.dark=0;
this.medium=0.5;
......@@ -79,6 +80,13 @@ function initRenderParams()
gRenderParams[nChannel].color=getDefaultColor(nChannel);
}
}
if (undefined===gRenderParams[0].bAllBright) {
for (var nChannel=0;nChannel<CONSTANTS.imageData.NumberOfChannels;nChannel++) {
gRenderParams[nChannel].bAllBright=false;
}
}
return;
}
var nChannels=CONSTANTS.imageData.NumberOfChannels;
......@@ -166,11 +174,11 @@ function updateSliderParams()
for (var channelSelect=0;channelSelect<tblChannel.rows.length-1;channelSelect++) {
var bVisible=document.getElementById('visible_'+channelSelect).checked;
var bShowSurface=document.getElementById('surface_'+channelSelect).checked;
var bShowLabels=document.getElementById('labels_'+channelSelect).checked;
var bAllBright=document.getElementById('allBright_'+channelSelect).checked;
// if we turn surface or labels on, and they were both off, we need to reload channel data
var bToggleChannel=Is3D() &&
(bShowSurface || bShowLabels) &&
......@@ -184,7 +192,8 @@ function updateSliderParams()
gRenderParams[channelSelect].bVisible=bVisible;
gRenderParams[channelSelect].bShowSurface=bShowSurface;
gRenderParams[channelSelect].bShowLabels=bShowLabels;
gRenderParams[channelSelect].bAllBright=bAllBright;
// only update sliders for channels that are selected
var bChecked=document.getElementById('viewCheck_'+(channelSelect)).checked;
if (!bChecked)
......@@ -253,6 +262,8 @@ function applyViewControlsToSelected()
document.getElementById('visible_'+(n-1)).checked=document.getElementById('viewShowChannel').checked;
document.getElementById('surface_'+(n-1)).checked=document.getElementById('viewSegmentationOutlines').checked;
document.getElementById('labels_'+(n-1)).checked=document.getElementById('viewSegmentationLabels').checked;
document.getElementById('allBright_'+(n-1)).checked=document.getElementById('viewAllBright').checked;
}
}
updateSliderParams();
......@@ -263,6 +274,7 @@ function initSliders(channelSelect)
document.getElementById('viewShowChannel').checked=gRenderParams[channelSelect].bVisible;
document.getElementById('viewSegmentationOutlines').checked=gRenderParams[channelSelect].bShowSurface;
document.getElementById('viewSegmentationLabels').checked=gRenderParams[channelSelect].bShowLabels;
document.getElementById('viewAllBright').checked=gRenderParams[channelSelect].bAllBright;
document.getElementById('alphaSlider').value=gRenderParams[channelSelect].alpha;
document.getElementById('darkSlider').value=gRenderParams[channelSelect].dark;
......@@ -295,6 +307,8 @@ function viewUpdateChecks()
document.getElementById('visible_'+(n-1)).checked=document.getElementById('viewShowChannel').checked;
document.getElementById('surface_'+(n-1)).checked=document.getElementById('viewSegmentationOutlines').checked;
document.getElementById('labels_'+(n-1)).checked=document.getElementById('viewSegmentationLabels').checked;
document.getElementById('allBright_'+(n-1)).checked=document.getElementById('viewAllBright').checked;
}
}
updateSliderParams();
......@@ -398,11 +412,15 @@ function populateViewTab()
'" id="surface_'+(nChannel)+'">Surface</input></td>';
row.innerHTML+= '<td><input type="checkbox" onchange="updateSliderParams()" '+
'" id="labels_'+(nChannel)+'">Labels</input></td>';
row.innerHTML+= '<td><input type="checkbox" onchange="updateSliderParams()" '+
'" id="allBright_'+(nChannel)+'">all bright</input></td>';
document.getElementById('visible_'+nChannel).checked=gRenderParams[nChannel].bVisible;
document.getElementById('surface_'+nChannel).checked=gRenderParams[nChannel].bShowSurface;
document.getElementById('labels_'+nChannel).checked=gRenderParams[nChannel].bShowLabels;
document.getElementById('allBright_'+nChannel).checked=gRenderParams[nChannel].bAllBright;
}
......@@ -412,11 +430,12 @@ function populateViewTab()
viewControls.innerHTML+='<input type="checkbox" id="viewShowChannel" onclick="applyViewControlsToSelected()" accessKey="V" checked> <U>V</U>isible'+'</input>';
viewControls.innerHTML+=' <input type="checkbox" id="viewSegmentationOutlines" onclick="applyViewControlsToSelected()" accessKey="S"" checked> <U>S</U>urface'+'</input>';
viewControls.innerHTML+=' <input type="checkbox" id="viewSegmentationLabels" onclick="applyViewControlsToSelected()" checked accessKey="L"> <U>L</U>abels'+'</input>';
viewControls.innerHTML+=' <input type="checkbox" id="viewAllBright" onclick="applyViewControlsToSelected()" checked>all bright</input>';
// ------------ transfer functions sliders
var viewTransfer=document.getElementById('viewTransfer');
viewTransfer.innerHTML='<div id="transferFunctionDiv" class="viewSeparator"> </div> ';
viewTransfer
var defaultSlider='<input type="range" min=0 max=1 step=0.1 oninput="updateSliderParams()" class="viewInput" ';
var newDiv=document.createElement('div');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment