13#ifndef mitkUSImageVideoSource_h
14#define mitkUSImageVideoSource_h
17#include <itkProcessObject.h>
26#include <opencv2/videoio.hpp>
57 : topLeftX(0), topLeftY(0), bottomRightX(0), bottomRightY(0) { };
58 USImageRoi(
unsigned int topLeftX,
unsigned int topLeftY,
unsigned int bottomRightX,
unsigned int bottomRightY)
59 : topLeftX(topLeftX), topLeftY(topLeftY), bottomRightX(bottomRightX), bottomRightY(bottomRightY) { };
73 : top(0), bottom(0), left(0), right(0) { };
74 USImageCropping(
unsigned int top,
unsigned int bottom,
unsigned int left,
unsigned int right)
75 : top(top), bottom(bottom), left(left), right(right) { };
82 void SetVideoFileInput(std::string path);
89 void SetCameraInput(
int deviceID);
98 void SetColorOutput(
bool isColor);
107 void SetRegionOfInterest(
int topLeftX,
int topLeftY,
int bottomRightX,
int bottomRightY);
118 void SetRegionOfInterest(USImageRoi regionOfInterest);
129 void SetCropping(USImageCropping cropping);
135 void RemoveRegionOfInterest();
145 void OverrideResolution(
int width,
int height);
154 int GetImageHeight();
177 void GetNextRawImage( std::vector<cv::Mat>& image )
override;
184 void GetNextRawImage( std::vector<mitk::Image::Pointer>& image )
override;
This is an abstract superclass for delivering USImages. Each subclass must implement the method mitk:...
This class can be pointed to a video file or a videodevice and delivers USImages.
int m_ResolutionOverrideHeight
bool m_IsCropped
If true, image will be cropped according to settings of crop filter.
bool m_IsVideoReady
If true, a frame can be grabbed anytime.
bool m_IsGreyscale
If true, image output will be greyscale.
itkGetMacro(ResolutionOverrideWidth, int)
itkGetMacro(IsVideoReady, bool)
itkGetMacro(IsGreyscale, bool)
itkFactorylessNewMacro(Self)
ConvertGrayscaleOpenCVImageFilter::Pointer m_GrayscaleFilter
int m_ResolutionOverrideWidth
CropOpenCVImageFilter::Pointer m_CropFilter
itkSetMacro(ResolutionOverride, bool)
cv::VideoCapture * m_VideoCapture
The source of the video, managed internally.
mitkClassMacroItkParent(USImageVideoSource, itk::ProcessObject)
itkGetMacro(ResolutionOverrideHeight, int)
bool m_ResolutionOverride
itkGetMacro(ResolutionOverride, bool)
Defines a region of interest by distances to the four image borders.
USImageCropping(unsigned int top, unsigned int bottom, unsigned int left, unsigned int right)
Defines a region of interest by top left and bottom right corner.
USImageRoi(unsigned int topLeftX, unsigned int topLeftY, unsigned int bottomRightX, unsigned int bottomRightY)