div class="twikiTopBar">

Chair for Computer Aided Medical Procedures & Augmented Reality
Lehrstuhl für Informatikanwendungen in der Medizin & Augmented Reality

ShmemNeed Class Reference
[Shared memory viewer]

The class handling the shared memory need. More...

Collaboration diagram for ShmemNeed:

Collaboration graph
[legend]

Public Member Functions

CORBA::Object_ptr newSession (DWARF::ActiveServiceDescription_ptr serviceDesc, const char *name, const char *protocol, const char *partner, DWARF::Attributes_ptr attrs)
 Reads partner's attributes and sets image width, height and colormode accordingly.
void endSession (DWARF::ActiveServiceDescription_ptr serviceDesc, const char *name, const char *protocol, const char *partner)
 Stops image acquisition.
void setSharedMemIds (long sharedMemKey, long semaphoreKey, long sharedMemSize, short maxReaders)
 Sets internal data structures for accessing shared mem.
void receiveData ()
 main loop for getting data and sending it to the GUI.
void stopDataAquisition ()
 Stops updating the window.

Private Attributes

unsigned char * p_imgBuffer
 image data
int m_width
 image width
int m_height
 image height
ColorMode m_colorMode
 color mode
bool m_hasShmem
 tells us whether we have a shared mem segment already
bool hasSession
 tells us whether we have a session already
ShmemViewerWindowp_window
 the Qt main window displaying our image
bool m_shouldRun
 indicates whether we should shut down

Detailed Description

The class handling the shared memory need.

Author:
Martin Wagner <martin.wagner@in.tum.de>

Definition at line 90 of file ShmemViewer.h.


Member Function Documentation

void ShmemNeed::receiveData  ) 
 

main loop for getting data and sending it to the GUI.

Called by ShmemViewer::run(), this method stays in a loop until shouldRun is false and permanently updates window with new data taken from shared memory by calling ShmemViewerWindow::setImg32Data(p_sharedMemPtr) or ShmemViewerWindow::setImg8Data(p_sharedMemPtr), depending on the current color mode

Definition at line 250 of file ShmemViewer.cc.

ShmemNeed Class Reference | generated on Sun Apr 29 02:01:10 2007 by Doxygen 1.4.1 for DWARF