Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkCropOpenCVImageFilter.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef mitkAbstractOpenCVImageFilter_h
18 #define mitkAbstractOpenCVImageFilter_h
19 
21 
22 #include "cv.h"
23 
24 //itk headers
25 #include <itkObjectFactory.h>
26 
27 namespace mitk {
28 
29 class MITKOPENCVVIDEOSUPPORT_EXPORT CropOpenCVImageFilter : public AbstractOpenCVImageFilter
30 {
31 
32 public:
34  itkFactorylessNewMacro(Self)
35  itkCloneMacro(Self)
36 
38 
43  bool OnFilterImage( cv::Mat& image ) override;
44 
48  void SetCropRegion( cv::Rect cropRegion );
49 
53  void SetCropRegion( int topLeftX, int topLeftY, int bottomRightX, int bottomRightY );
54 
58  cv::Rect GetCropRegion( );
59 
63  bool GetIsCropRegionEmpty( );
64 
65 protected:
69  cv::Rect m_CropRegion;
70 
75 };
76 
77 } // namespace mitk
78 
79 #endif // mitkAbstractOpenCVImageFilter_h
cv::Rect m_CropRegion
Defines the region which will be cropped from the image.
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
Interface for image filters on OpenCV images.
bool m_NewCropRegionSet
True if no image was filtered since last set of a crop region.