17 #ifndef MITKUSImageVideoSource_H_HEADER_INCLUDED_
18 #define MITKUSImageVideoSource_H_HEADER_INCLUDED_
21 #include <itkProcessObject.h>
47 itkFactorylessNewMacro(Self)
61 : topLeftX(0), topLeftY(0), bottomRightX(0), bottomRightY(0) { };
62 USImageRoi(
unsigned int topLeftX,
unsigned int topLeftY,
unsigned int bottomRightX,
unsigned int bottomRightY)
63 : topLeftX(topLeftX), topLeftY(topLeftY), bottomRightX(bottomRightX), bottomRightY(bottomRightY) { };
77 : top(0), bottom(0), left(0), right(0) { };
78 USImageCropping(
unsigned int top,
unsigned int bottom,
unsigned int left,
unsigned int right)
79 : top(top), bottom(bottom), left(left), right(right) { };
86 void SetVideoFileInput(std::string path);
93 void SetCameraInput(
int deviceID);
102 void SetColorOutput(
bool isColor);
111 void SetRegionOfInterest(
int topLeftX,
int topLeftY,
int bottomRightX,
int bottomRightY);
122 void SetRegionOfInterest(USImageRoi regionOfInterest);
133 void SetCropping(USImageCropping cropping);
139 void RemoveRegionOfInterest();
149 void OverrideResolution(
int width,
int height);
152 itkGetMacro(IsVideoReady,
bool);
153 itkGetMacro(ResolutionOverride,
bool);
154 itkSetMacro(ResolutionOverride,
bool);
155 itkGetMacro(IsGreyscale,
bool);
156 itkGetMacro(ResolutionOverrideWidth,
int);
157 itkGetMacro(ResolutionOverrideHeight,
int);
158 int GetImageHeight();
160 USImageCropping GetCropping();
161 USImageRoi GetRegionOfInterest();
181 virtual void GetNextRawImage( cv::Mat& image )
override;
itk::SmartPointer< Self > Pointer
Defines a region of interest by distances to the four image borders.
ConvertGrayscaleOpenCVImageFilter::Pointer m_GrayscaleFilter
cv::VideoCapture * m_VideoCapture
The source of the video, managed internally.
DataCollection - Class to facilitate loading/accessing structured data.
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. ...
CropOpenCVImageFilter::Pointer m_CropFilter
int m_ResolutionOverrideHeight
Defines a region of interest by top left and bottom right corner.
int m_ResolutionOverrideWidth
#define mitkClassMacroItkParent(className, SuperClassName)
USImageRoi(unsigned int topLeftX, unsigned int topLeftY, unsigned int bottomRightX, unsigned int bottomRightY)
bool m_IsVideoReady
If true, a frame can be grabbed anytime.
bool m_ResolutionOverride
bool m_IsGreyscale
If true, image output will be greyscale.
USImageCropping(unsigned int top, unsigned int bottom, unsigned int left, unsigned int right)
bool m_IsCropped
If true, image will be cropped according to settings of crop filter.