MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkThreadedToFRawDataReconstruction.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12#ifndef mitkThreadedToFRawDataReconstruction_h
13#define mitkThreadedToFRawDataReconstruction_h
14
15// mitk includes
16#include "mitkImageSource.h"
17#include <MitkPMDExports.h>
18
19// itk includes
20#include <itkBarrier.h>
21#include <itkFastMutexLock.h>
22
23// vtk includes
24#include "vtkShortArray.h"
25
26namespace mitk
27{
29 {
30 std::vector<std::vector<short> > m_InputData;
31 std::vector<float*> m_OutputData;
32 unsigned int m_DataSize;
33 unsigned int m_LineWidth;
34 unsigned int m_FrameHeight;
36 itk::Barrier::Pointer m_Barrier;
37 itk::FastMutexLock::Pointer m_ImageDataMutex;
38 itk::FastMutexLock::Pointer m_ThreadDataMutex;
39 };
40
41 class MITKPMD_EXPORT ThreadedToFRawDataReconstruction : public itk::ProcessObject
42 {
43 public:
44
48 itkGetMacro(Init, bool);
49
50 void SetChannelData(vtkShortArray* sourceData);
51
52 void Initialize(int width, int height, int modulationFrequency, int sourceDataSize );
53
54 void GetDistances(float* dist);
55 void GetAmplitudes(float* ampl);
56 void GetIntensities(float* inten);
57 void GetAllData(float* dist, float* ampl, float* inten);
58
59 void Update();
60
61 protected:
70
75 virtual void GenerateData();
76
81 virtual void BeforeThreadedGenerateData();
82
86 static ITK_THREAD_RETURN_TYPE ThreadedGenerateDataCallbackFunction(void* data);
91 void ResizeOutputImage(float* in, float* out);
92
93 // member variables
99 vtkShortArray* m_SourceData;
100 bool m_Init;
101
102 float* m_CISDist;
103 float* m_CISAmpl;
104 float* m_CISInten;
108
109 itk::MultiThreader::Pointer m_Threader;
111
112 };
113} //end mitk namespace
114
115#endif
mitkClassMacroItkParent(ThreadedToFRawDataReconstruction, itk::ProcessObject)
float * m_CISInten
holds the intensity information from for one intensity image slice
void ResizeOutputImage(float *in, float *out)
Method to reduce image size from original controller size to output size (200x200px) and rotate the i...
float * m_CISDist
holds the distance information from for one distance image slice
float * m_CISAmpl
holds the amplitude information from for one amplitude image slice
IGT Exceptions.
itk::FastMutexLock::Pointer m_ImageDataMutex
mutex for coordinated access to image data
std::vector< std::vector< short > > m_InputData
itk::FastMutexLock::Pointer m_ThreadDataMutex
mutex to control access to images
itk::Barrier::Pointer m_Barrier
barrier to synchronize ends of threads