MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
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 (DKFZ)
6
All rights reserved.
7
8
Use of this source code is governed by a 3-clause BSD license that can be
9
found in the LICENSE file.
10
11
============================================================================*/
12
13
#ifndef mitkCropOpenCVImageFilter_h
14
#define mitkCropOpenCVImageFilter_h
15
16
#include "
mitkAbstractOpenCVImageFilter.h
"
17
18
#include "opencv2/core.hpp"
19
20
//itk headers
21
#include <itkObjectFactory.h>
22
23
namespace
mitk
{
24
25
class
MITKOPENCVVIDEOSUPPORT_EXPORT
CropOpenCVImageFilter
:
public
AbstractOpenCVImageFilter
26
{
27
28
public
:
29
mitkClassMacro
(
CropOpenCVImageFilter
,
AbstractOpenCVImageFilter
);
30
itkFactorylessNewMacro
(Self);
31
itkCloneMacro
(Self);
32
33
CropOpenCVImageFilter
( );
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
61
protected
:
65
cv::Rect
m_CropRegion
;
66
70
bool
m_NewCropRegionSet
;
71
};
72
73
}
// namespace mitk
74
75
#endif
mitk::AbstractOpenCVImageFilter
Interface for image filters on OpenCV images.
Definition
mitkAbstractOpenCVImageFilter.h:37
mitk::CropOpenCVImageFilter
Definition
mitkCropOpenCVImageFilter.h:26
mitk::CropOpenCVImageFilter::itkCloneMacro
itkCloneMacro(Self)
mitk::CropOpenCVImageFilter::itkFactorylessNewMacro
itkFactorylessNewMacro(Self)
mitk::CropOpenCVImageFilter::mitkClassMacro
mitkClassMacro(CropOpenCVImageFilter, AbstractOpenCVImageFilter)
mitk::CropOpenCVImageFilter::m_CropRegion
cv::Rect m_CropRegion
Defines the region which will be cropped from the image.
Definition
mitkCropOpenCVImageFilter.h:65
mitk::CropOpenCVImageFilter::m_NewCropRegionSet
bool m_NewCropRegionSet
True if no image was filtered since last set of a crop region.
Definition
mitkCropOpenCVImageFilter.h:70
mitkAbstractOpenCVImageFilter.h
mitk
IGT Exceptions.
Definition
mitkAlgorithm.h:16
Modules
OpenCVVideoSupport
Commands
mitkCropOpenCVImageFilter.h
Generated by
1.12.0