CustusX
2023.01.05-dev+develop.0da12
An IGT application
|
#include <cxSavingVideoRecorder.h>
Classes | |
struct | DataType |
Public Member Functions | |
VideoRecorderSaveThread (QObject *parent, QString saveFolder, QString prefix, bool compressed, bool writeColor) | |
virtual | ~VideoRecorderSaveThread () |
QString | addData (TimeInfo timestamp, vtkImageDataPtr data) |
void | stop () |
void | cancel () |
Protected Member Functions | |
virtual void | run () |
void | writeQueue () |
bool | openTimestampsFile () |
bool | closeTimestampsFile () |
void | write (DataType data) |
void | writeTimeStampsFile (TimeInfo timeStamps) |
Protected Attributes | |
QString | mSaveFolder |
QString | mPrefix |
int | mImageIndex |
std::list< DataType > | mPendingData |
QMutex | mMutex |
protects the mPendingData More... | |
bool | mStop |
bool | mCancel |
QFile | mTimestampsFile |
bool | mCompressed |
bool | mWriteColor |
Class that saves vtkImageData continously to file.
The data are saved as separate files in the saveSolder, using prefix as a common filename component:
A single file named <prefix>.fts containing N lines with timestamps is written. A sequence of N files named <prefix>_i.mhd (0<i<N) and corresponding .raw files are written.
If stop() is called, the thread will continue to write all remaining data, then close files and return from run().
Note: quit() will not work on this thread, use stop() instead.
Definition at line 48 of file cxSavingVideoRecorder.h.
cx::VideoRecorderSaveThread::VideoRecorderSaveThread | ( | QObject * | parent, |
QString | saveFolder, | ||
QString | prefix, | ||
bool | compressed, | ||
bool | writeColor | ||
) |
Create the thread object, set folder to save to.
Definition at line 35 of file cxSavingVideoRecorder.cpp.
|
virtual |
Definition at line 50 of file cxSavingVideoRecorder.cpp.
QString cx::VideoRecorderSaveThread::addData | ( | TimeInfo | timestamp, |
vtkImageDataPtr | data | ||
) |
Add data to be saved.
Definition at line 54 of file cxSavingVideoRecorder.cpp.
void cx::VideoRecorderSaveThread::cancel | ( | ) |
Definition at line 78 of file cxSavingVideoRecorder.cpp.
|
protected |
Definition at line 95 of file cxSavingVideoRecorder.cpp.
|
protected |
Definition at line 84 of file cxSavingVideoRecorder.cpp.
|
protectedvirtual |
Save the images to disk
Definition at line 160 of file cxSavingVideoRecorder.cpp.
void cx::VideoRecorderSaveThread::stop | ( | ) |
Definition at line 73 of file cxSavingVideoRecorder.cpp.
|
protected |
Definition at line 109 of file cxSavingVideoRecorder.cpp.
|
protected |
Write all pending images to file.
Definition at line 141 of file cxSavingVideoRecorder.cpp.
|
protected |
Definition at line 131 of file cxSavingVideoRecorder.cpp.
|
protected |
Definition at line 77 of file cxSavingVideoRecorder.h.
|
protected |
Definition at line 79 of file cxSavingVideoRecorder.h.
|
protected |
Definition at line 73 of file cxSavingVideoRecorder.h.
|
protected |
protects the mPendingData
Definition at line 75 of file cxSavingVideoRecorder.h.
|
protected |
Definition at line 74 of file cxSavingVideoRecorder.h.
|
protected |
Definition at line 72 of file cxSavingVideoRecorder.h.
|
protected |
Definition at line 71 of file cxSavingVideoRecorder.h.
|
protected |
Definition at line 76 of file cxSavingVideoRecorder.h.
|
protected |
Definition at line 78 of file cxSavingVideoRecorder.h.
|
protected |
Definition at line 80 of file cxSavingVideoRecorder.h.