MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkUSImageSource.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 mitkUSImageSource_h
14#define mitkUSImageSource_h
15
16#include <mutex>
17
18// ITK
19#include <itkProcessObject.h>
20
21// MITK
22#include <MitkUSExports.h>
23#include <mitkCommon.h>
27
28namespace mitk {
38 class MITKUS_EXPORT USImageSource : public itk::Object
39 {
40 public:
41 static const char* IMAGE_PROPERTY_IDENTIFIER;
42
44
45 itkGetMacro(ImageFilter, mitk::BasicCombinationOpenCVImageFilter::Pointer);
46
47 void PushFilter(AbstractOpenCVImageFilter::Pointer filter);
48 bool RemoveFilter(AbstractOpenCVImageFilter::Pointer filter);
49 bool GetIsFilterInThePipeline(AbstractOpenCVImageFilter::Pointer filter);
50
58 std::vector<mitk::Image::Pointer> GetNextImage();
59
60 protected:
62 ~USImageSource() override;
71 virtual void GetNextRawImage(std::vector<cv::Mat>&);
72
77 virtual void GetNextRawImage(std::vector<mitk::Image::Pointer>&) = 0;
78
82 mitk::OpenCVToMitkImageFilter::Pointer m_OpenCVToMitkFilter;
86 mitk::ImageToOpenCVImageFilter::Pointer m_MitkToOpenCVFilter;
87
88 private:
92 BasicCombinationOpenCVImageFilter::Pointer m_ImageFilter;
93
94 int m_CurrentImageId;
95
96 std::mutex m_ImageFilterMutex;
97 };
98} // namespace mitk
99#endif
This is an abstract superclass for delivering USImages. Each subclass must implement the method mitk:...
mitkClassMacroItkParent(USImageSource, itk::Object)
static const char * IMAGE_PROPERTY_IDENTIFIER
mitk::OpenCVToMitkImageFilter::Pointer m_OpenCVToMitkFilter
Used to convert from OpenCV Images to MITK Images.
itkGetMacro(ImageFilter, mitk::BasicCombinationOpenCVImageFilter::Pointer)
virtual void GetNextRawImage(std::vector< mitk::Image::Pointer > &)=0
Set mitk::Image to the next image received from the device or file. This method must be implemented i...
mitk::ImageToOpenCVImageFilter::Pointer m_MitkToOpenCVFilter
Used to convert from MITK Images to OpenCV Images.
IGT Exceptions.