Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkToFRecorderWidget Class Reference

Widget allowing to play / record ToF data. More...

#include <QmitkToFRecorderWidget.h>

Inheritance diagram for QmitkToFRecorderWidget:
Collaboration diagram for QmitkToFRecorderWidget:

Public Slots

void OnPlay ()
 slot invoking to start the camera. Calls StartCamera() and emits ToFCameraStarted signal More...
 
void OnStop ()
 slot invoking to stop the camera and the recorder. Calls StopCamera() and StopRecorder and emits ToFCameraStarted signal. Resets GUI to initial state. More...
 
void OnStartRecorder ()
 slot invoking to start the recording After letting the user chose a file location for the record, m_ImageRecorder->StartRecording() is inoved. More...
 
void OnRecordingStopped ()
 slot resetting the GUI elements of the recording box More...
 
void OnChangeRecordModeComboBox (int index)
 slot activating/deactivating "number of frames" spin box dependent on recording mode (PerFrame / Infinite) More...
 

Signals

void ToFCameraStarted ()
 signal emitted when "Play" button is pressed More...
 
void ToFCameraStopped ()
 signal emitted when "Stop" button is pressed More...
 
void RecordingStarted ()
 signal emitted when recording is started More...
 
void RecordingStopped ()
 signal emitted AbortEvent() in ToFImageRecorder is observed More...
 

Public Member Functions

 QmitkToFRecorderWidget (QWidget *p=0, Qt::WindowFlags f1=0)
 
virtual ~QmitkToFRecorderWidget ()
 
virtual void CreateQtPartControl (QWidget *parent)
 
virtual void CreateConnections ()
 
void SetParameter (mitk::ToFImageGrabber *ToFImageGrabber, mitk::ToFImageRecorder *toFImageRecorder)
 Set the parameters used for this widget. More...
 
void ResetGUIToInitial ()
 resets the GUI elements to the initial state. Play button: enabled, Stop button: disabled, Recording box: disabled More...
 

Static Public Attributes

static const std::string VIEW_ID
 

Protected Types

typedef itk::SimpleMemberCommand< QmitkToFRecorderWidgetCommandType
 

Protected Member Functions

void StartCamera ()
 starts the camera by calling ToFImageGrabber::StartCamera() More...
 
void StopCamera ()
 stops the camera by calling ToFImageGrabber::StopCamera() More...
 
void StopRecorder ()
 stops the recording by calling ToFImageRecorder::StopRecording() More...
 
void StopRecordingCallback ()
 emits RecordingStopped signal. More...
 
std::string prepareFilename (std::string dir, std::string baseFilename, std::string modulationFreq, std::string integrationTime, std::string numOfFrames, std::string extension, std::string imageType)
 method creating a filename from the given information More...
 

Static Protected Member Functions

static QString getSaveFileName (mitk::ToFImageWriter::ToFImageType &tofImageType, bool &distanceImageSelected, bool &amplitudeImageSelected, bool &intensityImageSelected, bool &rgbImageSelected, bool &rawDataSelected, QWidget *parent=0, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=0, QFileDialog::Options options=0)
 adapted version of QFileDialog::getSaveFileName() The user is now asked to choose which images he wants to save (Distance and/or Intensity and/or Amplitude image) and which type the saved image should have (3D, 2D+t). More...
 

Protected Attributes

Ui::QmitkToFRecorderWidgetControls * m_Controls
 member holding the UI elements of this widget More...
 
mitk::ToFImageGrabber::Pointer m_ToFImageGrabber
 member holding the ToFImageGrabber for acquiring ToF images More...
 
mitk::ToFImageRecorder::Pointer m_ToFImageRecorder
 member holding the recorder for ToF images More...
 
mitk::ToFImageRecorder::RecordMode m_RecordMode
 member holding the RecordMode of the recorder (PerFrame / Infinite) More...
 
CommandType::Pointer m_StopRecordingCommand
 itkCommand for abort of recording More...
 

Detailed Description

Widget allowing to play / record ToF data.

Definition at line 47 of file QmitkToFRecorderWidget.h.

Member Typedef Documentation

typedef itk::SimpleMemberCommand<QmitkToFRecorderWidget> QmitkToFRecorderWidget::CommandType
protected

Definition at line 182 of file QmitkToFRecorderWidget.h.

Constructor & Destructor Documentation

