Example #1
0
        public void StartRecord()
        {
            // If already started, return directly.
            if (IsRecording) return;

            // Check the file path
            if (string.IsNullOrEmpty(FilePath)) throw new ArgumentNullException(/*MSG0*/"FilePath is not set!");

            // Initialize the window to image filter and AVI writer
            m_WindowToImageFilter = new vtk.vtkWindowToImageFilter();
            m_WindowToImageFilter.SetInput(IApp.theApp.RenderWindow);

            m_aviWriter = new vtk.vtkAVIWriter();
            m_aviWriter.SetInputConnection(m_WindowToImageFilter.GetOutputPort());
            m_aviWriter.SetFileName(FilePath);

            // Start record
            m_aviWriter.Start();
        }