Medical Imaging Interaction Toolkit  2023.04.00
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
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 
28 namespace 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:
61  USImageSource();
62  ~USImageSource() override;
71  virtual void GetNextRawImage(std::vector<cv::Mat>&);
72 
77  virtual void GetNextRawImage(std::vector<mitk::Image::Pointer>&) = 0;
78 
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
mitkOpenCVToMitkImageFilter.h
mitkImageToOpenCVImageFilter.h
mitkBasicCombinationOpenCVImageFilter.h
mitk::USImageSource::IMAGE_PROPERTY_IDENTIFIER
static const char * IMAGE_PROPERTY_IDENTIFIER
Definition: mitkUSImageSource.h:41
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition: RenderingTests.dox:1
mitk::USImageSource
This is an abstract superclass for delivering USImages. Each subclass must implement the method mitk:...
Definition: mitkUSImageSource.h:38
mitkCommon.h
mitk::USImageSource::m_OpenCVToMitkFilter
mitk::OpenCVToMitkImageFilter::Pointer m_OpenCVToMitkFilter
Used to convert from OpenCV Images to MITK Images.
Definition: mitkUSImageSource.h:82
mitk::ImageSource::Pointer
itk::SmartPointer< Self > Pointer
Definition: mitkImageSource.h:39
mitk::USImageSource::m_MitkToOpenCVFilter
mitk::ImageToOpenCVImageFilter::Pointer m_MitkToOpenCVFilter
Used to convert from MITK Images to OpenCV Images.
Definition: mitkUSImageSource.h:86