QmitkToFRecorderWidget::QmitkToFRecorderWidget ( QWidget *  p = 0,
Qt::WindowFlags  f1 = 0 
)
QmitkToFRecorderWidget::~QmitkToFRecorderWidget ( )
virtual

Definition at line 53 of file QmitkToFRecorderWidget.cpp.

Member Function Documentation

void QmitkToFRecorderWidget::CreateConnections ( )
virtual
void QmitkToFRecorderWidget::CreateQtPartControl ( QWidget *  parent)
virtual

Definition at line 57 of file QmitkToFRecorderWidget.cpp.

References CreateConnections(), and m_Controls.

Referenced by QmitkToFRecorderWidget().

QString QmitkToFRecorderWidget::getSaveFileName ( mitk::ToFImageWriter::ToFImageType tofImageType,
bool &  distanceImageSelected,
bool &  amplitudeImageSelected,
bool &  intensityImageSelected,
bool &  rgbImageSelected,
bool &  rawDataSelected,
QWidget *  parent = 0,
const QString &  caption = QString(),
const QString &  dir = QString(),
const QString &  filter = QString(),
QString *  selectedFilter = 0,
QFileDialog::Options  options = 0 
)
staticprotected

adapted version of QFileDialog::getSaveFileName() The user is now asked to choose which images he wants to save (Distance and/or Intensity and/or Amplitude image) and which type the saved image should have (3D, 2D+t).

Definition at line 283 of file QmitkToFRecorderWidget.cpp.

References mitk::ToFImageWriter::ToFImageType2DPlusT, and mitk::ToFImageWriter::ToFImageType3D.

Referenced by OnStartRecorder().

void QmitkToFRecorderWidget::OnChangeRecordModeComboBox ( int  index)
slot

slot activating/deactivating "number of frames" spin box dependent on recording mode (PerFrame / Infinite)

Definition at line 415 of file QmitkToFRecorderWidget.cpp.

References mitk::ToFImageRecorder::Infinite, m_Controls, m_RecordMode, and mitk::ToFImageRecorder::PerFrames.

Referenced by CreateConnections().

void QmitkToFRecorderWidget::OnPlay ( )
slot

slot invoking to start the camera. Calls StartCamera() and emits ToFCameraStarted signal

Definition at line 126 of file QmitkToFRecorderWidget.cpp.

References m_Controls, StartCamera(), and ToFCameraStarted().

Referenced by CreateConnections().

void QmitkToFRecorderWidget::OnRecordingStopped ( )
slot

slot resetting the GUI elements of the recording box

Definition at line 110 of file QmitkToFRecorderWidget.cpp.

References m_Controls.

Referenced by CreateConnections(), and OnStartRecorder().

void QmitkToFRecorderWidget::OnStartRecorder ( )
slot

slot invoking to start the recording After letting the user chose a file location for the record, m_ImageRecorder->StartRecording() is inoved.

Definition at line 160 of file QmitkToFRecorderWidget.cpp.

References getSaveFileName(), m_Controls, m_RecordMode, m_ToFImageGrabber, m_ToFImageRecorder, MITK_INFO, OnRecordingStopped(), mitk::ToFImageRecorder::PerFrames, prepareFilename(), and RecordingStarted().

Referenced by CreateConnections().

void QmitkToFRecorderWidget::OnStop ( )
slot

slot invoking to stop the camera and the recorder. Calls StopCamera() and StopRecorder and emits ToFCameraStarted signal. Resets GUI to initial state.

Definition at line 116 of file QmitkToFRecorderWidget.cpp.

References ResetGUIToInitial(), StopCamera(), StopRecorder(), and ToFCameraStopped().

Referenced by CreateConnections().

std::string QmitkToFRecorderWidget::prepareFilename ( std::string  dir,
std::string  baseFilename,
std::string  modulationFreq,
std::string  integrationTime,
std::string  numOfFrames,
std::string  extension,
std::string  imageType 
)
protected

method creating a filename from the given information

Parameters
dirdirectory to save the file
baseFilenamebase file name entered by the user
modulationFreqmodulation frequency of the camera
integrationTimeintegration time of the camera
numOfFramesnumber of frames recorded
extensionfile extension
imageTypetype of image (DistanceImage, IntensityImage, AmplitudeImage)
Returns
dir+"/"+baseFilename+"_MF"+modulationFreq+"_IT"+integrationTime+"_"+numOfFrames+"Images"+imageType+extension

