Medical Imaging Interaction Toolkit  2018.4.99-67d34b5d
Medical Imaging Interaction Toolkit
mitkPhotoacousticOCLUsedLinesCalculation.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 _MITKPHOTOACOUSTICSOCLUSEDLINESCALCULATION_H_
14 #define _MITKPHOTOACOUSTICSOCLUSEDLINESCALCULATION_H_
15 
16 #if defined(PHOTOACOUSTICS_USE_GPU) || DOXYGEN
17 
19 #include <itkObject.h>
21 
22 namespace mitk
23 {
30  class OCLUsedLinesCalculation : public OclDataSetToDataSetFilter, public itk::Object
31  {
32  public:
33  mitkClassMacroItkParent(OCLUsedLinesCalculation, itk::Object);
34  mitkNewMacro1Param(Self, mitk::BeamformingSettings::Pointer);
35 
36  void Update();
37 
38  void SetElementHeightsBuffer(cl_mem elementHeightsBuffer);
39  void SetElementPositionsBuffer(cl_mem elementPositionsBuffer);
40 
41  protected:
42 
44  OCLUsedLinesCalculation(mitk::BeamformingSettings::Pointer settings);
45 
47  virtual ~OCLUsedLinesCalculation();
48 
50  bool Initialize();
51 
52  void Execute();
53 
54  mitk::PixelType GetOutputType()
55  {
56  return mitk::MakeScalarPixelType<unsigned short>();
57  }
58 
59  int GetBytesPerElem()
60  {
61  return sizeof(unsigned short);
62  }
63 
64  virtual us::Module* GetModule();
65 
66  int m_sizeThis;
67 
68  private:
70  cl_kernel m_PixelCalculation;
71 
72  BeamformingSettings::Pointer m_Conf;
73  float m_part;
74  size_t m_ChunkSize[3];
75  cl_mem m_ElementHeightsBuffer;
76  cl_mem m_ElementPositionsBuffer;
77  };
78 }
79 #endif
80 #endif
#define mitkNewMacro1Param(classname, type)
Definition: mitkCommon.h:72
static void Update(vtkPolyData *)
Definition: mitkSurface.cpp:31
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
Class for defining the data type of pixels.
Definition: mitkPixelType.h:51