Commit d2b9f459 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Merge branch 'fix-cppcheck-issues' into 'development'

Fix Cppcheck Issues
parents ef127d10 a7c1e91a
...@@ -78,7 +78,7 @@ namespace campvis { ...@@ -78,7 +78,7 @@ namespace campvis {
throw tgt::FileException("Unknown identifier in vtk file.", p_url.getValue()); throw tgt::FileException("Unknown identifier in vtk file.", p_url.getValue());
// next line is the header - contains only unimportant data // next line is the header - contains only unimportant data
curLine = getTrimmedLine(file); getTrimmedLine(file);
// this line is the format // this line is the format
curLine = StringUtils::lowercase(getTrimmedLine(file)); curLine = StringUtils::lowercase(getTrimmedLine(file));
...@@ -117,7 +117,6 @@ namespace campvis { ...@@ -117,7 +117,6 @@ namespace campvis {
void VtkImageReader::parseStructuredPoints(DataContainer& data, std::ifstream& file) throw (tgt::Exception, std::exception) { void VtkImageReader::parseStructuredPoints(DataContainer& data, std::ifstream& file) throw (tgt::Exception, std::exception) {
// init optional parameters with sane default values // init optional parameters with sane default values
std::string url;
size_t dimensionality = 3; size_t dimensionality = 3;
tgt::svec3 size(static_cast<size_t>(0)); tgt::svec3 size(static_cast<size_t>(0));
......
...@@ -40,6 +40,8 @@ namespace campvis { ...@@ -40,6 +40,8 @@ namespace campvis {
, _imageReader() , _imageReader()
, _resampler(&_canvasSize) , _resampler(&_canvasSize)
, _ve(&_canvasSize) , _ve(&_canvasSize)
, _glr(nullptr)
, _glr2(nullptr)
{ {
addProcessor(&_imageReader); addProcessor(&_imageReader);
addProcessor(&_resampler); addProcessor(&_resampler);
......
...@@ -53,7 +53,6 @@ namespace campvis { ...@@ -53,7 +53,6 @@ namespace campvis {
void operator() (const tbb::blocked_range<size_t>& range) const { void operator() (const tbb::blocked_range<size_t>& range) const {
for (size_t i = range.begin(); i != range.end(); ++i) { for (size_t i = range.begin(); i != range.end(); ++i) {
tgt::svec3 pos = _intensities->getParent()->indexToPosition(i); tgt::svec3 pos = _intensities->getParent()->indexToPosition(i);
const tgt::svec3& size = _intensities->getSize();
const tgt::vec4& gradient = _gradients->getElement(i); const tgt::vec4& gradient = _gradients->getElement(i);
float fl = _intensities->getElementNormalized(i, 0); float fl = _intensities->getElementNormalized(i, 0);
...@@ -183,7 +182,7 @@ namespace campvis { ...@@ -183,7 +182,7 @@ namespace campvis {
WeaklyTypedPointer wtp(WeaklyTypedPointer::FLOAT, 1, tmp); WeaklyTypedPointer wtp(WeaklyTypedPointer::FLOAT, 1, tmp);
ImageData* imgTex = new ImageData(2, tgt::svec3(256, 256, 1), 1); ImageData* imgTex = new ImageData(2, tgt::svec3(256, 256, 1), 1);
ImageRepresentationGL* tex = ImageRepresentationGL::create(imgTex, wtp); ImageRepresentationGL::create(imgTex, wtp);
delete [] tmp; delete [] tmp;
data.addData("foo", imgTex); data.addData("foo", imgTex);
......
...@@ -81,7 +81,6 @@ namespace campvis { ...@@ -81,7 +81,6 @@ namespace campvis {
if (img != 0) { if (img != 0) {
if (img->getDimensionality() == 3) { if (img->getDimensionality() == 3) {
const tgt::Camera& cam = p_camera.getValue(); const tgt::Camera& cam = p_camera.getValue();
const tgt::svec3& imgSize = img->getSize();
// Creating the slice proxy geometry works as follows: // Creating the slice proxy geometry works as follows:
// Create the cube proxy geometry for the volume, then clip the cube against the slice plane. // Create the cube proxy geometry for the volume, then clip the cube against the slice plane.
......
...@@ -189,7 +189,6 @@ namespace campvis { ...@@ -189,7 +189,6 @@ namespace campvis {
_shader->setUniform("_renderBackground", true); _shader->setUniform("_renderBackground", true);
vrImage->bind(_shader, colorUnit, depthUnit); vrImage->bind(_shader, colorUnit, depthUnit);
float ratio = static_cast<float>(vrs.x) / static_cast<float>(rts.x);
_shader->setUniform("_modelMatrix", tgt::mat4::createScale(tgt::vec3(vrs.x, vrs.y, .5f))); _shader->setUniform("_modelMatrix", tgt::mat4::createScale(tgt::vec3(vrs.x, vrs.y, .5f)));
_shader->setUniform("_viewMatrix", tgt::mat4::createTranslation(tgt::vec3(srs.x, 0.f, 0.f))); _shader->setUniform("_viewMatrix", tgt::mat4::createTranslation(tgt::vec3(srs.x, 0.f, 0.f)));
_quad->render(GL_POLYGON); _quad->render(GL_POLYGON);
......
Supports Markdown
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