Definition at line 391 of file QmitkToFRecorderWidget.cpp.

Referenced by OnStartRecorder().

void QmitkToFRecorderWidget::RecordingStarted ( )
signal

signal emitted when recording is started

Referenced by OnStartRecorder().

void QmitkToFRecorderWidget::RecordingStopped ( )
signal

signal emitted AbortEvent() in ToFImageRecorder is observed

Referenced by CreateConnections(), and StopRecordingCallback().

void QmitkToFRecorderWidget::ResetGUIToInitial ( )

resets the GUI elements to the initial state. Play button: enabled, Stop button: disabled, Recording box: disabled

Definition at line 103 of file QmitkToFRecorderWidget.cpp.

References m_Controls.

Referenced by OnStop().

void QmitkToFRecorderWidget::SetParameter ( mitk::ToFImageGrabber ToFImageGrabber,
mitk::ToFImageRecorder toFImageRecorder 
)

Set the parameters used for this widget.

Parameters
ToFImageGrabberimage grabber providing images from a ToF device
tofImageRecorderimage recorder allowing to record ToF images

Definition at line 81 of file QmitkToFRecorderWidget.cpp.

References m_Controls, m_StopRecordingCommand, m_ToFImageGrabber, m_ToFImageRecorder, mitk::New(), and StopRecordingCallback().

void QmitkToFRecorderWidget::StartCamera ( )
protected

starts the camera by calling ToFImageGrabber::StartCamera()

Definition at line 138 of file QmitkToFRecorderWidget.cpp.

References m_ToFImageGrabber.

Referenced by OnPlay().

void QmitkToFRecorderWidget::StopCamera ( )
protected

stops the camera by calling ToFImageGrabber::StopCamera()

Definition at line 146 of file QmitkToFRecorderWidget.cpp.

References m_ToFImageGrabber.

Referenced by OnStop().

void QmitkToFRecorderWidget::StopRecorder ( )
protected

stops the recording by calling ToFImageRecorder::StopRecording()

Definition at line 152 of file QmitkToFRecorderWidget.cpp.

References m_ToFImageRecorder.

Referenced by OnStop().

void QmitkToFRecorderWidget::StopRecordingCallback ( )
protected

emits RecordingStopped signal.

Definition at line 98 of file QmitkToFRecorderWidget.cpp.

References RecordingStopped().

Referenced by SetParameter().

void QmitkToFRecorderWidget::ToFCameraStarted ( )
signal

signal emitted when "Play" button is pressed

Referenced by OnPlay().

void QmitkToFRecorderWidget::ToFCameraStopped ( )
signal

signal emitted when "Stop" button is pressed

Referenced by OnStop().

Member Data Documentation

Ui::QmitkToFRecorderWidgetControls* QmitkToFRecorderWidget::m_Controls
protected
mitk::ToFImageRecorder::RecordMode QmitkToFRecorderWidget::m_RecordMode
protected

member holding the RecordMode of the recorder (PerFrame / Infinite)

Definition at line 180 of file QmitkToFRecorderWidget.h.

Referenced by OnChangeRecordModeComboBox(), OnStartRecorder(), and QmitkToFRecorderWidget().

CommandType::Pointer QmitkToFRecorderWidget::m_StopRecordingCommand
protected

itkCommand for abort of recording

Definition at line 183 of file QmitkToFRecorderWidget.h.

Referenced by SetParameter().

mitk::ToFImageGrabber::Pointer QmitkToFRecorderWidget::m_ToFImageGrabber
protected

member holding the ToFImageGrabber for acquiring ToF images

Definition at line 177 of file QmitkToFRecorderWidget.h.

Referenced by OnStartRecorder(), QmitkToFRecorderWidget(), SetParameter(), StartCamera(), and StopCamera().

mitk::ToFImageRecorder::Pointer QmitkToFRecorderWidget::m_ToFImageRecorder
protected

member holding the recorder for ToF images

Definition at line 178 of file QmitkToFRecorderWidget.h.

Referenced by OnStartRecorder(), QmitkToFRecorderWidget(), SetParameter(), and StopRecorder().

const std::string QmitkToFRecorderWidget::VIEW_ID
static

Definition at line 55 of file QmitkToFRecorderWidget.h.


The documentation for this class was generated from the following files: