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

Public Methods | |
| HxGlobalOpsServant (HxServerBase *) | |
| virtual | ~HxGlobalOpsServant () |
| void | HxExportMatlabPixels (HxCorba::ImageRep_ptr im, HxCorba::DoubleSeq &pixels) throw (CORBA::SystemException) |
| HxCorba::Blob2dSet * | HxLabelBlobs (HxCorba::ImageRep_ptr image, HxCorba::ImageRep_ptr mask, CORBA::Long minimalBlobArea) throw (CORBA::SystemException) |
| HxCorba::DoubleSeqSeq * | HxNJetInvar (HxCorba::ImageRep_ptr im, const char *invar, CORBA::Double scale, CORBA::Long nBin) throw (CORBA::SystemException) |
| HxCorba::FloatSeq * | HxInvarGetHistos (const char *invar, const char *key) throw (CORBA::SystemException) |
| HxCorba::DoubleSeq * | HxInvarScores (const char *invar, CORBA::Long n) throw (CORBA::SystemException) |
Protected Attributes | |
| HxServerBase * | _server |
The constituent parts of the servant are: HxUserOpsGenSvt, HxUserOpsServant, HxGlobalOpsGenSvt, and HxGlobalOpsServant.
|
|
00017 : HxUserOpsServant(s), HxGlobalOpsGenSvt(s), HxUserOpsGenSvt(s), 00018 _server(s) 00019 { 00020 } |
|
|
00023 {
00024 }
|
|
||||||||||||
|
00031 {
00032 HxImageRep img = HxGetTiedObject<HxImageRepTiedSvt>(_server, image);
00033 double* pix = (double*)pixels.get_buffer();
00034
00035 ::HxExportMatlabPixels(img, pix);
00036 }
|
|
||||||||||||||||
|
00045 {
00046 HxImageRep img = HxGetTiedObject<HxImageRepTiedSvt>(_server,image);
00047 HxImageRep imgMask = HxGetTiedObject<HxImageRepTiedSvt>(_server,mask);
00048
00049 HxString blobs = ::HxLabelBlobs(img, imgMask, minimalBlobArea);
00050
00051 HxCorba::Blob2dSet_var blobseq = new HxCorba::Blob2dSet();
00052 int seqlength = 0;
00053 HxString name = "";
00054 for(int i=0; i<blobs.length(); i++)
00055 {
00056 if(blobs[i] == ' ') {
00057 HxBlob2d* blob = HxBlob2dRepository::instance().find(name);
00058 HxCorba::Blob2d_ptr objBlob =
00059 HxRegisterTiedServant<HxBlob2dTiedSvt>(_server, *blob);
00060 blobseq->length(seqlength+1);
00061 blobseq[seqlength++] = objBlob;
00062 name = "";
00063 }
00064 else
00065 name += blobs[i];
00066 }
00067
00068 return blobseq._retn();
00069 }
|
|
||||||||||||||||||||
|
00077 {
00078 HxImageRep hxIm = HxGetTiedObject<HxImageRepTiedSvt>(_server,im);
00079
00080 HxHistoList hxList = ::HxNJetInvar(hxIm, invar, scale, nBin);
00081
00082 HxCorba::DoubleSeqSeq_var theSeq = new HxCorba::DoubleSeqSeq();
00083 theSeq->length(hxList.size());
00084 int i=0;
00085 for(HxHistoList::iterator it = hxList.begin() ; it != hxList.end() ; it++) {
00086 HxHistogram hxHist = *it;
00087 int n = hxHist.dimensionSize(1);
00088 HxCorba::DoubleSeq_var s = new HxCorba::DoubleSeq();
00089 s->length(n);
00090 for (int j=0 ; j<n ; j++)
00091 s[j] = hxHist.get(j);
00092 theSeq[i++] = s;
00093 }
00094
00095 return theSeq._retn();
00096 }
|
|
||||||||||||
|
00105 {
00106 float* data = ::HxInvarGetHistos(invar, key);
00107 int length = ::HxInvarBinsPerHistogram(invar)*::HxInvarChannels(invar);
00108 if(!data) length = 0;
00109
00110 HxCorba::FloatSeq_var seq = new HxCorba::FloatSeq(length, length, data);
00111
00112 return seq._retn();
00113 }
|
|
||||||||||||
|
00120 {
00121 double* scores = ::HxInvarScores(invar, n);
00122
00123 HxCorba::DoubleSeq_var seq = new HxCorba::DoubleSeq(n, n, scores, true);
00124
00125 return seq._retn();
00126 }
|
|
|
Reimplemented from HxGlobalOpsGenSvt. |
1.2.12 written by Dimitri van Heesch,
© 1997-2001