Horus Doc || Corba Reference || Corba   Client Server   Stubs C++   Stubs Java   Servant Generator  

HxImageRepTiedSvt Class Reference

Tied object for HxImageRep. More...

#include <HxImageRepTiedSvt.h>

Inheritance diagram for HxImageRepTiedSvt::

HxImageRep List of all members.

Public Types

typedef POA_HxCorba::ImageRep_tie<
HxImageRepTiedSvt > 
TieT
typedef HxImageRep HxT
typedef HxCorba::ImageRep CorbaT
typedef HxCorba::ImageList SeqT

Public Methods

 HxImageRepTiedSvt (const HxImageRep &obj)
virtual ~HxImageRepTiedSvt ()
virtual HxCorba::Sizes getSizes ()
virtual HxCorba::PixelT pixelType ()
virtual HxCorba::ImageSignature signature ()
virtual HxCorba::RgbSeqgetRgb2d (const char *displayMode)
virtual void fillRgb2d (HxCorba::RgbBuffer_ptr buf, const char *displayMode)
virtual HxCorba::ImageRepRgbSource_ptr getRgbSource ()
virtual HxCorba::ImageRep_ptr binaryPixOp (HxCorba::ImageRep_ptr arg, const char *bpoName, HxCorba::TagList_ptr tags)
virtual HxCorba::ImageRep_ptr binaryPixOpVal (const HxCorba::PixValue &arg, const char *bpoName, HxCorba::TagList_ptr tags)
virtual HxCorba::ImageRep_ptr unaryPixOp (const char *upoName, HxCorba::TagList_ptr tags)
virtual HxCorba::ImageRep_ptr multiPixOp (const HxCorba::ImageList &args, const char *mpoName, HxCorba::TagList_ptr tags)
virtual HxCorba::ImageListMNPixOp (const HxCorba::ImageList &args, const char *mpoName, HxCorba::TagList_ptr tags)
virtual HxCorba::PixValue reduceOp (const char *op, HxCorba::TagList_ptr tags)
virtual HxCorba::ImageRep_ptr generalizedConvolution (HxCorba::ImageRep_ptr kernel, const char *gMul, const char *gAdd, HxCorba::ResultPrecision resPrec, HxCorba::TagList_ptr tags)
virtual HxCorba::ImageRep_ptr genConv2dSep (HxCorba::ImageRep_ptr kernel1, HxCorba::ImageRep_ptr kernel2, const char *gMul, const char *gAdd, HxCorba::ResultPrecision resPrec, HxCorba::TagList_ptr tags)
virtual HxCorba::ImageRep_ptr geometricOp2d (HxCorba::Matrix_ptr func, HxCorba::GeoIntType gi, HxCorba::GeoTransType gt, CORBA::Boolean adjustSize, const HxCorba::PixValue &background)
virtual HxCorba::ImageRep_ptr neighbourhoodOp (const char *ngbName, HxCorba::TagList_ptr tags)
virtual HxCorba::ImageRep_ptr recGenConv (HxCorba::ImageRep_ptr kerImg, const char *gMul, const char *gAdd, HxCorba::ResultPrecision resPrec, HxCorba::TagList_ptr tags)
virtual HxCorba::ImageRep_ptr scale (CORBA::Double sx, CORBA::Double sy, HxCorba::GeoIntType gi)
virtual HxCorba::PixValue getAt (CORBA::Long x, CORBA::Long y, CORBA::Long z)
virtual void addRef ()
virtual void removeRef ()
int getRefCount ()
virtual void destroy ()

Detailed Description

Tied object for HxImageRep.


Member Typedef Documentation

typedef POA_HxCorba::ImageRep_tie<HxImageRepTiedSvt> HxImageRepTiedSvt::TieT
 

typedef HxImageRep HxImageRepTiedSvt::HxT
 

typedef HxCorba::ImageRep HxImageRepTiedSvt::CorbaT
 

typedef HxCorba::ImageList HxImageRepTiedSvt::SeqT
 


Constructor & Destructor Documentation

HxImageRepTiedSvt::HxImageRepTiedSvt const HxImageRep   obj
 

00026     : HxImageRep(obj), _refCnt(1)
00027 {
00028 }

HxImageRepTiedSvt::~HxImageRepTiedSvt   [virtual]
 

00031 {
00032     //std::cout << "~HxImageRepTiedSvt" << std::endl;
00033 }


Member Function Documentation

HxCorba::Sizes HxImageRepTiedSvt::getSizes   [virtual]
 

00064 {
00065     HxSizes s = HxImageRep::sizes();
00066     HxCorba::Sizes result = {s.x(), s.y(), s.z()};
00067     return result;
00068 }

HxCorba::PixelT HxImageRepTiedSvt::pixelType   [virtual]
 

