Throw exception if extracted region is too large.

This commit is contained in:
David Williams
2014-05-27 23:23:24 +02:00
parent 37ba9ab338
commit 35049b7a53
2 changed files with 12 additions and 4 deletions

View File

@ -186,13 +186,15 @@ int main(int argc, char *argv[])
std::cout << "Compression ratio: 1 to " << (1.0/(volData.calculateCompressionRatio())) << std::endl;
//Extract the surface
auto mesh = extractCubicMesh(&volData, reg);
auto mesh = extractCubicMesh(&volData, reg2);
std::cout << "#vertices: " << mesh.getNoOfVertices() << std::endl;
//Pass the surface to the OpenGL window
openGLWidget.addMesh(mesh);
auto decodedMesh = decode(mesh);
openGLWidget.setViewableRegion(reg);
//Pass the surface to the OpenGL window
openGLWidget.addMesh(decodedMesh);
openGLWidget.setViewableRegion(reg2);
//Run the message pump.
return app.exec();