Commit 7fa00b85 authored by schultezub's avatar schultezub
Browse files

Further work on IxpvDemo

git-svn-id: https://camplinux.in.tum.de/svn/campvis/trunk@396 bb408c1c-ae56-11e1-83d9-df6b3e0c105e
parent b22e0d2f
......@@ -70,5 +70,10 @@ void main() {
fragDepth = min(xRayDepth, sliceDepth);
out_Color = weightingFactor*xRayColor + (1.0-weightingFactor)*sliceColor;
//gl_FragDepth = fragDepth;
gl_FragDepth = fragDepth;
if (out_Color.a == 0) {
renderBackground(ex_TexCoord.xy, out_Color);
}
}
......@@ -137,13 +137,14 @@ namespace campvis {
_ctFullDRR.p_transferFunction.replaceTF(tf);
_ctFullDRR.p_targetImageID.setValue("ct.drr.full");
_ctFullDRR.p_samplingRate.setValue(1.f);
_ctFullDRR.p_invertMapping.setValue(true);
Geometry1DTransferFunction* tf2 = new Geometry1DTransferFunction(128, tgt::vec2(0.f, 1.f));
tf2->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.5f, 1.f), tgt::col4(0, 0, 0, 0), tgt::col4(0, 0, 0, 180)));
_ctClippedDRR.p_transferFunction.replaceTF(tf2);
_ctClippedDRR.p_targetImageID.setValue("ct.drr.clipped");
_ctClippedDRR.p_samplingRate.setValue(1.f);
_ctClippedDRR.p_invertMapping.setValue(true);
// = US Setup =====================================================================================
......@@ -201,9 +202,9 @@ namespace campvis {
_ctDVR.p_transferFunction.getTF()->setImageHandle(dh);
_ctDVR.p_transferFunction.getTF()->setIntensityDomain(tgt::vec2(ii.getLeft(), ii.getRight()));
_ctFullDRR.p_transferFunction.getTF()->setImageHandle(dh);
_ctFullDRR.p_transferFunction.getTF()->setIntensityDomain(tgt::vec2(ii.getLeft(), ii.getRight()));
_ctFullDRR.p_transferFunction.getTF()->setIntensityDomain(tgt::vec2(.33f, .7f));
_ctClippedDRR.p_transferFunction.getTF()->setImageHandle(dh);
_ctClippedDRR.p_transferFunction.getTF()->setIntensityDomain(tgt::vec2(ii.getLeft(), ii.getRight()));
_ctClippedDRR.p_transferFunction.getTF()->setIntensityDomain(tgt::vec2(.33f, .7f));
{
tgt::GLContextScopedLock lock(_canvas->getContext());
......@@ -220,7 +221,10 @@ namespace campvis {
_trackballHandler->setSceneBounds(volumeExtent);
_trackballHandler->setCenter(volumeExtent.center());
_trackballHandler->reinitializeCamera(pos, volumeExtent.center(), _camera.getValue().getUpVector());
_trackballHandler->reinitializeCamera(
tgt::vec3(399.f, -900.f, 468.f),
tgt::vec3(155.5f, 229.5f, 254.6f),
tgt::vec3(0.959f, 0.279f, -0.042f));
}
}
......
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