Reimplemented from HxImageRep.

00072 {
00073     switch (HxImageRep::pixelType()) {
00074     case INT_VALUE:
00075         return HxCorba::INT_VALUE;
00076     case REAL_VALUE:
00077         return HxCorba::REAL_VALUE;
00078     case COMPLEX_VALUE:
00079         return HxCorba::COMPLEX_VALUE;
00080     }
00081     return HxCorba::INT_VALUE;
00082 }

HxCorba::ImageSignature HxImageRepTiedSvt::signature   [virtual]
 

Reimplemented from HxImageRep.

00086 {
00087     return HxConvertImageSig(HxImageRep::signature());
00088 }

HxCorba::RgbSeq * HxImageRepTiedSvt::getRgb2d const char *    displayMode [virtual]
 

00308 {
00309     HxRgbBuffer tmpBuf(numberOfPixels());
00310     HxImageRep::getRgbPixels2d(tmpBuf.getBuffer(), displayMode);
00311     return tmpBuf.makeRgbSeq();
00312 }

void HxImageRepTiedSvt::fillRgb2d HxCorba::RgbBuffer_ptr    buf,
const char *    displayMode
[virtual]
 

00317 {
00318     HxRgbBuffer tmpBuf(buf, numberOfPixels());
00319     HxImageRep::getRgbPixels2d(tmpBuf.getBuffer(), displayMode);
00320     // HxRgbBuffer destructor will send pixels if neccessary, that is
00321     // if the RgbBuffer does not reside in this server
00322 }

HxCorba::ImageRepRgbSource_ptr HxImageRepTiedSvt::getRgbSource   [virtual]
 

00326 {
00327     PortableServer::Servant servant = new HxImageRepRgbSource(*this);
00328     CORBA::Object_ptr obj = HxServer::instance()->registerServant(servant);
00329 
00330     servant->_remove_ref();
00331     return HxCorba::ImageRepRgbSource::_narrow(obj);
00332 }

HxCorba::ImageRep_ptr HxImageRepTiedSvt::binaryPixOp HxCorba::ImageRep_ptr    arg,
const char *    bpoName,
HxCorba::TagList_ptr    tags
[virtual]
 

00093 {
00094     //HxEnvCorba* env = dynamic_cast<HxEnvCorba*>(HxEnvironment::instance());
00095     //env->beginCapture();
00096     HxEnvCorbaCapturer<HxCorba::ImageException> cap; //error handling (ctor & dtor)
00097 
00098     HxTagList empty_tl;
00099     HxTagList& tl = HxGetTiedObject<HxTagListTiedSvt>(tags, empty_tl);
00100     HxImageRep argImg = HxGetTiedObject<HxImageRepTiedSvt>(arg);
00101 
00102     HxImageRep resImg = HxImageRep::binaryPixOp(argImg, bpoName, tl);
00103 
00104     //char* error = env->endCapture();
00105     //if(error) throw HxCorba::ImageException(error);
00106 
00107     return HxRegisterTiedServant<HxImageRepTiedSvt>(resImg);
00108 }

HxCorba::ImageRep_ptr HxImageRepTiedSvt::binaryPixOpVal const HxCorba::PixValue   arg,
const char *    bpoName,
HxCorba::TagList_ptr    tags
[virtual]
 

00113 {
00114     HxEnvCorbaCapturer<HxCorba::ImageException> cap; //error handling (ctor & dtor)
00115 
00116     HxTagList empty_tl;
00117     HxTagList& tl = HxGetTiedObject<HxTagListTiedSvt>(tags, empty_tl);
00118     HxValue argVal = HxConvertValue(arg);
00119 
00120     HxImageRep resImg = HxImageRep::binaryPixOp(argVal, bpoName, tl);
00121 
00122     return HxRegisterTiedServant<HxImageRepTiedSvt>(resImg);
00123 }

HxCorba::ImageRep_ptr HxImageRepTiedSvt::unaryPixOp const char *    upoName,
HxCorba::TagList_ptr    tags
[virtual]
 

00127 {
00128     HxEnvCorbaCapturer<HxCorba::ImageException> cap; //error handling (ctor & dtor)
00129 
00130     HxTagList empty_tl;
00131     HxTagList& tl = HxGetTiedObject<HxTagListTiedSvt>(tags, empty_tl);
00132 
00133     HxImageRep resImg = HxImageRep::unaryPixOp(upoName, tl);
00134 
00135     return HxRegisterTiedServant<HxImageRepTiedSvt>(resImg);
00136 }

HxCorba::ImageRep_ptr HxImageRepTiedSvt::multiPixOp const HxCorba::ImageList   args,
const char *    mpoName,
HxCorba::TagList_ptr    tags
[virtual]
 

