Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

HxMfQueueBased Class Reference

Class definition of a method frame for queue based operations. More...

#include <HxMfQueueBased.h>

List of all members.

Public Methods

 HxMfQueueBased (HxImageData *source, HxImageData *kernel, HxString ngbName, HxTagList &tags)
 Constructor. More...

 ~HxMfQueueBased ()
 Destructor. More...

HxImageDatasource () const
 The source image of the frame. More...

HxImageDatakernel () const
 The kernel image of the frame. More...

HxImageDataresult () const
 The result image of the frame. More...

bool preOpIsOk () const
 Indicates whether initialization was OK. More...


Detailed Description

Class definition of a method frame for queue based operations.


Constructor & Destructor Documentation

HxMfQueueBased::HxMfQueueBased HxImageData   srcImg,
HxImageData   kernel,
HxString    ngbName,
HxTagList   tags
 

Constructor.

A result image will be allocated with the same size as the source image. The registry will be queried for the result type. The registry will also be queried for the kernel type. If necessary the kernel image will be converted to this type.

00021     : _source(srcImg), _kernel(kernel), _result(0),
00022         _tmpKernel(0), _preOpIsOk(true)
00023 {
00024     if (!_source || !_kernel)
00025     {
00026         _preOpIsOk = false;
00027 #ifdef _DEBUG
00028         std::cout << "false at line " << __LINE__ << std::endl;
00029 #endif //#ifdef _DEBUG
00030         return;
00031     }
00032 
00033 #ifdef _DEBUG
00034     std::cout << "srcImg= " << srcImg->signature().toString() << " " << srcImg->sizes() << std::endl; 
00035     std::cout << "kernel= " << kernel->signature().toString() << " " << kernel->sizes() << std::endl; 
00036     std::cout << "ngbName= " << ngbName << std::endl; 
00037     std::cout << "tags=" << tags << std::endl; 
00038 #endif //#ifdef _DEBUG
00039     HxImageSignature srcSig(_source->signature());
00040 
00041     HxImageSignature resultSig
00042         = HxImgFtorRuleBase::instance().getResultType(
00043             srcSig, "QueueBased", srcSig.toString(), ngbName);
00044 
00045     HxImageSignature kernelSig
00046         = HxImgFtorRuleBase::instance().getKernelType(
00047             _kernel->signature(), "QueueBased", srcSig.toString(), ngbName);
00048 
00049     _result = HxImgDataFactory::instance().makeImage(resultSig, srcImg->sizes());
00050 
00051     if (kernelSig != _kernel->signature())
00052     {
00053         _tmpKernel = HxImgDataFactory::instance().makeImage(
00054             kernelSig, _kernel->sizes());
00055         _tmpKernel->setPartImage(_kernel);
00056         _tmpKernel->weight(_kernel->weight().x());
00057         _kernel = _tmpKernel;
00058     }
00059 #ifdef _DEBUG
00060     std::cout << "_source= " << _source->signature().toString() << " " << _source->sizes() << std::endl; 
00061     std::cout << "_kernel= " << _kernel->signature().toString() << " " << _kernel->sizes() << std::endl; 
00062     std::cout << "_result= " << _result->signature().toString() << " " << _result->sizes() << std::endl; 
00063 #endif //#ifdef _DEBUG
00064 }

HxMfQueueBased::~HxMfQueueBased  
 

Destructor.

00067 {
00068     if (_tmpKernel)
00069         delete _tmpKernel;
00070 }


Member Function Documentation

HxImageData * HxMfQueueBased::source   const
 

The source image of the frame.

00074 { 
00075     return _source; 
00076 }

HxImageData * HxMfQueueBased::kernel   const
 

The kernel image of the frame.

00080 { 
00081     return _kernel; 
00082 }

HxImageData * HxMfQueueBased::result   const
 

The result image of the frame.

00086 { 
00087     return _result; 
00088 }

bool HxMfQueueBased::preOpIsOk   const [inline]
 

Indicates whether initialization was OK.

00059 {
00060     return _preOpIsOk;
00061 }


The documentation for this class was generated from the following files:
Generated on Tue Feb 3 14:19:06 2004 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001