Skip to content
Snippets Groups Projects
Commit 9496dd37 authored by Ali Can Demiralp's avatar Ali Can Demiralp
Browse files

Removed image writer. No longer necessary.

parent 3ff3fdf5
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,6 @@
#include <vtkAVIWriter.h>
#include <vtkOSPRayPass.h>
#include <vtkPNGWriter.h>
#include <vtkPolyDataMapper.h>
#include <vtkRenderer.h>
#include <vtkRenderWindow.h>
......@@ -44,10 +43,8 @@ std::int32_t main(std::int32_t argc, char** argv)
std::cout << "Setting up image and video writers.\n";
auto window_to_image = vtkSmartPointer<vtkWindowToImageFilter>::New();
auto image_writer = vtkSmartPointer<vtkPNGWriter> ::New();
auto video_writer = vtkSmartPointer<vtkAVIWriter> ::New();
window_to_image->SetInput (window);
image_writer ->SetInputConnection(window_to_image->GetOutputPort());
video_writer ->SetInputConnection(window_to_image->GetOutputPort());
video_writer ->SetFileName ("video.avi");
video_writer ->SetQuality (2);
......@@ -58,7 +55,7 @@ std::int32_t main(std::int32_t argc, char** argv)
auto current_time = 0.0f;
auto counter = 0;
auto last_slice = -1;
while (current_time < settings.key_frames.back().time && counter < 10)
while (current_time < settings.key_frames.back().time)
{
std::cout << "Rendering frame " << counter << ".\n";
......@@ -81,8 +78,6 @@ std::int32_t main(std::int32_t argc, char** argv)
}
window ->Render();
image_writer->SetFileName((std::string("frame_") + std::to_string(counter) + std::string(".png")).c_str());
image_writer->Write ();
video_writer->Write ();
current_time += settings.update_rate;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment