Commit c1597c93 authored by schultezub's avatar schultezub
Browse files

* added selectable render mode to GeometryData

* added slice marker rendering to SliceExtractor

git-svn-id: https://camplinux.in.tum.de/svn/campvis/trunk@497 bb408c1c-ae56-11e1-83d9-df6b3e0c105e
parent c980f2ed
...@@ -184,7 +184,7 @@ namespace campvis { ...@@ -184,7 +184,7 @@ namespace campvis {
} }
_paintShader->setIgnoreUniformLocationError(false); _paintShader->setIgnoreUniformLocationError(false);
_quad->render(); _quad->render(GL_POLYGON);
} }
void DataContainerInspectorCanvas::invalidate() { void DataContainerInspectorCanvas::invalidate() {
......
...@@ -103,7 +103,7 @@ namespace campvis { ...@@ -103,7 +103,7 @@ namespace campvis {
return _faceNormal; return _faceNormal;
} }
void FaceGeometry::render() const { void FaceGeometry::render(GLenum mode) const {
createGLBuffers(); createGLBuffers();
if (! _buffersInitialized) { if (! _buffersInitialized) {
LERROR("Cannot render without initialized OpenGL buffers."); LERROR("Cannot render without initialized OpenGL buffers.");
...@@ -121,10 +121,7 @@ namespace campvis { ...@@ -121,10 +121,7 @@ namespace campvis {
vao.addVertexAttribute(tgt::VertexArrayObject::NormalsAttribute, _normalsBuffer); vao.addVertexAttribute(tgt::VertexArrayObject::NormalsAttribute, _normalsBuffer);
LGL_ERROR; LGL_ERROR;
if (_vertices.size() > 2) glDrawArrays(mode, 0, static_cast<GLsizei>(_vertices.size()));
glDrawArrays(GL_POLYGON, 0, static_cast<GLsizei>(_vertices.size()));
else
glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(_vertices.size()));
LGL_ERROR; LGL_ERROR;
} }
......
...@@ -128,8 +128,9 @@ namespace campvis { ...@@ -128,8 +128,9 @@ namespace campvis {
/** /**
* Renders this FaceGeometry. * Renders this FaceGeometry.
* Must be called from a valid OpenGL context. * Must be called from a valid OpenGL context.
* \param mode OpenGL rendering mode for this face
*/ */
virtual void render() const; virtual void render(GLenum mode) const;
/** /**
* Creates the OpenGL VBOs and the VAO for this face's geometry. * Creates the OpenGL VBOs and the VAO for this face's geometry.
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#ifndef GEOMETRYDATA_H__ #ifndef GEOMETRYDATA_H__
#define GEOMETRYDATA_H__ #define GEOMETRYDATA_H__
#include "tgt/tgt_gl.h"
#include "core/datastructures/abstractdata.h" #include "core/datastructures/abstractdata.h"
#include <vector> #include <vector>
...@@ -68,7 +69,7 @@ namespace campvis { ...@@ -68,7 +69,7 @@ namespace campvis {
* Renders this GeometryData. * Renders this GeometryData.
* Must be called from a valid OpenGL context. * Must be called from a valid OpenGL context.
*/ */
virtual void render() const = 0; virtual void render(GLenum mode = GL_POLYGON) const = 0;
/** /**
* Creates the OpenGL VBOs and the VAO for this geometry. * Creates the OpenGL VBOs and the VAO for this geometry.
......
...@@ -82,7 +82,7 @@ namespace campvis { ...@@ -82,7 +82,7 @@ namespace campvis {
} }
void MeshGeometry::render() const { void MeshGeometry::render(GLenum mode) const {
createGLBuffers(); createGLBuffers();
if (! _buffersInitialized) { if (! _buffersInitialized) {
LERROR("Cannot render without initialized OpenGL buffers."); LERROR("Cannot render without initialized OpenGL buffers.");
...@@ -104,7 +104,7 @@ namespace campvis { ...@@ -104,7 +104,7 @@ namespace campvis {
for (std::vector<FaceGeometry>::const_iterator it = _faces.begin(); it != _faces.end(); ++it) { for (std::vector<FaceGeometry>::const_iterator it = _faces.begin(); it != _faces.end(); ++it) {
GLsizei numVertices = static_cast<GLsizei>(it->getVertices().size()); GLsizei numVertices = static_cast<GLsizei>(it->getVertices().size());
if (numVertices > 2) if (numVertices > 2)
glDrawArrays(GL_POLYGON, startIndex, numVertices); glDrawArrays(mode, startIndex, numVertices);
else else
glDrawArrays(GL_LINES, startIndex, numVertices); glDrawArrays(GL_LINES, startIndex, numVertices);
startIndex += numVertices; startIndex += numVertices;
......
...@@ -95,8 +95,9 @@ namespace campvis { ...@@ -95,8 +95,9 @@ namespace campvis {
/** /**
* Renders this MeshGeometry. * Renders this MeshGeometry.
* Must be called from a valid OpenGL context. * Must be called from a valid OpenGL context.
* \param mode OpenGL rendering mode for this mesh
*/ */
virtual void render() const; virtual void render(GLenum mode) const;
/** /**
* Creates the OpenGL VBOs and the VAO for this face's geometry. * Creates the OpenGL VBOs and the VAO for this face's geometry.
......
...@@ -56,8 +56,8 @@ namespace campvis { ...@@ -56,8 +56,8 @@ namespace campvis {
delete _quad; delete _quad;
} }
void QuadRenderer::renderQuad() { void QuadRenderer::renderQuad(GLenum mode) {
_quad->render(); _quad->render(mode);
} }
......
...@@ -50,7 +50,7 @@ namespace campvis { ...@@ -50,7 +50,7 @@ namespace campvis {
*/ */
virtual ~QuadRenderer(); virtual ~QuadRenderer();
void renderQuad(); void renderQuad(GLenum mode = GL_POLYGON);
private: private:
QuadRenderer(); QuadRenderer();
......
...@@ -44,20 +44,24 @@ uniform TFParameters1D _transferFunctionParams; ...@@ -44,20 +44,24 @@ uniform TFParameters1D _transferFunctionParams;
uniform mat4 _texCoordsMatrix; uniform mat4 _texCoordsMatrix;
uniform bool _useTexturing;
uniform vec4 _color;
void main() { void main() {
vec4 texel = getElement3DNormalized(_texture, _textureParams, (_texCoordsMatrix * vec4(ex_TexCoord, 1.0)).xyz); if (_useTexturing) {
vec4 texel = getElement3DNormalized(_texture, _textureParams, (_texCoordsMatrix * vec4(ex_TexCoord, 1.0)).xyz);
if (_textureParams._numChannels == 1) { if (_textureParams._numChannels == 1) {
out_Color = lookupTF(_transferFunction, _transferFunctionParams, texel.a); out_Color = lookupTF(_transferFunction, _transferFunctionParams, texel.a);
} }
else if (_textureParams._numChannels == 3) { else if (_textureParams._numChannels == 3) {
out_Color = vec4(abs(texel.rgb), 1.0); out_Color = vec4(abs(texel.rgb), 1.0);
} }
else if (_textureParams._numChannels == 4) { else if (_textureParams._numChannels == 4) {
out_Color = (abs(texel) - vec4(_transferFunctionParams._intensityDomain.x)) / (_transferFunctionParams._intensityDomain.y - _transferFunctionParams._intensityDomain.x); out_Color = (abs(texel) - vec4(_transferFunctionParams._intensityDomain.x)) / (_transferFunctionParams._intensityDomain.y - _transferFunctionParams._intensityDomain.x);
}
} }
else {
//if (out_Color.a == 0) { out_Color = _color;
// renderBackground(ex_TexCoord.xy, out_Color); }
//}
} }
...@@ -183,7 +183,7 @@ namespace campvis { ...@@ -183,7 +183,7 @@ namespace campvis {
glClearDepth(1.0f); glClearDepth(1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glCullFace(p_enableMirror.getValue() ? GL_FRONT : GL_BACK); glCullFace(p_enableMirror.getValue() ? GL_FRONT : GL_BACK);
clipped.render(); clipped.render(GL_POLYGON);
entrypoints.second->deactivate(); entrypoints.second->deactivate();
...@@ -200,7 +200,7 @@ namespace campvis { ...@@ -200,7 +200,7 @@ namespace campvis {
glClearDepth(0.0f); glClearDepth(0.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glCullFace(p_enableMirror.getValue() ? GL_BACK : GL_FRONT); glCullFace(p_enableMirror.getValue() ? GL_BACK : GL_FRONT);
clipped.render(); clipped.render(GL_POLYGON);
exitpoints.second->deactivate(); exitpoints.second->deactivate();
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "tgt/shadermanager.h" #include "tgt/shadermanager.h"
#include "tgt/textureunit.h" #include "tgt/textureunit.h"
#include "core/datastructures/facegeometry.h"
#include "core/datastructures/imagedata.h" #include "core/datastructures/imagedata.h"
#include "core/datastructures/imagerepresentationgl.h" #include "core/datastructures/imagerepresentationgl.h"
#include "core/datastructures/imagerepresentationrendertarget.h" #include "core/datastructures/imagerepresentationrendertarget.h"
...@@ -55,9 +56,12 @@ namespace campvis { ...@@ -55,9 +56,12 @@ namespace campvis {
, p_sourceImageID("sourceImageID", "Input Image", "", DataNameProperty::READ, AbstractProcessor::INVALID_PROPERTIES) , p_sourceImageID("sourceImageID", "Input Image", "", DataNameProperty::READ, AbstractProcessor::INVALID_PROPERTIES)
, p_targetImageID("targetImageID", "Output Image", "", DataNameProperty::WRITE) , p_targetImageID("targetImageID", "Output Image", "", DataNameProperty::WRITE)
, p_sliceOrientation("SliceOrientation", "Slice Orientation", compositingOptions, 3) , p_sliceOrientation("SliceOrientation", "Slice Orientation", compositingOptions, 3)
, p_xSliceNumber("XSliceNumber", "X Slice Number", 0, 0, 0) , p_xSliceNumber("XSliceNumber", "X Slice Number", 0, 0, 0)
, p_xSliceColor("XSliceColor", "X Slice Color", tgt::vec4(1.f, 0.f, 0.f, 1.f), tgt::vec4(0.f), tgt::vec4(1.f))
, p_ySliceNumber("YSliceNumber", "Y Slice Number", 0, 0, 0) , p_ySliceNumber("YSliceNumber", "Y Slice Number", 0, 0, 0)
, p_ySliceColor("YSliceColor", "Y Slice Color", tgt::vec4(0.f, 1.f, 0.f, 1.f), tgt::vec4(0.f), tgt::vec4(1.f))
, p_zSliceNumber("ZSliceNumber", "Z Slice Number", 0, 0, 0) , p_zSliceNumber("ZSliceNumber", "Z Slice Number", 0, 0, 0)
, p_zSliceColor("ZSliceColor", "Z Slice Color", tgt::vec4(0.f, 0.f, 1.f, 1.f), tgt::vec4(0.f), tgt::vec4(1.f))
, p_transferFunction("transferFunction", "Transfer Function", new SimpleTransferFunction(256)) , p_transferFunction("transferFunction", "Transfer Function", new SimpleTransferFunction(256))
, _shader(0) , _shader(0)
{ {
...@@ -65,8 +69,11 @@ namespace campvis { ...@@ -65,8 +69,11 @@ namespace campvis {
addProperty(&p_targetImageID); addProperty(&p_targetImageID);
addProperty(&p_sliceOrientation); addProperty(&p_sliceOrientation);
addProperty(&p_xSliceNumber); addProperty(&p_xSliceNumber);
addProperty(&p_xSliceColor);
addProperty(&p_ySliceNumber); addProperty(&p_ySliceNumber);
addProperty(&p_ySliceColor);
addProperty(&p_zSliceNumber); addProperty(&p_zSliceNumber);
addProperty(&p_zSliceColor);
addProperty(&p_transferFunction); addProperty(&p_transferFunction);
//addDecorator(new ProcessorDecoratorBackground()); //addDecorator(new ProcessorDecoratorBackground());
...@@ -100,59 +107,140 @@ namespace campvis { ...@@ -100,59 +107,140 @@ namespace campvis {
validate(AbstractProcessor::INVALID_PROPERTIES); validate(AbstractProcessor::INVALID_PROPERTIES);
} }
const tgt::svec3& imgSize = img->getSize(); tgt::vec3 imgSize(img->getSize());
std::pair<ImageData*, ImageRepresentationRenderTarget*> rt = ImageRepresentationRenderTarget::createWithImageData(_renderTargetSize.getValue());
// current slices in texture coordinates
tgt::vec3 sliceTexCoord = tgt::vec3(.5f + p_xSliceNumber.getValue(), .5f + p_ySliceNumber.getValue(), .5f + p_zSliceNumber.getValue()) / imgSize;
// texture coordinate transformation matrix (will be configured later)
tgt::mat4 texCoordsMatrix = tgt::mat4::zero; tgt::mat4 texCoordsMatrix = tgt::mat4::zero;
float renderTargetRatio = static_cast<float>(_renderTargetSize.getValue().x) / static_cast<float>(_renderTargetSize.getValue().y); float renderTargetRatio = static_cast<float>(_renderTargetSize.getValue().x) / static_cast<float>(_renderTargetSize.getValue().y);
float sliceRatio = 1.f; float sliceRatio = 1.f;
switch (p_sliceOrientation.getValue()) { switch (p_sliceOrientation.getValue()) {
case XY_PLANE: case XY_PLANE:
texCoordsMatrix = tgt::mat4::identity; texCoordsMatrix.t00 = 1.f;
texCoordsMatrix.t23 = (static_cast<float>(p_zSliceNumber.getValue() + 0.5f) / static_cast<float>(imgSize.z)); texCoordsMatrix.t11 = 1.f;
sliceRatio = texCoordsMatrix.t22 = 1.f;
(static_cast<float>(imgSize.x) * img.getImageData()->getMappingInformation().getVoxelSize().x) //texCoordsMatrix.t13 = 1.f;
/ (static_cast<float>(imgSize.y) * img.getImageData()->getMappingInformation().getVoxelSize().y); texCoordsMatrix.t23 = sliceTexCoord.z;
break; sliceRatio =
(static_cast<float>(imgSize.x) * img.getImageData()->getMappingInformation().getVoxelSize().x)
case XZ_PLANE: / (static_cast<float>(imgSize.y) * img.getImageData()->getMappingInformation().getVoxelSize().y);
texCoordsMatrix.t00 = 1.f; // setup a permutation matrix, swapping z- and y- break;
texCoordsMatrix.t12 = 1.f; // components on vectors being multiplied with it
texCoordsMatrix.t21 = 1.f; case XZ_PLANE:
texCoordsMatrix.t33 = 1.f; texCoordsMatrix.t00 = 1.f;
sliceRatio = static_cast<float>(imgSize.x) / static_cast<float>(imgSize.y); texCoordsMatrix.t12 = 1.f;
texCoordsMatrix.t13 = (static_cast<float>(p_ySliceNumber.getValue() + 0.5f) / static_cast<float>(imgSize.y)); texCoordsMatrix.t21 = 1.f;
sliceRatio = texCoordsMatrix.t33 = 1.f;
(static_cast<float>(imgSize.x) * img.getImageData()->getMappingInformation().getVoxelSize().x) texCoordsMatrix.t13 = sliceTexCoord.y;
/ (static_cast<float>(imgSize.z) * img.getImageData()->getMappingInformation().getVoxelSize().z); sliceRatio =
break; (static_cast<float>(imgSize.x) * img.getImageData()->getMappingInformation().getVoxelSize().x)
/ (static_cast<float>(imgSize.z) * img.getImageData()->getMappingInformation().getVoxelSize().z);
case YZ_PLANE: break;
texCoordsMatrix.t01 = 1.f; // setup a permutation matrix, swapping x-, y- and z-
texCoordsMatrix.t12 = 1.f; // components on vectors being multiplied with it case YZ_PLANE:
texCoordsMatrix.t20 = 1.f; texCoordsMatrix.t02 = 1.f;
texCoordsMatrix.t33 = 1.f; texCoordsMatrix.t10 = 1.f;
texCoordsMatrix.t13 = (static_cast<float>(p_xSliceNumber.getValue() + 0.5f) / static_cast<float>(imgSize.x)); texCoordsMatrix.t21 = 1.f;
sliceRatio = //texCoordsMatrix.t13 = 0.f;
(static_cast<float>(imgSize.y) * img.getImageData()->getMappingInformation().getVoxelSize().y) texCoordsMatrix.t33 = 1.f;
/ (static_cast<float>(imgSize.z) * img.getImageData()->getMappingInformation().getVoxelSize().z); texCoordsMatrix.t03 = sliceTexCoord.x;
break; sliceRatio =
(static_cast<float>(imgSize.y) * img.getImageData()->getMappingInformation().getVoxelSize().y)
/ (static_cast<float>(imgSize.z) * img.getImageData()->getMappingInformation().getVoxelSize().z);
break;
} }
// configure model matrix so that slices are rendered with correct aspect ratio
float ratioRatio = sliceRatio / renderTargetRatio; float ratioRatio = sliceRatio / renderTargetRatio;
tgt::mat4 modelMatrix = (ratioRatio > 1) ? tgt::mat4::createScale(tgt::vec3(1.f, 1.f / ratioRatio, 1.f)) : tgt::mat4::createScale(tgt::vec3(ratioRatio, 1.f, 1.f)); tgt::mat4 modelMatrix = (ratioRatio > 1) ? tgt::mat4::createScale(tgt::vec3(1.f, 1.f / ratioRatio, 1.f)) : tgt::mat4::createScale(tgt::vec3(ratioRatio, 1.f, 1.f));
// prepare OpenGL
std::pair<ImageData*, ImageRepresentationRenderTarget*> rt = ImageRepresentationRenderTarget::createWithImageData(_renderTargetSize.getValue());
_shader->activate(); _shader->activate();
decorateRenderProlog(data, _shader); decorateRenderProlog(data, _shader);
tgt::TextureUnit inputUnit, tfUnit; tgt::TextureUnit inputUnit, tfUnit;
img->bind(_shader, inputUnit); img->bind(_shader, inputUnit);
p_transferFunction.getTF()->bind(_shader, tfUnit); p_transferFunction.getTF()->bind(_shader, tfUnit);
// render slice
_shader->setUniform("_texCoordsMatrix", texCoordsMatrix); _shader->setUniform("_texCoordsMatrix", texCoordsMatrix);
_shader->setUniform("_modelMatrix", modelMatrix); _shader->setUniform("_modelMatrix", modelMatrix);
_shader->setUniform("_useTexturing", true);
rt.second->activate(); rt.second->activate();
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
QuadRdr.renderQuad(); QuadRdr.renderQuad();
// render slice markers
glLineWidth(2.f);
_shader->setUniform("_useTexturing", false);
switch (p_sliceOrientation.getValue()) {
case XY_PLANE:
_shader->setUniform("_color", p_zSliceColor.getValue());
QuadRdr.renderQuad(GL_LINE_LOOP);
modelMatrix.t00 = 0.f;
modelMatrix.t03 = 2.f * sliceTexCoord.x - 1.f;
modelMatrix.t03 *= (ratioRatio > 1) ? 1.f : ratioRatio;
_shader->setUniform("_modelMatrix", modelMatrix);
_shader->setUniform("_color", p_xSliceColor.getValue());
QuadRdr.renderQuad(GL_LINE_STRIP);
modelMatrix.t00 = (ratioRatio > 1) ? 1.f : ratioRatio;
modelMatrix.t11 = 0.f;
modelMatrix.t03 = 0.f;
modelMatrix.t13 = 2.f * sliceTexCoord.y - 1.f;
modelMatrix.t13 *= (ratioRatio > 1) ? 1.f : ratioRatio;
_shader->setUniform("_modelMatrix", modelMatrix);
_shader->setUniform("_color", p_ySliceColor.getValue());
QuadRdr.renderQuad(GL_LINE_STRIP);
break;
case XZ_PLANE:
_shader->setUniform("_color", p_ySliceColor.getValue());
QuadRdr.renderQuad(GL_LINE_LOOP);
modelMatrix.t00 = 0.f;
modelMatrix.t03 = 2.f * sliceTexCoord.x - 1.f;
modelMatrix.t03 *= (ratioRatio > 1) ? 1.f : ratioRatio;
_shader->setUniform("_modelMatrix", modelMatrix);
_shader->setUniform("_color", p_xSliceColor.getValue());
QuadRdr.renderQuad(GL_LINE_STRIP);
modelMatrix.t00 = (ratioRatio > 1) ? 1.f : ratioRatio;
modelMatrix.t11 = 0.f;
modelMatrix.t03 = 0.f;
modelMatrix.t13 = 2.f * sliceTexCoord.z - 1.f;
modelMatrix.t13 *= (ratioRatio > 1) ? 1.f / ratioRatio : 1.f;
_shader->setUniform("_modelMatrix", modelMatrix);
_shader->setUniform("_color", p_zSliceColor.getValue());
QuadRdr.renderQuad(GL_LINE_STRIP);
break;
case YZ_PLANE:
_shader->setUniform("_color", p_xSliceColor.getValue());
QuadRdr.renderQuad(GL_LINE_LOOP);
modelMatrix.t00 = 0.f;
modelMatrix.t03 = 2.f * sliceTexCoord.y - 1.f;
modelMatrix.t03 *= (ratioRatio > 1) ? 1.f : ratioRatio;
_shader->setUniform("_modelMatrix", modelMatrix);
_shader->setUniform("_color", p_ySliceColor.getValue());
QuadRdr.renderQuad(GL_LINE_STRIP);
modelMatrix.t00 = (ratioRatio > 1) ? 1.f : ratioRatio;
modelMatrix.t11 = 0.f;
modelMatrix.t03 = 0.f;
modelMatrix.t13 = 2.f * sliceTexCoord.z - 1.f;
modelMatrix.t13 *= (ratioRatio > 1) ? 1.f / ratioRatio : 1.f;
_shader->setUniform("_modelMatrix", modelMatrix);
_shader->setUniform("_color", p_zSliceColor.getValue());
QuadRdr.renderQuad(GL_LINE_STRIP);
break;
}
rt.second->deactivate(); rt.second->deactivate();
decorateRenderEpilog(_shader); decorateRenderEpilog(_shader);
...@@ -187,4 +275,7 @@ namespace campvis { ...@@ -187,4 +275,7 @@ namespace campvis {
} }
} }
void SliceExtractor::updateBorderGeometry() {
}
} }
...@@ -32,6 +32,9 @@ ...@@ -32,6 +32,9 @@
#include <string> #include <string>
#include "tgt/buffer.h"
#include "tgt/vertexarrayobject.h"
#include "core/pipeline/abstractprocessordecorator.h" #include "core/pipeline/abstractprocessordecorator.h"
#include "core/pipeline/visualizationprocessor.h" #include "core/pipeline/visualizationprocessor.h"
#include "core/properties/datanameproperty.h" #include "core/properties/datanameproperty.h"
...@@ -45,6 +48,7 @@ namespace tgt { ...@@ -45,6 +48,7 @@ namespace tgt {
} }
namespace campvis { namespace campvis {
class FaceGeometry;
class ImageData; class ImageData;
/** /**
...@@ -87,14 +91,19 @@ namespace campvis { ...@@ -87,14 +91,19 @@ namespace campvis {
GenericOptionProperty<SliceOrientation> p_sliceOrientation; ///< orientation of the slice to extract GenericOptionProperty<SliceOrientation> p_sliceOrientation; ///< orientation of the slice to extract
IntProperty p_xSliceNumber; ///< number of the slice in X direction IntProperty p_xSliceNumber; ///< number of the slice in X direction
Vec4Property p_xSliceColor; ///< color for x marker
IntProperty p_ySliceNumber; ///< number of the slice in Y direction IntProperty p_ySliceNumber; ///< number of the slice in Y direction
Vec4Property p_ySliceColor; ///< color for y marker
IntProperty p_zSliceNumber; ///< number of the slice in Z direction IntProperty p_zSliceNumber; ///< number of the slice in Z direction
Vec4Property p_zSliceColor; ///< color for z marker
TransferFunctionProperty p_transferFunction; ///< Transfer function TransferFunctionProperty p_transferFunction; ///< Transfer function
protected: protected:
/// adapts the range of the p_xSliceNumber property to the image /// adapts the range of the p_xSliceNumber property to the image
void updateProperties(DataHandle img); void updateProperties(DataHandle img);
void updateBorderGeometry();
tgt::Shader* _shader; ///< Shader for slice rendering tgt::Shader* _shader; ///< Shader for slice rendering
static const std::string loggerCat_; static const std::string loggerCat_;
......
...@@ -120,7 +120,7 @@ namespace campvis { ...@@ -120,7 +120,7 @@ namespace campvis {
rt.second->activate(); rt.second->activate();
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
slice.render(); slice.render(GL_POLYGON);
rt.second->deactivate(); rt.second->deactivate();
_shader->deactivate(); _shader->deactivate();
......
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