00141 {
00142     HxEnvCorbaCapturer<HxCorba::ImageException> cap; //error handling (ctor & dtor)
00143 
00144     HxTagList empty_tl;
00145     HxTagList& tl = HxGetTiedObject<HxTagListTiedSvt>(tags, empty_tl);
00146 
00147     //HxImageList argList;
00148     //for (int i=0; i < args.length(); i++) {
00149     //    HxImageRep argImg = HxGetTiedObject<HxImageRepTiedSvt>(args[i]);
00150     //  argList += argImg;
00151     //}
00152     HxImageList argList = HxGetTiedObjectList<HxImageRepTiedSvt, HxImageList>(args);
00153 
00154     HxImageRep resImg = HxImageRep::multiPixOp(argList, mpoName, tl);
00155 
00156     return HxRegisterTiedServant<HxImageRepTiedSvt>(resImg);
00157 }

HxCorba::ImageList * HxImageRepTiedSvt::MNPixOp const HxCorba::ImageList   args,
const char *    mpoName,
HxCorba::TagList_ptr    tags
[virtual]
 

00162 {
00163     HxEnvCorbaCapturer<HxCorba::ImageException> cap; //error handling (ctor & dtor)
00164 
00165     HxTagList empty_tl;
00166     HxTagList& tl = HxGetTiedObject<HxTagListTiedSvt>(tags, empty_tl);
00167 
00168     //HxImageList argList;
00169     //for (int i=0; i < args.length(); i++) {
00170     //    HxImageRep argImg = HxGetTiedObject<HxImageRepTiedSvt>(args[i]);
00171     //  argList += argImg;
00172     //}
00173     HxImageList argList = HxGetTiedObjectList<HxImageRepTiedSvt, HxImageList>(args);
00174 
00175     HxImageList resList = HxImageRep::MNPixOp(argList, mpoName, tl);
00176 
00177     //HxCorba::ImageList_var imglist = new HxCorba::ImageList();
00178     //imglist->length(resList.size());
00179     //int n = 0;
00180     //HxImageList::const_iterator l;
00181     //for (l = resList.begin(); l != resList.end(); l++)
00182     //  imglist[n++] =  HxRegisterTiedServant<HxImageRepTiedSvt>(resImg);
00183     //return imglist._retn();
00184     return HxMakeTiedServantsList<HxImageRepTiedSvt, HxImageList>(resList);
00185 }

HxCorba::PixValue HxImageRepTiedSvt::reduceOp const char *    op,
HxCorba::TagList_ptr    tags
[virtual]
 

00189 {
00190     HxEnvCorbaCapturer<HxCorba::ImageException> cap; //error handling (ctor & dtor)
00191 
00192     HxTagList empty_tl;
00193     HxTagList& tl = HxGetTiedObject<HxTagListTiedSvt>(tags, empty_tl);
00194 
00195     HxValue resVal = HxImageRep::reduceOp(op, tl);
00196 
00197     return HxConvertValue(resVal);
00198 }

HxCorba::ImageRep_ptr HxImageRepTiedSvt::generalizedConvolution HxCorba::ImageRep_ptr    kernel,
const char *    gMul,
const char *    gAdd,
HxCorba::ResultPrecision    resPrec,
HxCorba::TagList_ptr    tags
[virtual]
 

00204 {
00205     HxEnvCorbaCapturer<HxCorba::ImageException> cap; //error handling (ctor & dtor)
00206 
00207     HxTagList empty_tl;
00208     HxTagList& tl = HxGetTiedObject<HxTagListTiedSvt>(tags, empty_tl);
00209     HxImageRep kerImg = HxGetTiedObject<HxImageRepTiedSvt>(kernel);
00210     HxImageRep::ResultPrecision prec = HxConvertPrecision(resPrec);
00211 
00212     HxImageRep resImg = HxImageRep::generalizedConvolution(kerImg,
00213         gMul, gAdd, prec, tl);
00214 
00215     return HxRegisterTiedServant<HxImageRepTiedSvt>(resImg);
00216 }

HxCorba::ImageRep_ptr HxImageRepTiedSvt::genConv2dSep HxCorba::ImageRep_ptr    kernel1,
HxCorba::ImageRep_ptr    kernel2,
const char *    gMul,
const char *    gAdd,
HxCorba::ResultPrecision    resPrec,
HxCorba::TagList_ptr    tags
[virtual]
 

00221 {
00222     HxEnvCorbaCapturer<HxCorba::ImageException> cap; //error handling (ctor & dtor)
00223 
00224     HxTagList empty_tl;
00225     HxTagList& tl = HxGetTiedObject<HxTagListTiedSvt>(tags, empty_tl);
00226     HxImageRep kerImg1 = HxGetTiedObject<HxImageRepTiedSvt>(kernel1);
00227     HxImageRep kerImg2 = HxGetTiedObject<HxImageRepTiedSvt>(kernel2);
00228     HxImageRep::ResultPrecision prec = HxConvertPrecision(resPrec);
00229 
00230     HxImageRep resImg = HxImageRep::genConv2dSep(kerImg1, kerImg2,
00231         gMul, gAdd, prec, tl);
00232 
00233     return HxRegisterTiedServant<HxImageRepTiedSvt>(resImg);
00234 }

