MITK-IGT
IGT Extension of MITK
|
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) | |
itkFactorylessNewMacro (Self) | |
itkCloneMacro (Self) | |
itkGetMacro (DistanceImageFileName, std::string) | |
itkGetMacro (AmplitudeImageFileName, std::string) | |
itkGetMacro (IntensityImageFileName, std::string) | |
itkGetMacro (RGBImageFileName, std::string) | |
itkGetMacro (ToFCaptureWidth, int) | |
itkGetMacro (ToFCaptureHeight, int) | |
itkGetMacro (RGBCaptureWidth, int) | |
itkGetMacro (RGBCaptureHeight, int) | |
itkGetMacro (DistanceImageSelected, bool) | |
itkGetMacro (AmplitudeImageSelected, bool) | |
itkGetMacro (IntensityImageSelected, bool) | |
itkGetMacro (RGBImageSelected, bool) | |
itkGetMacro (NumOfFrames, int) | |
itkGetMacro (FileFormat, std::string) | |
itkSetMacro (DistanceImageFileName, std::string) | |
itkSetMacro (AmplitudeImageFileName, std::string) | |
itkSetMacro (IntensityImageFileName, std::string) | |
itkSetMacro (RGBImageFileName, std::string) | |
itkSetMacro (DistanceImageSelected, bool) | |
itkSetMacro (AmplitudeImageSelected, bool) | |
itkSetMacro (IntensityImageSelected, bool) | |
itkSetMacro (RGBImageSelected, bool) | |
itkSetMacro (NumOfFrames, int) | |
itkSetMacro (FileFormat, std::string) | |
ToFImageRecorder::RecordMode | GetRecordMode () |
Returns the currently set RecordMode. | |
void | SetRecordMode (ToFImageRecorder::RecordMode recordMode) |
Set the RecordMode. | |
void | SetCameraDevice (ToFCameraDevice *aToFCameraDevice) |
Set the device used for acquiring ToF images. | |
ToFCameraDevice * | GetCameraDevice () |
Get the device used for acquiring ToF images. | |
ToFImageWriter::ToFImageType | GetToFImageType () |
Get the type of image to be recorded. | |
void | SetToFImageType (ToFImageWriter::ToFImageType toFImageType) |
Set the type of image to be recorded. | |
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. | |
void | StopRecording () |
Stops the recording by setting the m_Abort flag to false. | |
void | WaitForThreadBeingTerminated () |
Wait until thread is terinated. | |
Protected Member Functions | |
void | RecordData () |
Thread method acquiring data via the ToFCameraDevice and recording it to file via the ToFImageWriter. | |
Protected Attributes | |
ToFCameraDevice::Pointer | m_ToFCameraDevice |
ToFCameraDevice used for acquiring the images. | |
int | m_ToFCaptureWidth |
width (x-dimension) of the images to record. | |
int | m_ToFCaptureHeight |
height (y-dimension) of the images to record. | |
int | m_ToFPixelNumber |
number of pixels (widht*height) of the images to record | |
int | m_RGBCaptureWidth |
width (x-dimension) of the images to record. | |
int | m_RGBCaptureHeight |
height (y-dimension) of the images to record. | |
int | m_RGBPixelNumber |
number of pixels (widht*height) of the images to record | |
int | m_SourceDataSize |
size of the source data provided by the device | |
int | m_ImageSequence |
number of images currently acquired | |
float * | m_IntensityArray |
array holding the intensity data | |
float * | m_DistanceArray |
array holding the distance data | |
float * | m_AmplitudeArray |
array holding the amplitude data | |
unsigned char * | m_RGBArray |
array holding the RGB data if available (e.g. for Kinect) | |
char * | m_SourceDataArray |
array holding the source data | |
ToFImageWriter::Pointer | m_ToFImageWriter |
image writer writing the acquired images to a file | |
std::string | m_DistanceImageFileName |
file name for saving the distance image | |
std::string | m_AmplitudeImageFileName |
file name for saving the amplitude image | |
std::string | m_IntensityImageFileName |
file name for saving the intensity image | |
std::string | m_RGBImageFileName |
file name for saving the rgb image | |
int | m_NumOfFrames |
number of frames to be recorded by this recorder | |
ToFImageWriter::ToFImageType | m_ToFImageType |
type of image to be recorded: ToFImageType3D (0) or ToFImageType2DPlusT (1) | |
ToFImageRecorder::RecordMode | m_RecordMode |
mode of recording the images: specified number of frames (PerFrames) or infinite (Infinite) | |
std::string | m_FileFormat |
file format for saving images. If .csv is chosen, ToFImageCsvWriter is used | |
bool | m_DistanceImageSelected |
flag indicating if distance image should be recorded | |
bool | m_AmplitudeImageSelected |
flag indicating if amplitude image should be recorded | |
bool | m_IntensityImageSelected |
flag indicating if intensity image should be recorded | |
bool | m_RGBImageSelected |
flag indicating if rgb image should be recorded | |
std::thread | m_Thread |
std::mutex | m_AbortMutex |
mutex for thread-safe data access of abort flag | |
bool | m_Abort |
flag controlling the abort mechanism of the recording procedure. For thread-safety only use in combination with m_AbortMutex | |
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 | ( | ) |
Definition at line 21 of file mitkToFImageRecorder.cpp.
|
override |
Definition at line 53 of file mitkToFImageRecorder.cpp.
ToFCameraDevice * mitk::ToFImageRecorder::GetCameraDevice | ( | ) |
Get the device used for acquiring ToF images.
Definition at line 219 of file mitkToFImageRecorder.cpp.
ToFImageRecorder::RecordMode mitk::ToFImageRecorder::GetRecordMode | ( | ) |
Returns the currently set RecordMode.
Definition at line 234 of file mitkToFImageRecorder.cpp.
ToFImageWriter::ToFImageType mitk::ToFImageRecorder::GetToFImageType | ( | ) |
Get the type of image to be recorded.
Definition at line 224 of file mitkToFImageRecorder.cpp.
mitk::ToFImageRecorder::itkCloneMacro | ( | Self | ) |
mitk::ToFImageRecorder::itkFactorylessNewMacro | ( | Self | ) |
mitk::ToFImageRecorder::itkGetMacro | ( | AmplitudeImageFileName | , |
std::string | ) |
mitk::ToFImageRecorder::itkGetMacro | ( | AmplitudeImageSelected | , |
bool | ) |
mitk::ToFImageRecorder::itkGetMacro | ( | DistanceImageFileName | , |
std::string | ) |
mitk::ToFImageRecorder::itkGetMacro | ( | DistanceImageSelected | , |
bool | ) |
mitk::ToFImageRecorder::itkGetMacro | ( | FileFormat | , |
std::string | ) |
mitk::ToFImageRecorder::itkGetMacro | ( | IntensityImageFileName | , |
std::string | ) |
mitk::ToFImageRecorder::itkGetMacro | ( | IntensityImageSelected | , |
bool | ) |
mitk::ToFImageRecorder::itkGetMacro | ( | NumOfFrames | , |
int | ) |
mitk::ToFImageRecorder::itkGetMacro | ( | RGBCaptureHeight | , |
int | ) |
mitk::ToFImageRecorder::itkGetMacro | ( | RGBCaptureWidth | , |
int | ) |
mitk::ToFImageRecorder::itkGetMacro | ( | RGBImageFileName | , |
std::string | ) |
mitk::ToFImageRecorder::itkGetMacro | ( | RGBImageSelected | , |
bool | ) |
mitk::ToFImageRecorder::itkGetMacro | ( | ToFCaptureHeight | , |
int | ) |
mitk::ToFImageRecorder::itkGetMacro | ( | ToFCaptureWidth | , |
int | ) |
mitk::ToFImageRecorder::itkSetMacro | ( | AmplitudeImageFileName | , |
std::string | ) |
mitk::ToFImageRecorder::itkSetMacro | ( | AmplitudeImageSelected | , |
bool | ) |
mitk::ToFImageRecorder::itkSetMacro | ( | DistanceImageFileName | , |
std::string | ) |
mitk::ToFImageRecorder::itkSetMacro | ( | DistanceImageSelected | , |
bool | ) |
mitk::ToFImageRecorder::itkSetMacro | ( | FileFormat | , |
std::string | ) |
mitk::ToFImageRecorder::itkSetMacro | ( | IntensityImageFileName | , |
std::string | ) |
mitk::ToFImageRecorder::itkSetMacro | ( | IntensityImageSelected | , |
bool | ) |
mitk::ToFImageRecorder::itkSetMacro | ( | NumOfFrames | , |
int | ) |
mitk::ToFImageRecorder::itkSetMacro | ( | RGBImageFileName | , |
std::string | ) |
mitk::ToFImageRecorder::itkSetMacro | ( | RGBImageSelected | , |
bool | ) |
mitk::ToFImageRecorder::mitkClassMacroItkParent | ( | ToFImageRecorder | , |
itk::Object | ) |
|
protected |
Thread method acquiring data via the ToFCameraDevice and recording it to file via the ToFImageWriter.
Definition at line 151 of file mitkToFImageRecorder.cpp.
void mitk::ToFImageRecorder::SetCameraDevice | ( | ToFCameraDevice * | aToFCameraDevice | ) |
Set the device used for acquiring ToF images.
aToFCameraDevice | ToF camera device used. |
Definition at line 214 of file mitkToFImageRecorder.cpp.
void mitk::ToFImageRecorder::SetRecordMode | ( | ToFImageRecorder::RecordMode | recordMode | ) |
Set the RecordMode.
recordMode | PerFrames ("Record specified number of frames"), Infinite ("Record until abort is required") |
Definition at line 239 of file mitkToFImageRecorder.cpp.
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) |
Definition at line 229 of file mitkToFImageRecorder.cpp.
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.
Definition at line 71 of file mitkToFImageRecorder.cpp.
void mitk::ToFImageRecorder::StopRecording | ( | ) |
Stops the recording by setting the m_Abort flag to false.
Definition at line 62 of file mitkToFImageRecorder.cpp.
void mitk::ToFImageRecorder::WaitForThreadBeingTerminated | ( | ) |
Wait until thread is terinated.
Definition at line 145 of file mitkToFImageRecorder.cpp.
|
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.