Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkThreadedToFRawDataReconstruction.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 #ifndef __mitkThreadedToFRawDataReconstruction_h
17 #define __mitkThreadedToFRawDataReconstruction_h
18 
19 // mitk includes
20 #include "mitkImageSource.h"
21 #include <MitkPMDExports.h>
22 
23 // itk includes
24 #include <itkBarrier.h>
25 #include <itkFastMutexLock.h>
26 
27 // vtk includes
28 #include "vtkShortArray.h"
29 
30 namespace mitk
31 {
33  {
34  std::vector<std::vector<short> > m_InputData;
35  std::vector<float*> m_OutputData;
36  unsigned int m_DataSize;
37  unsigned int m_LineWidth;
38  unsigned int m_FrameHeight;
39  unsigned int m_ModulationFrequency;
43  };
44 
45  class MITKPMD_EXPORT ThreadedToFRawDataReconstruction : public itk::ProcessObject
46  {
47  public:
48 
50  itkFactorylessNewMacro(Self)
51  itkCloneMacro(Self)
52 
53  itkGetMacro(Init, bool);
54 
55  void SetChannelData(vtkShortArray* sourceData);
56 
57  void Initialize(int width, int height, int modulationFrequency, int sourceDataSize );
58 
59  void GetDistances(float* dist);
60  void GetAmplitudes(float* ampl);
61  void GetIntensities(float* inten);
62  void GetAllData(float* dist, float* ampl, float* inten);
63 
64  void Update();
65 
66  protected:
75 
80  virtual void GenerateData();
81 
86  virtual void BeforeThreadedGenerateData();
87 
91  static ITK_THREAD_RETURN_TYPE ThreadedGenerateDataCallbackFunction(void* data);
96  void ResizeOutputImage(float* in, float* out);
97 
98  // member variables
100  int m_Width;
101  int m_Height;
104  vtkShortArray* m_SourceData;
105  bool m_Init;
106 
107  float* m_CISDist;
108  float* m_CISAmpl;
109  float* m_CISInten;
113 
116 
117  };
118 } //end mitk namespace
119 
120 #endif // __mitkThreadedToFRawDataReconstruction_h
itk::FastMutexLock::Pointer m_ImageDataMutex
mutex for coordinated access to image data
itk::SmartPointer< Self > Pointer
float * m_CISDist
holds the distance information from for one distance image slice
static void Update(vtkPolyData *)
Definition: mitkSurface.cpp:35
DataCollection - Class to facilitate loading/accessing structured data.
float * m_CISAmpl
holds the amplitude information from for one amplitude image slice
itk::Barrier::Pointer m_Barrier
barrier to synchronize ends of threads
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:53
static bool in(Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4)
Definition: jsoncpp.cpp:244
std::vector< std::vector< short > > m_InputData
float * m_CISInten
holds the intensity information from for one intensity image slice
itk::FastMutexLock::Pointer m_ThreadDataMutex
mutex to control access to images