MITK-IGT
IGT Extension of MITK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
mitk::CropOpenCVImageFilter Class Reference

#include <mitkCropOpenCVImageFilter.h>

Inheritance diagram for mitk::CropOpenCVImageFilter:
mitk::AbstractOpenCVImageFilter

Public Member Functions

 mitkClassMacro (CropOpenCVImageFilter, AbstractOpenCVImageFilter)
 
 itkFactorylessNewMacro (Self)
 
 itkCloneMacro (Self)
 
 CropOpenCVImageFilter ()
 
bool OnFilterImage (cv::Mat &image) override
 Crops image to rectangle given by mitk::CropOpenCVImageFilter::SetCropRegion.
 
void SetCropRegion (cv::Rect cropRegion)
 Set region of interest for cropping.
 
void SetCropRegion (int topLeftX, int topLeftY, int bottomRightX, int bottomRightY)
 Set region of interest for cropping.
 
cv::Rect GetCropRegion ()
 Returns region, which was set by mitk::CropOpenCVImageFilter::SetCropRegion().
 
bool GetIsCropRegionEmpty ()
 
- Public Member Functions inherited from mitk::AbstractOpenCVImageFilter
 mitkClassMacroItkParent (AbstractOpenCVImageFilter, itk::Object)
 
virtual bool FilterImage (cv::Mat &image, int id=INVALID_IMAGE_ID)
 

Protected Attributes

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.
 
- Protected Attributes inherited from mitk::AbstractOpenCVImageFilter
int m_CurrentImageId
 

Additional Inherited Members

- Static Public Attributes inherited from mitk::AbstractOpenCVImageFilter
static int INVALID_IMAGE_ID = -1
 
- Protected Member Functions inherited from mitk::AbstractOpenCVImageFilter
 AbstractOpenCVImageFilter ()
 
int GetCurrentImageId ()
 

Detailed Description

Definition at line 25 of file mitkCropOpenCVImageFilter.h.

Constructor & Destructor Documentation

◆ CropOpenCVImageFilter()

mitk::CropOpenCVImageFilter::CropOpenCVImageFilter ( )

Definition at line 17 of file mitkCropOpenCVImageFilter.cpp.

Member Function Documentation

◆ GetCropRegion()

cv::Rect mitk::CropOpenCVImageFilter::GetCropRegion ( )

Returns region, which was set by mitk::CropOpenCVImageFilter::SetCropRegion().

Definition at line 97 of file mitkCropOpenCVImageFilter.cpp.

◆ GetIsCropRegionEmpty()

bool mitk::CropOpenCVImageFilter::GetIsCropRegionEmpty ( )
Returns
True if a non-empty crop region was set before.

Definition at line 102 of file mitkCropOpenCVImageFilter.cpp.

◆ itkCloneMacro()

mitk::CropOpenCVImageFilter::itkCloneMacro ( Self )

◆ itkFactorylessNewMacro()

mitk::CropOpenCVImageFilter::itkFactorylessNewMacro ( Self )

◆ mitkClassMacro()

mitk::CropOpenCVImageFilter::mitkClassMacro ( CropOpenCVImageFilter ,
AbstractOpenCVImageFilter  )

◆ OnFilterImage()

bool mitk::CropOpenCVImageFilter::OnFilterImage ( cv::Mat & image)
overridevirtual

Crops image to rectangle given by mitk::CropOpenCVImageFilter::SetCropRegion.

Returns
false if no crop region was set or the crop region width is zero, true otherwise.

Implements mitk::AbstractOpenCVImageFilter.

Definition at line 22 of file mitkCropOpenCVImageFilter.cpp.

◆ SetCropRegion() [1/2]

void mitk::CropOpenCVImageFilter::SetCropRegion ( cv::Rect cropRegion)

Set region of interest for cropping.

Definition at line 67 of file mitkCropOpenCVImageFilter.cpp.

◆ SetCropRegion() [2/2]

void mitk::CropOpenCVImageFilter::SetCropRegion ( int topLeftX,
int topLeftY,
int bottomRightX,
int bottomRightY )

Set region of interest for cropping.

Definition at line 92 of file mitkCropOpenCVImageFilter.cpp.

Member Data Documentation

◆ m_CropRegion

cv::Rect mitk::CropOpenCVImageFilter::m_CropRegion
protected

Defines the region which will be cropped from the image.

Definition at line 65 of file mitkCropOpenCVImageFilter.h.

◆ m_NewCropRegionSet

bool mitk::CropOpenCVImageFilter::m_NewCropRegionSet
protected

True if no image was filtered since last set of a crop region.

Definition at line 70 of file mitkCropOpenCVImageFilter.h.


The documentation for this class was generated from the following files: