Medical Imaging Interaction Toolkit  2018.4.99-3e3f1a6e
Medical Imaging Interaction Toolkit
mitkUSImageSource.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 MITKUSImageSource_H_HEADER_INCLUDED_
14 #define MITKUSImageSource_H_HEADER_INCLUDED_
15 
16 // ITK
17 #include <itkProcessObject.h>
18 #include <itkFastMutexLock.h>
19 
20 // MITK
21 #include <MitkUSExports.h>
22 #include <mitkCommon.h>
26 
27 namespace mitk {
37  class MITKUS_EXPORT USImageSource : public itk::Object
38  {
39  public:
40  static const char* IMAGE_PROPERTY_IDENTIFIER;
41 
43 
44  itkGetMacro(ImageFilter, mitk::BasicCombinationOpenCVImageFilter::Pointer);
45 
46  void PushFilter(AbstractOpenCVImageFilter::Pointer filter);
47  bool RemoveFilter(AbstractOpenCVImageFilter::Pointer filter);
48  bool GetIsFilterInThePipeline(AbstractOpenCVImageFilter::Pointer filter);
49 
57  std::vector<mitk::Image::Pointer> GetNextImage();
58 
59  protected:
60  USImageSource();
61  ~USImageSource() override;
70  virtual void GetNextRawImage(std::vector<cv::Mat>&);
71 
76  virtual void GetNextRawImage(std::vector<mitk::Image::Pointer>&) = 0;
77 
85  mitk::ImageToOpenCVImageFilter::Pointer m_MitkToOpenCVFilter;
86 
87  private:
91  BasicCombinationOpenCVImageFilter::Pointer m_ImageFilter;
92 
93  int m_CurrentImageId;
94 
95  itk::FastMutexLock::Pointer m_ImageFilterMutex;
96  };
97 } // namespace mitk
98 #endif /* MITKUSImageSource_H_HEADER_INCLUDED_ */
mitk::OpenCVToMitkImageFilter::Pointer m_OpenCVToMitkFilter
Used to convert from OpenCV Images to MITK Images.
DataCollection - Class to facilitate loading/accessing structured data.
This is an abstract superclass for delivering USImages. Each subclass must implement the method mitk:...
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
mitk::ImageToOpenCVImageFilter::Pointer m_MitkToOpenCVFilter
Used to convert from MITK Images to OpenCV Images.
#define MITKUS_EXPORT
Definition: MitkUSExports.h:15
static const char * IMAGE_PROPERTY_IDENTIFIER