25 #ifndef __ShowCamWxThreads_hh__
26 #define __ShowCamWxThreads_hh__
28 #include <bias_config.h>
31 #include <Gui/StringConv.hh>
32 #include <Image/Camera.hh>
33 #include <Image/ImagePackage.hh>
34 #include <Base/Image/ImageIO.hh>
35 #include <Base/Debug/TimeMeasure.hh>
37 #include <VideoSource/VideoSource_Base.hh>
39 #include <Base/Common/TimeStamp.hh>
56 const int& downsample,
57 wxMutex* BufferAccessMutex,
59 unsigned int& readIndex,
60 unsigned int& writeIndex,
73 bool saveToStream =
false);
77 virtual ExitCode
Entry();
87 int mapNameToStreamIdx_(std::string name);
90 std::string saveDirectory_;
91 std::string cameraName_;
94 unsigned int ImageCounter_;
105 std::vector<Camera<unsigned char>* > *ImageBuffer_;
106 std::vector<Camera<unsigned char>* > *ImageBufferCenter_;
107 std::vector<Camera<unsigned char>* > *ImageBufferRight_;
108 std::vector<Camera<float>* > *ImageBufferPMDDepth_;
109 std::vector<Camera<float>* > *ImageBufferPMDAmp_;
110 std::vector<Camera<float>* > *ImageBufferPMDInt_;
111 std::vector<Camera<float>* > *ImageBufferFloat_;
113 wxMutex* BufferAccess_;
114 bool* WriteToBuffer_;
115 unsigned int* WriteIndex_;
116 unsigned int* ReadIndex_;
118 std::vector<ImagePackage*> ips_;
119 std::vector<bool> bStreamOpen_;
148 wxCondition *ClientCondition,
149 wxCondition *ServerCondition,
150 wxMutex *mutexClientCondition,
151 wxMutex *mutexServerCondition,
152 unsigned int threadNumber,
153 wxMutex *BufferAccessMutex,
155 unsigned int& readIndex,
156 unsigned int& writeIndex,
180 bool *WriteToBuffer_;
181 wxMutex *mutexClientCondition_;
182 wxMutex *mutexServerCondition_;
183 wxCondition *ClientCondition_;
184 wxCondition *ServerCondition_;
185 unsigned int threadNumber_;
186 wxMutex *BufferAccess_;
187 unsigned int *WriteIndex_;
188 unsigned int *ReadIndex_;
189 unsigned int BufferSize_;
198 std::vector<Camera<unsigned char>* >* ImageBuffer_;
199 std::vector<Camera<unsigned char>* >* ImageBufferCenter_;
200 std::vector<Camera<unsigned char>* >* ImageBufferRight_;
202 std::vector<Camera<float>* >* ImageBufferPMDDepth_;
203 std::vector<Camera<float>* >* ImageBufferPMDAmp_;
204 std::vector<Camera<float>* >* ImageBufferPMDInt_;
205 unsigned int camtype_;
219 std::vector<wxCondition*> *ClientCondition,
220 std::vector<wxCondition*> *ServerCondition,
221 std::vector<wxMutex*> *mutexClientCondition,
222 std::vector<wxMutex*> *mutexServerCondition
232 std::vector<wxMutex*> *mutexClientCondition_;
233 std::vector<wxMutex*> *mutexServerCondition_;
234 std::vector<wxCondition*> *ClientCondition_;
235 std::vector<wxCondition*> *ServerCondition_;
236 std::vector<BIAS::VideoSource*> *Cameras_;
244 #endif // __ShowCamWxThreads_hh__
GrabSingleThread(BIAS::VideoSource *cam, wxCondition *ClientCondition, wxCondition *ServerCondition, wxMutex *mutexClientCondition, wxMutex *mutexServerCondition, unsigned int threadNumber, wxMutex *BufferAccessMutex, bool &writeToBuffer, unsigned int &readIndex, unsigned int &writeIndex, BIAS::Camera< unsigned char > *img, BIAS::Camera< unsigned char > *imgCenter, BIAS::Camera< unsigned char > *imgRight, BIAS::Camera< float > *imgDepth, BIAS::Camera< float > *imgAmp, BIAS::Camera< float > *imgInt, BIAS::Camera< unsigned char > *imgAll, std::vector< Camera< unsigned char > * > *imageBuffer, std::vector< Camera< unsigned char > * > *imageBufferCenter, std::vector< Camera< unsigned char > * > *imageBufferRight, std::vector< Camera< float > * > *imageBufferPMDDepth, std::vector< Camera< float > * > *imageBufferPMDAmp, std::vector< Camera< float > * > *imageBufferPMDInt)
Defines a common interface to different devices.
virtual ~GrabSingleThread()
void SetSaveDirectory(std::string &path)
virtual ~GrabMasterThread()
unsigned int FrameCounter_
This class creates a thread which stores an image in a file if rescale is not zero then the stored im...
void SetWriteToBuffer(bool buffer)
GrabMasterThread(std::vector< BIAS::VideoSource * > *Cameras, std::vector< wxCondition * > *ClientCondition, std::vector< wxCondition * > *ServerCondition, std::vector< wxMutex * > *mutexClientCondition, std::vector< wxMutex * > *mutexServerCondition)
class TimeMeasure contains functions for timing real time and cpu time.
ImageSaveThread(std::string cameraName, const int &downsample, wxMutex *BufferAccessMutex, bool &writeToBuffer, unsigned int &readIndex, unsigned int &writeIndex, BIAS::Camera< unsigned char > *img, BIAS::Camera< unsigned char > *imgCenter, BIAS::Camera< unsigned char > *imgRight, BIAS::Camera< float > *imgDepth, BIAS::Camera< float > *imgAmp, BIAS::Camera< float > *imgInt, std::vector< Camera< unsigned char > * > *imageBuffer, std::vector< Camera< unsigned char > * > *imageBufferCenter, std::vector< Camera< unsigned char > * > *imageBufferRight, std::vector< Camera< float > * > *imageBufferPmdDepth, std::vector< Camera< float > * > *imageBufferPmdAmp, std::vector< Camera< float > * > *imageBufferPmdInt, bool saveToStream=false)