Medical Imaging Interaction Toolkit
2023.12.00
Medical Imaging Interaction Toolkit
|
Recorder class for ToF images. More...
#include <mitkToFImageRecorder.h>
Public Types | |
enum | RecordMode { PerFrames, Infinite } |
Public Member Functions | |
ToFImageRecorder () | |
~ToFImageRecorder () override | |
mitkClassMacroItkParent (ToFImageRecorder, itk::Object) | |
Pointer | Clone () const |
virtual std::string | GetDistanceImageFileName () |
virtual std::string | GetAmplitudeImageFileName () |
virtual std::string | GetIntensityImageFileName () |
virtual std::string | GetRGBImageFileName () |
virtual int | GetToFCaptureWidth () |
virtual int | GetToFCaptureHeight () |
virtual int | GetRGBCaptureWidth () |
virtual int | GetRGBCaptureHeight () |
virtual bool | GetDistanceImageSelected () |
virtual bool | GetAmplitudeImageSelected () |
virtual bool | GetIntensityImageSelected () |
virtual bool | GetRGBImageSelected () |
virtual int | GetNumOfFrames () |
virtual std::string | GetFileFormat () |
virtual void | SetDistanceImageFileName (std::string _arg) |
virtual void | SetAmplitudeImageFileName (std::string _arg) |
virtual void | SetIntensityImageFileName (std::string _arg) |
virtual void | SetRGBImageFileName (std::string _arg) |
virtual void | SetDistanceImageSelected (bool _arg) |
virtual void | SetAmplitudeImageSelected (bool _arg) |
virtual void | SetIntensityImageSelected (bool _arg) |
virtual void | SetRGBImageSelected (bool _arg) |
virtual void | SetNumOfFrames (int _arg) |
virtual void | SetFileFormat (std::string _arg) |
ToFImageRecorder::RecordMode | GetRecordMode () |
Returns the currently set RecordMode. More... | |
void | SetRecordMode (ToFImageRecorder::RecordMode recordMode) |
Set the RecordMode. More... | |
void | SetCameraDevice (ToFCameraDevice *aToFCameraDevice) |
Set the device used for acquiring ToF images. More... | |
ToFCameraDevice * | GetCameraDevice () |
Get the device used for acquiring ToF images. More... | |
ToFImageWriter::ToFImageType | GetToFImageType () |
Get the type of image to be recorded. More... | |
void | SetToFImageType (ToFImageWriter::ToFImageType toFImageType) |
Set the type of image to be recorded. More... | |
void | StartRecording () |
Starts the recording by spawning a Thread which streams the data to a file. Aborting of the record process is controlled by the m_Abort flag. More... | |
void | StopRecording () |
Stops the recording by setting the m_Abort flag to false. More... | |
void | WaitForThreadBeingTerminated () |
Wait until thread is terinated. More... | |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
void | RecordData () |
Thread method acquiring data via the ToFCameraDevice and recording it to file via the ToFImageWriter. More... | |
Protected Attributes | |
ToFCameraDevice::Pointer | m_ToFCameraDevice |
ToFCameraDevice used for acquiring the images. More... | |
int | m_ToFCaptureWidth |
width (x-dimension) of the images to record. More... | |
int | m_ToFCaptureHeight |
height (y-dimension) of the images to record. More... | |
int | m_ToFPixelNumber |
number of pixels (widht*height) of the images to record More... | |
int | m_RGBCaptureWidth |
width (x-dimension) of the images to record. More... | |
int | m_RGBCaptureHeight |
height (y-dimension) of the images to record. More... | |
int | m_RGBPixelNumber |
number of pixels (widht*height) of the images to record More... | |
int | m_SourceDataSize |
size of the source data provided by the device More... | |
int | m_ImageSequence |
number of images currently acquired More... | |
float * | m_IntensityArray |
array holding the intensity data More... | |
float * | m_DistanceArray |
array holding the distance data More... | |
float * | m_AmplitudeArray |
array holding the amplitude data More... | |
unsigned char * | m_RGBArray |
array holding the RGB data if available (e.g. for Kinect) More... | |
char * | m_SourceDataArray |
array holding the source data More... | |
ToFImageWriter::Pointer | m_ToFImageWriter |
image writer writing the acquired images to a file More... | |
std::string | m_DistanceImageFileName |
file name for saving the distance image More... | |
std::string | m_AmplitudeImageFileName |
file name for saving the amplitude image More... | |
std::string | m_IntensityImageFileName |
file name for saving the intensity image More... | |
std::string | m_RGBImageFileName |
file name for saving the rgb image More... | |
int | m_NumOfFrames |
number of frames to be recorded by this recorder More... | |
ToFImageWriter::ToFImageType | m_ToFImageType |
type of image to be recorded: ToFImageType3D (0) or ToFImageType2DPlusT (1) More... | |
ToFImageRecorder::RecordMode | m_RecordMode |
mode of recording the images: specified number of frames (PerFrames) or infinite (Infinite) More... | |
std::string | m_FileFormat |
file format for saving images. If .csv is chosen, ToFImageCsvWriter is used More... | |
bool | m_DistanceImageSelected |
flag indicating if distance image should be recorded More... | |
bool | m_AmplitudeImageSelected |
flag indicating if amplitude image should be recorded More... | |
bool | m_IntensityImageSelected |
flag indicating if intensity image should be recorded More... | |
bool | m_RGBImageSelected |
flag indicating if rgb image should be recorded More... | |
std::thread | m_Thread |
std::mutex | m_AbortMutex |
mutex for thread-safe data access of abort flag More... | |
bool | m_Abort |
flag controlling the abort mechanism of the recording procedure. For thread-safety only use in combination with m_AbortMutex More... | |
Recorder class for ToF images.
This class represents a recorder for ToF data. A ToFCameraDevice is used to acquire the data. The acquired images are then added to a ToFImageWriter that performs the actual writing.
Recording can be performed either frame-based or continuously.
Definition at line 44 of file mitkToFImageRecorder.h.
Enumerator | |
---|---|
PerFrames | |
Infinite |
Definition at line 84 of file mitkToFImageRecorder.h.
mitk::ToFImageRecorder::ToFImageRecorder | ( | ) |
|
override |
Pointer mitk::ToFImageRecorder::Clone | ( | ) | const |
|
virtual |
|
virtual |
ToFCameraDevice* mitk::ToFImageRecorder::GetCameraDevice | ( | ) |
Get the device used for acquiring ToF images.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
ToFImageRecorder::RecordMode mitk::ToFImageRecorder::GetRecordMode | ( | ) |
Returns the currently set RecordMode.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
ToFImageWriter::ToFImageType mitk::ToFImageRecorder::GetToFImageType | ( | ) |
Get the type of image to be recorded.
mitk::ToFImageRecorder::mitkClassMacroItkParent | ( | ToFImageRecorder | , |
itk::Object | |||
) |
|
static |
|
protected |
Thread method acquiring data via the ToFCameraDevice and recording it to file via the ToFImageWriter.
|
virtual |
|
virtual |
void mitk::ToFImageRecorder::SetCameraDevice | ( | ToFCameraDevice * | aToFCameraDevice | ) |
Set the device used for acquiring ToF images.
aToFCameraDevice | ToF camera device used. |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
void mitk::ToFImageRecorder::SetRecordMode | ( | ToFImageRecorder::RecordMode | recordMode | ) |
Set the RecordMode.
recordMode | PerFrames ("Record specified number of frames"), Infinite ("Record until abort is required") |
|
virtual |
|
virtual |
void mitk::ToFImageRecorder::SetToFImageType | ( | ToFImageWriter::ToFImageType | toFImageType | ) |
Set the type of image to be recorded.
toFImageType | type of the ToF image: ToFImageType3D (0) or ToFImageType2DPlusT (1) |
void mitk::ToFImageRecorder::StartRecording | ( | ) |
Starts the recording by spawning a Thread which streams the data to a file. Aborting of the record process is controlled by the m_Abort flag.
void mitk::ToFImageRecorder::StopRecording | ( | ) |
Stops the recording by setting the m_Abort flag to false.
void mitk::ToFImageRecorder::WaitForThreadBeingTerminated | ( | ) |
Wait until thread is terinated.
|
protected |
flag controlling the abort mechanism of the recording procedure. For thread-safety only use in combination with m_AbortMutex
Definition at line 172 of file mitkToFImageRecorder.h.
|
protected |
mutex for thread-safe data access of abort flag
Definition at line 171 of file mitkToFImageRecorder.h.
|
protected |
array holding the amplitude data
Definition at line 147 of file mitkToFImageRecorder.h.
|
protected |
file name for saving the amplitude image
Definition at line 155 of file mitkToFImageRecorder.h.
|
protected |
flag indicating if amplitude image should be recorded
Definition at line 165 of file mitkToFImageRecorder.h.
|
protected |
array holding the distance data
Definition at line 146 of file mitkToFImageRecorder.h.
|
protected |
file name for saving the distance image
Definition at line 154 of file mitkToFImageRecorder.h.
|
protected |
flag indicating if distance image should be recorded
Definition at line 164 of file mitkToFImageRecorder.h.
|
protected |
file format for saving images. If .csv is chosen, ToFImageCsvWriter is used
Definition at line 162 of file mitkToFImageRecorder.h.
|
protected |
number of images currently acquired
Definition at line 144 of file mitkToFImageRecorder.h.
|
protected |
array holding the intensity data
Definition at line 145 of file mitkToFImageRecorder.h.
|
protected |
file name for saving the intensity image
Definition at line 156 of file mitkToFImageRecorder.h.
|
protected |
flag indicating if intensity image should be recorded
Definition at line 166 of file mitkToFImageRecorder.h.
|
protected |
number of frames to be recorded by this recorder
Definition at line 159 of file mitkToFImageRecorder.h.
|
protected |
mode of recording the images: specified number of frames (PerFrames) or infinite (Infinite)
Definition at line 161 of file mitkToFImageRecorder.h.
|
protected |
array holding the RGB data if available (e.g. for Kinect)
Definition at line 148 of file mitkToFImageRecorder.h.
|
protected |
height (y-dimension) of the images to record.
Definition at line 141 of file mitkToFImageRecorder.h.
|
protected |
width (x-dimension) of the images to record.
Definition at line 140 of file mitkToFImageRecorder.h.
|
protected |
file name for saving the rgb image
Definition at line 157 of file mitkToFImageRecorder.h.
|
protected |
flag indicating if rgb image should be recorded
Definition at line 167 of file mitkToFImageRecorder.h.
|
protected |
number of pixels (widht*height) of the images to record
Definition at line 142 of file mitkToFImageRecorder.h.
|
protected |
array holding the source data
Definition at line 149 of file mitkToFImageRecorder.h.
|
protected |
size of the source data provided by the device
Definition at line 143 of file mitkToFImageRecorder.h.
|
protected |
Definition at line 170 of file mitkToFImageRecorder.h.
|
protected |
ToFCameraDevice used for acquiring the images.
Definition at line 136 of file mitkToFImageRecorder.h.
|
protected |
height (y-dimension) of the images to record.
Definition at line 138 of file mitkToFImageRecorder.h.
|
protected |
width (x-dimension) of the images to record.
Definition at line 137 of file mitkToFImageRecorder.h.
|
protected |
type of image to be recorded: ToFImageType3D (0) or ToFImageType2DPlusT (1)
Definition at line 160 of file mitkToFImageRecorder.h.
|
protected |
image writer writing the acquired images to a file
Definition at line 152 of file mitkToFImageRecorder.h.
|
protected |
number of pixels (widht*height) of the images to record
Definition at line 139 of file mitkToFImageRecorder.h.