37 #include <QFileDialog>
42 #include "vtkRenderWindow.h"
55 m_VideoName2(
""), m_FrameRate2(10), m_VideoQuality2(2), m_SliceFT(0),
56 m_WindowSelected(0), m_XMinForVideo(0), m_XMaxForVideo(0),
57 m_YMinForVideo(0), m_YMaxForVideo(0), m_ZMinForVideo(0),
58 m_ZMaxForVideo(0), m_TMinForVideo(0), m_TMaxForVideo(0),
59 m_FrameCounter(0), m_RenderWindowSelected(false)
73 ->
setStatusTip(
tr(
"You have to be in full screen view to use the video recording") );
74 this->warning_1->hide();
75 this->warning_2->hide();
78 QString ttoolTip =
"Start recording the video";
79 this->startVideo->setToolTip(ttoolTip);
80 ttoolTip =
"First slice of the video";
81 this->tSpinMin_2->setToolTip(ttoolTip);
82 ttoolTip =
"Last slice of the video";
83 this->tSpinMax_2->setToolTip(ttoolTip);
84 ttoolTip =
"Location and name of the video";
85 this->createFile->setToolTip(ttoolTip);
86 ttoolTip =
"Create video along this axe";
87 this->SliceFT->setToolTip(ttoolTip);
88 ttoolTip =
"Continue creating video from selected time points";
89 this->pauseVideo->setToolTip(ttoolTip);
90 ttoolTip =
"End the video";
91 this->endVideo->setToolTip(ttoolTip);
92 ttoolTip =
"Create video without manual interaction (usefull in 2D)";
93 this->tabVideoMethod1->setToolTip(ttoolTip);
94 ttoolTip =
"Create video with manual interaction (usefull in 3D)";
95 this->tabVideoMethod2->setToolTip(ttoolTip);
96 ttoolTip =
"Quality of the output video (high=2, medium=1, low=0)";
97 this->videoQuality->setToolTip(ttoolTip);
106 this->videoLenght->display(value);
107 this->endRecord->setEnabled(
false);
109 this->tabVideoWidget->setEnabled(
false);
134 m_FFMPEGWriter->Delete();
138 m_AVIWriter->Delete();
155 this->tSpinMin_2->setMinimum(
m_XMin);
156 this->tSpinMin_2->setMaximum(
m_XMax);
157 this->tSpinMin_2->setValue(
m_XMin);
159 this->tSpinMax_2->setMinimum(
m_XMin);
160 this->tSpinMax_2->setMaximum(
m_XMax);
161 this->tSpinMax_2->setValue(
m_XMax);
250 this->tSpinMin_2->setMinimum(
m_XMin);
251 this->tSpinMin_2->setMaximum(
m_XMax);
252 this->tSpinMin_2->setValue(
m_XMin);
254 this->tSpinMax_2->setMinimum(
m_XMin);
255 this->tSpinMax_2->setMaximum(
m_XMax);
256 this->tSpinMax_2->setValue(
m_XMax);
265 this->tSpinMin_2->setMinimum(
m_YMin);
266 this->tSpinMin_2->setMaximum(
m_YMax);
267 this->tSpinMin_2->setValue(
m_YMin);
269 this->tSpinMax_2->setMinimum(
m_YMin);
270 this->tSpinMax_2->setMaximum(
m_YMax);
271 this->tSpinMax_2->setValue(
m_YMax);
280 this->tSpinMin_2->setMinimum(
m_ZMin);
281 this->tSpinMin_2->setMaximum(
m_ZMax);
282 this->tSpinMin_2->setValue(
m_ZMin);
284 this->tSpinMax_2->setMinimum(
m_ZMin);
285 this->tSpinMax_2->setMaximum(
m_ZMax);
286 this->tSpinMax_2->setValue(
m_ZMax);
296 this->tSpinMin_2->setMinimum(
m_TMin);
297 this->tSpinMin_2->setMaximum(
m_TMax);
298 this->tSpinMin_2->setValue(
m_TMin);
300 this->tSpinMax_2->setMinimum(
m_TMin);
301 this->tSpinMax_2->setMaximum(
m_TMax);
302 this->tSpinMax_2->setValue(
m_TMax);
404 tr(
"Folder to Save Video"),
"fileName", 0);
406 this->createFile->setStyleSheet(
"background-color: rgb(0, 255, 0); color: rgb(0, 0, 0)");
407 this->createFile_2->setStyleSheet(
"background-color: rgb(255, 165, 0); color: rgb(0, 0, 0)");
410 plt.
setColor(QPalette::WindowText, Qt::black);
411 this->label->setPalette(plt);
412 this->label_2->setPalette(plt);
421 if (
m_FrameRate2 != static_cast< unsigned int >( value ) )
424 this->frameRate_2->setValue(value);
438 this->videoQuality_2->setValue(value);
450 tr(
"Folder to Save Video"),
"fileName", 0);
452 this->createFile_2->setStyleSheet(
"background-color: rgb(0, 255, 0); color: rgb(0, 0, 0)");
453 this->createFile->setStyleSheet(
"background-color: rgb(255, 165, 0); color: rgb(0, 0, 0)");
456 plt.
setColor(QPalette::WindowText, Qt::black);
457 this->label->setPalette(plt);
458 this->label_2->setPalette(plt);
467 if (
m_FrameRate2 != static_cast< unsigned int >( value ) )
470 this->frameRate->setValue(value);
484 this->videoQuality->setValue(value);
499 plt.
setColor(QPalette::WindowText, Qt::red);
500 this->label->setPalette(plt);
501 this->label_2->setPalette(plt);
503 this->createFile->setStyleSheet(
"background-color: rgb(255, 0, 0); color: rgb(0, 0, 0)");
504 this->createFile_2->setStyleSheet(
"background-color: rgb(255, 0, 0)");
524 this->startVideo->setEnabled(
false);
546 plt.
setColor(QPalette::WindowText, Qt::red);
547 this->label->setPalette(plt);
548 this->label_2->setPalette(plt);
549 this->createFile->setStyleSheet(
"background-color: rgb(255, 0, 0)");
550 this->createFile_2->setStyleSheet(
"background-color: rgb(255, 0, 0); color: rgb(0, 0, 0)");
554 this->createFile_2->setEnabled(
false);
555 this->frameRate_2->setEnabled(
false);
556 this->videoQuality_2->setEnabled(
false);
557 this->startRecord->setEnabled(
false);
558 this->tabVideoMethod1->setEnabled(
false);
559 this->endRecord->setEnabled(
true);
587 this->createFile_2->setEnabled(
true);
588 this->frameRate_2->setEnabled(
true);
589 this->videoQuality_2->setEnabled(
true);
590 this->startRecord->setEnabled(
true);
591 this->tabVideoMethod1->setEnabled(
true);
592 this->endRecord->setEnabled(
false);
605 double doubleCounter;
608 int test = 100 * doubleCounter;
624 this->videoLenght->display(value);
711 for (
unsigned int i = iMin; i < iMax + 1; i++ )
730 this->pauseVideo->setEnabled(
true);
731 this->endVideo->setEnabled(
true);
751 this->endVideo->setEnabled(
false);
752 this->pauseVideo->setEnabled(
false);
753 this->startVideo->setEnabled(
true);