HxCorba::ImageRep_ptr HxImageRepTiedSvt::geometricOp2d HxCorba::Matrix_ptr    func,
HxCorba::GeoIntType    gi,
HxCorba::GeoTransType    gt,
CORBA::Boolean    adjustSize,
const HxCorba::PixValue   background
[virtual]
 

00241 {
00242     HxEnvCorbaCapturer<HxCorba::ImageException> cap; //error handling (ctor & dtor)
00243 
00244     HxGeoIntType geoInt = HxConvertGeoIntType(gi);
00245     HxGeoTransType geoTr = HxConvertGeoTransType(gt);
00246     HxValue backgr = HxConvertValue(background);
00247     HxMatrix mat = HxGetTiedObject<HxMatrixTiedSvt>(func);
00248 
00249     HxImageRep resImg =
00250         HxImageRep::geometricOp2d(mat, geoInt, geoTr, adjustSize, backgr);
00251     return HxRegisterTiedServant<HxImageRepTiedSvt>(resImg);
00252 }

HxCorba::ImageRep_ptr HxImageRepTiedSvt::neighbourhoodOp const char *    ngbName,
HxCorba::TagList_ptr    tags
[virtual]
 

00258 {
00259     HxEnvCorbaCapturer<HxCorba::ImageException> cap; //error handling (ctor & dtor)
00260 
00261     HxTagList empty_tl;
00262     HxTagList& tl = HxGetTiedObject<HxTagListTiedSvt>(tags, empty_tl);
00263 
00264     HxImageRep resImg = HxImageRep::neighbourhoodOp(ngbName, tl);
00265 
00266     return HxRegisterTiedServant<HxImageRepTiedSvt>(resImg);
00267 }

HxCorba::ImageRep_ptr HxImageRepTiedSvt::recGenConv HxCorba::ImageRep_ptr    kernel,
const char *    gMul,
const char *    gAdd,
HxCorba::ResultPrecision    resPrec,
HxCorba::TagList_ptr    tags
[virtual]
 

00273 {
00274     HxEnvCorbaCapturer<HxCorba::ImageException> cap; //error handling (ctor & dtor)
00275 
00276     HxTagList empty_tl;
00277     HxTagList& tl = HxGetTiedObject<HxTagListTiedSvt>(tags, empty_tl);
00278 
00279     HxImageRep kerImg = HxGetTiedObject<HxImageRepTiedSvt>(kernel);
00280     HxImageRep::ResultPrecision prec = HxConvertPrecision(resPrec);
00281 
00282     HxImageRep resImg = HxImageRep::recGenConv(kerImg, gMul, gAdd, prec, tl);
00283 
00284     return HxRegisterTiedServant<HxImageRepTiedSvt>(resImg);
00285 }

HxCorba::ImageRep_ptr HxImageRepTiedSvt::scale CORBA::Double    sx,
CORBA::Double    sy,
HxCorba::GeoIntType    gi
[virtual]
 

00290 {
00291     HxGeoIntType geo = HxConvertGeoIntType(gi);
00292     //HxImageRep resImg = HxImageRep::scale(sx, sy, geo);
00293     HxImageRep resImg = HxScale(*this, sx, sy, 1.0, geo, 1);
00294     return HxRegisterTiedServant<HxImageRepTiedSvt>(resImg);
00295 }

HxCorba::PixValue HxImageRepTiedSvt::getAt CORBA::Long    x,
CORBA::Long    y,
CORBA::Long    z
[virtual]
 

00300 {
00301     HxValue resVal = HxImageRep::getAt(x, y, z);
00302     return HxConvertValue(resVal);
00303 }

void HxImageRepTiedSvt::addRef   [virtual]
 

00037 {
00038     _refCnt++;
00039 }

void HxImageRepTiedSvt::removeRef   [virtual]
 

00043 {
00044     if(--_refCnt <= 0) destroy();
00045 }

int HxImageRepTiedSvt::getRefCount  
 

00049 {
00050     return _refCnt;
00051 }

void HxImageRepTiedSvt::destroy   [virtual]
 

00055 {
00056     PortableServer::ObjectId_var myOid =
00057         HxServer::instance()->getCurrentObjectId();
00058 
00059     HxServer::instance()->unregisterServant(myOid);
00060 }


The documentation for this class was generated from the following files:
Generated on Mon Jan 27 15:20:56 2003 for CorbaReference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001