Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkIGTLMessageToUSImageFilter.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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITKIGTLMessageToUSImageFilter_H_HEADER_INCLUDED_
18 #define MITKIGTLMessageToUSImageFilter_H_HEADER_INCLUDED_
19 
20 #include <mitkCommon.h>
21 #include <MitkUSExports.h>
22 #include <mitkUSImageSource.h>
23 #include <mitkIGTLMessageSource.h>
24 #include <igtlImageMessage.h>
25 
26 namespace mitk
27 {
28  class MITKUS_EXPORT IGTLMessageToUSImageFilter : public USImageSource
29  {
30  public:
32  itkFactorylessNewMacro(Self);
33  itkCloneMacro(Self);
34 
43  void SetNumberOfExpectedOutputs(unsigned int numOutputs);
44 
52  void ConnectTo(mitk::IGTLMessageSource* UpstreamFilter);
53 
54  protected:
56 
57  using Superclass::GetNextRawImage;
58 
64  virtual void GetNextRawImage(mitk::Image::Pointer& img);
65 
66  private:
67  mitk::IGTLMessageSource* m_upstream;
68  mitk::Image::Pointer m_previousImage;
77  template <typename TPixel>
78  void Initiate(mitk::Image::Pointer& img, igtl::ImageMessage* msg, bool big_endian);
79  };
80 } // namespace mitk
81 
82 #endif // MITKIGTLMessageToUSImageFilter_H_HEADER_INCLUDED_
DataCollection - Class to facilitate loading/accessing structured data.
This is an abstract superclass for delivering USImages. Each subclass must implement the method mitk:...
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
OpenIGTLink message source.