MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkCropOpenCVImageFilter.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12
13#ifndef mitkCropOpenCVImageFilter_h
14#define mitkCropOpenCVImageFilter_h
15
17
18#include "opencv2/core.hpp"
19
20//itk headers
21#include <itkObjectFactory.h>
22
23namespace mitk {
24
25class MITKOPENCVVIDEOSUPPORT_EXPORT CropOpenCVImageFilter : public AbstractOpenCVImageFilter
26{
27
28public:
32
34
39 bool OnFilterImage( cv::Mat& image ) override;
40
44 void SetCropRegion( cv::Rect cropRegion );
45
49 void SetCropRegion( int topLeftX, int topLeftY, int bottomRightX, int bottomRightY );
50
54 cv::Rect GetCropRegion( );
55
59 bool GetIsCropRegionEmpty( );
60
61protected:
65 cv::Rect m_CropRegion;
66
71};
72
73} // namespace mitk
74
75#endif
Interface for image filters on OpenCV images.
mitkClassMacro(CropOpenCVImageFilter, AbstractOpenCVImageFilter)
cv::Rect m_CropRegion
Defines the region which will be cropped from the image.
bool m_NewCropRegionSet
True if no image was filtered since last set of a crop region.
IGT Exceptions.