#include <HxImageSeqDisplayer.h>
Inheritance diagram for HxImageSeqDisplayer::

Public Methods | |
| HxImageSeqDisplayer (const HxImageSeq &seq) | |
| ~HxImageSeqDisplayer () | |
| virtual HxCorba::RgbSeq * | getRgb2d (CORBA::Long frameNr) throw (CORBA::SystemException) |
| virtual void | fillRgb2d (CORBA::Long frameNr, HxCorba::RgbBuffer_ptr buf) throw (CORBA::SystemException) |
| virtual CORBA::Long | nrFrames () throw (CORBA::SystemException) |
| virtual void | setDisplayMode (const char *displayMode) throw (CORBA::SystemException) |
| virtual char * | getDisplayMode () throw (CORBA::SystemException) |
| virtual void | setSize (const HxCorba::Sizes &newSize) throw (CORBA::SystemException) |
| virtual HxCorba::Sizes | getSizes () throw (CORBA::SystemException) |
| virtual HxCorba::Sizes | getOriginalSizes () throw (CORBA::SystemException) |
| virtual void | close () throw (CORBA::SystemException) |
|
|
00018 : _seq(seq), _displayMode("Direct"), _resWidth(-1), _resHeight(-1)
00019 {
00020 _nPixels = _seq.frameWidth() * _seq.frameHeight();
00021 _data = new CORBA::Long[_nPixels];
00022 }
|
|
|
00025 {
00026 delete [] _data;
00027 }
|
|
|
00041 {
00042 _seq.getRgbPixels2d(frameNr, (int*)_data, _displayMode,
00043 _resWidth, _resHeight);
00044
00045 return new HxCorba::RgbSeq(_nPixels, _nPixels, _data, false);
00046 }
|
|
||||||||||||
|
00052 {
00053 HxRgbBuffer* tmpBuf = new HxRgbBuffer(buf, _nPixels);
00054 _seq.getRgbPixels2d(frameNr, tmpBuf->getBuffer(), _displayMode,
00055 _resWidth, _resHeight);
00056 delete tmpBuf; //MNO: It seems that allocation-deallocation in the heap is faster.
00057
00058 /*PortableServer::Servant servant = HxServer::instance()->getServant(buf);
00059
00060 if(servant != NULL) {
00061 //in-proc pixelBuffer
00062 HxRgbBufferServant* pixbuff = dynamic_cast<HxRgbBufferServant*>(servant);
00063 int* intBuffer = pixbuff->getBuffer();
00064
00065 _seq.getRgbPixels2d(frameNr, intBuffer, _displayMode,
00066 _resWidth, _resHeight);
00067
00068 servant->_remove_ref();
00069 }
00070 else {
00071 //not in-proc: send pixels
00072 HxCorba::RgbSeq_var rgb = getRgb2d(frameNr);
00073 buf->setRgb(rgb.in());
00074 }*/
00075 }
|
|
|
Reimplemented from POA_HxCorba::ImageSeqDisplayer.
00080 {
00081 return _seq.nrFrames();
00082 }
|
|
|
00087 {
00088 _displayMode = displayMode;
00089 }
|
|
|
Reimplemented from POA_HxCorba::ImageSeqDisplayer.
00094 {
00095 return CORBA::string_dup(_displayMode.c_str());
00096 }
|
|
|
00101 {
00102 _nPixels = newSize.x * newSize.y;
00103
00104 _resWidth = (newSize.x == _seq.frameWidth())? -1 : newSize.x;
00105 _resHeight = (newSize.y == _seq.frameHeight())? -1 : newSize.y;
00106
00107 delete [] _data;
00108 _data = new CORBA::Long[_nPixels];
00109 }
|
|
|
Reimplemented from POA_HxCorba::ImageSeqDisplayer.
00115 {
00116 HxCorba::Sizes result = { _resWidth, _resHeight, 1 };
00117 if(result.x == -1) result.x = _seq.frameWidth();
00118 if(result.y == -1) result.y = _seq.frameHeight();
00119
00120 return result;
00121 }
|
|
|
Reimplemented from POA_HxCorba::ImageSeqDisplayer.
00126 {
00127 HxCorba::Sizes result = { _seq.frameWidth(), _seq.frameHeight(), 1 };
00128 return result;
00129 }
|
|
|
Reimplemented from POA_HxCorba::ImageSeqDisplayer.
00032 {
00033 PortableServer::ObjectId_var myOid =
00034 HxServer::instance()->getCurrentObjectId();
00035 HxServer::instance()->unregisterServant(myOid);
00036 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001