Medical Imaging Interaction Toolkit  2023.12.00
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=nullptr, Qt::WindowFlags f1=nullptr)
 
 ~QmitkToFRecorderWidget () override
 
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=nullptr, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=nullptr, QFileDialog::Options options=nullptr)
 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 41 of file QmitkToFRecorderWidget.h.

Member Typedef Documentation

◆ CommandType

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

Definition at line 176 of file QmitkToFRecorderWidget.h.

Constructor & Destructor Documentation

◆ QmitkToFRecorderWidget()

QmitkToFRecorderWidget::QmitkToFRecorderWidget ( QWidget *  p = nullptr,
Qt::WindowFlags  f1 = nullptr 
)

◆ ~QmitkToFRecorderWidget()

QmitkToFRecorderWidget::~QmitkToFRecorderWidget ( )
override

Member Function Documentation

◆ CreateConnections()

virtual void QmitkToFRecorderWidget::CreateConnections ( )
virtual

◆ CreateQtPartControl()

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

◆ getSaveFileName()

static QString QmitkToFRecorderWidget::getSaveFileName ( mitk::ToFImageWriter::ToFImageType tofImageType,
bool &  distanceImageSelected,
bool &  amplitudeImageSelected,
bool &  intensityImageSelected,
bool &  rgbImageSelected,
bool &  rawDataSelected,
QWidget *  parent = nullptr,
const QString &  caption = QString(),
const QString &  dir = QString(),
const QString &  filter = QString(),
QString *  selectedFilter = nullptr,
QFileDialog::Options  options = nullptr 
)
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).

◆ OnChangeRecordModeComboBox

void QmitkToFRecorderWidget::OnChangeRecordModeComboBox ( int  index)
slot

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

◆ OnPlay

void QmitkToFRecorderWidget::OnPlay ( )
slot

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

◆ OnRecordingStopped

void QmitkToFRecorderWidget::OnRecordingStopped ( )
slot

slot resetting the GUI elements of the recording box

◆ 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.

◆ OnStop

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.

◆ prepareFilename()

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

◆ RecordingStarted

void QmitkToFRecorderWidget::RecordingStarted ( )
signal

signal emitted when recording is started

◆ RecordingStopped

void QmitkToFRecorderWidget::RecordingStopped ( )
signal

signal emitted AbortEvent() in ToFImageRecorder is observed

◆ ResetGUIToInitial()

void QmitkToFRecorderWidget::ResetGUIToInitial ( )

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

◆ SetParameter()

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

◆ StartCamera()

void QmitkToFRecorderWidget::StartCamera ( )
protected

starts the camera by calling ToFImageGrabber::StartCamera()

◆ StopCamera()

void QmitkToFRecorderWidget::StopCamera ( )
protected

stops the camera by calling ToFImageGrabber::StopCamera()

◆ StopRecorder()

void QmitkToFRecorderWidget::StopRecorder ( )
protected

stops the recording by calling ToFImageRecorder::StopRecording()

◆ StopRecordingCallback()

void QmitkToFRecorderWidget::StopRecordingCallback ( )
protected

emits RecordingStopped signal.

◆ ToFCameraStarted

void QmitkToFRecorderWidget::ToFCameraStarted ( )
signal

signal emitted when "Play" button is pressed

◆ ToFCameraStopped

void QmitkToFRecorderWidget::ToFCameraStopped ( )
signal

signal emitted when "Stop" button is pressed

Member Data Documentation

◆ m_Controls

Ui::QmitkToFRecorderWidgetControls* QmitkToFRecorderWidget::m_Controls
protected

member holding the UI elements of this widget

Definition at line 169 of file QmitkToFRecorderWidget.h.

◆ m_RecordMode

mitk::ToFImageRecorder::RecordMode QmitkToFRecorderWidget::m_RecordMode
protected

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

Definition at line 174 of file QmitkToFRecorderWidget.h.

◆ m_StopRecordingCommand

CommandType::Pointer QmitkToFRecorderWidget::m_StopRecordingCommand
protected

itkCommand for abort of recording

Definition at line 177 of file QmitkToFRecorderWidget.h.

◆ m_ToFImageGrabber

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

member holding the ToFImageGrabber for acquiring ToF images

Definition at line 171 of file QmitkToFRecorderWidget.h.

◆ m_ToFImageRecorder

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

member holding the recorder for ToF images

Definition at line 172 of file QmitkToFRecorderWidget.h.

◆ VIEW_ID

const std::string QmitkToFRecorderWidget::VIEW_ID
static

Definition at line 49 of file QmitkToFRecorderWidget.h.


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