Medical Imaging Interaction Toolkit
2023.04.00
Medical Imaging Interaction Toolkit
|
#include <mitkOpenCVVideoSource.h>
Public Types | |
typedef itk::RGBPixel< unsigned char > | CharPixelType |
typedef itk::FixedArray< float, 3 > | HSVPixelType |
typedef itk::Image< CharPixelType, 2 > | RGBPixelImageType |
typedef itk::Image< HSVPixelType, 2 > | HSVPixelImageType |
typedef itk::ImageRegionIterator< RGBPixelImageType > | RGBConstIteratorType |
typedef itk::ImageRegionIterator< HSVPixelImageType > | HSVConstIteratorType |
Public Member Functions | |
mitkClassMacro (OpenCVVideoSource, VideoSource) | |
Pointer | Clone () const |
virtual void | SetVideoFileInput (const char *filename, bool repeatVideo, bool useCVCAMLib=false) |
virtual void | SetVideoCameraInput (int cameraindex, bool useCVCAMLib=false) |
virtual double | GetVideoCaptureProperty (int property_id) |
virtual int | SetVideoCaptureProperty (int property_id, double value) |
virtual void | GetCurrentFrameAsOpenCVImage (IplImage *image) |
cv::Mat | GetImage () override |
virtual const IplImage * | GetCurrentFrame () |
virtual void | GetCurrentFrameAsItkHSVPixelImage (HSVPixelImageType::Pointer &Image) |
void | FetchFrame () override |
unsigned char * | GetVideoTexture () override |
void | StartCapturing () override |
void | StopCapturing () override |
virtual IplImage * | FlipImage (IplImage *input) |
virtual void | EnableOnlineImageUndistortion (mitk::Point3D focal, mitk::Point3D principal, mitk::Point4D distortion) |
virtual void | DisableOnlineImageUndistortion () |
virtual bool | OnlineImageUndistortionEnabled () const |
void | PauseCapturing () override |
virtual std::string | GetVideoFileName () const |
virtual void | SetEnableXAxisFlip (bool enable) |
virtual void | SetEnableYAxisFlip (bool enable) |
virtual short | GetGrabbingDeviceNumber () const |
virtual bool | GetRepeatVideo () |
virtual void | SetRepeatVideo (bool _arg) |
Public Member Functions inherited from mitk::VideoSource | |
mitkClassMacroItkParent (VideoSource, itk::Object) | |
virtual bool | IsCapturingEnabled () const |
virtual int | GetImageWidth () |
virtual int | GetImageHeight () |
virtual unsigned long | GetFrameCount () const |
virtual bool | GetCapturePaused () const |
Public Member Functions inherited from mitk::OpenCVImageSource | |
mitkClassMacroItkParent (OpenCVImageSource, itk::Object) | |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
OpenCVVideoSource () | |
~OpenCVVideoSource () override | |
void | Reset () |
void | UpdateVideoTexture () |
void | sleep (unsigned int ms) |
void | RGBtoHSV (float r, float g, float b, float &h, float &s, float &v) |
Protected Member Functions inherited from mitk::VideoSource | |
VideoSource () | |
~VideoSource () override | |
Protected Attributes | |
CvCapture * | m_VideoCapture |
IplImage * | m_CurrentImage |
unsigned char * | m_CurrentVideoTexture |
IplImage * | m_PauseImage |
std::string | m_VideoFileName |
saves the video file name (is empty if a grabbing device is used or if this is not initialized) More... | |
short | m_GrabbingDeviceNumber |
saves the grabbing device number (is -1 if a videofilename is used or if this is not initialized) More... | |
bool | m_RepeatVideo |
bool | m_UseCVCAMLib |
bool | m_UndistortImage |
mitk::UndistortCameraImage::Pointer | m_UndistortCameraImage |
bool | m_FlipXAxisEnabled |
bool | m_FlipYAxisEnabled |
Protected Attributes inherited from mitk::VideoSource | |
unsigned char * | m_CurrentVideoTexture |
int | m_CaptureWidth |
int | m_CaptureHeight |
bool | m_CapturingInProcess |
unsigned long | m_FrameCount |
bool | m_CapturePaused |
Interface for acquiring video data using Intel's OPENCV library. Video data may either be provided from a file or a grabbing device. At the moment, OPENCV includes two separated modules for this grabbing, but only HighGui is used here. Initialize via SetVideoFileInput() or SetVideoCameraInput(), start processing with StartCapturing();
Definition at line 39 of file mitkOpenCVVideoSource.h.
typedef itk::RGBPixel< unsigned char > mitk::OpenCVVideoSource::CharPixelType |
Definition at line 43 of file mitkOpenCVVideoSource.h.
typedef itk::ImageRegionIterator< HSVPixelImageType > mitk::OpenCVVideoSource::HSVConstIteratorType |
Definition at line 48 of file mitkOpenCVVideoSource.h.
Definition at line 46 of file mitkOpenCVVideoSource.h.
typedef itk::FixedArray<float,3> mitk::OpenCVVideoSource::HSVPixelType |
Definition at line 44 of file mitkOpenCVVideoSource.h.
typedef itk::ImageRegionIterator< RGBPixelImageType > mitk::OpenCVVideoSource::RGBConstIteratorType |
Definition at line 47 of file mitkOpenCVVideoSource.h.
typedef itk::Image< CharPixelType , 2 > mitk::OpenCVVideoSource::RGBPixelImageType |
Definition at line 45 of file mitkOpenCVVideoSource.h.
|
protected |
|
overrideprotected |
Pointer mitk::OpenCVVideoSource::Clone | ( | ) | const |
|
virtual |
|
virtual |
|
overridevirtual |
assigns the grabbing devices for acquiring the next frame. in this base implementation it does nothing except incrementing m_FrameCount
Reimplemented from mitk::VideoSource.
Reimplemented in mitk::VideoInputSource.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Returns the GrabbingDeviceNumber (maybe -1 if a video file is used)
|
overridevirtual |
Implements mitk::OpenCVImageSource.
|
virtual |
|
virtual |
|
virtual |
Returns the video file name (maybe empty if a grabbing device is used)
|
overridevirtual |
Implements mitk::VideoSource.
mitk::OpenCVVideoSource::mitkClassMacro | ( | OpenCVVideoSource | , |
VideoSource | |||
) |
|
static |
|
virtual |
|
overridevirtual |
toggles m_CapturePaused In Subclasses this function can be overwritten to take measurs to provide a pause image, BUT DO NOT FORGET TO TOGGLE m_CapturePaused
Reimplemented from mitk::VideoSource.
|
protected |
Resets the whole class for capturing from a new device
|
protected |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Reimplemented in mitk::VideoInputSource.
|
virtual |
|
virtual |
Reimplemented in mitk::VideoInputSource.
|
protected |
|
overridevirtual |
advices this class to start the video capturing. in this base implementation: toggles m_CapturingInProcess, resets m_FrameCount ATTENTION: this should be also done in subclasses overwriting this method
Reimplemented from mitk::VideoSource.
Reimplemented in mitk::VideoInputSource.
|
overridevirtual |
advices this class to stop the video capturing. in this base implementation: toggles m_CapturingInProcess, resets m_FrameCount ATTENTION: this should be also done in subclasses overwriting this method
Reimplemented from mitk::VideoSource.
Reimplemented in mitk::VideoInputSource.
|
protected |
|
protected |
Definition at line 159 of file mitkOpenCVVideoSource.h.
|
protected |
Definition at line 160 of file mitkOpenCVVideoSource.h.
|
protected |
Flag to enable or disable video flipping by X Axis.
Definition at line 185 of file mitkOpenCVVideoSource.h.
|
protected |
Flag to enable or disable video flipping by Y Axis.
Definition at line 190 of file mitkOpenCVVideoSource.h.
|
protected |
saves the grabbing device number (is -1 if a videofilename is used or if this is not initialized)
Definition at line 170 of file mitkOpenCVVideoSource.h.
|
protected |
Definition at line 162 of file mitkOpenCVVideoSource.h.
|
protected |
Definition at line 173 of file mitkOpenCVVideoSource.h.
|
protected |
Definition at line 180 of file mitkOpenCVVideoSource.h.
|
protected |
Definition at line 179 of file mitkOpenCVVideoSource.h.
|
protected |
Definition at line 176 of file mitkOpenCVVideoSource.h.
|
protected |
Definition at line 156 of file mitkOpenCVVideoSource.h.
|
protected |
saves the video file name (is empty if a grabbing device is used or if this is not initialized)
Definition at line 166 of file mitkOpenCVVideoSource.h.