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

VxFrmFtorImToHist.h

00001 /*
00002  *
00003  *  Copyright (c) 2001, TNO TPD, The Netherlands.
00004  *  All rights reserved. No part of this software may be handed to or used by persons 
00005  *  or organisation outside Kenniscentrum Watergraafsmeer (UvA-ISIS, TNO TPD) without 
00006  *  the written permission of TNO TPD.
00007  *
00008  *  Author(s):
00009  *      Jan Baan (baan@tpd.tno.nl)
00010  *      Jeroen Vendrig
00011  *
00012  * 
00013  */
00014 
00015 #ifndef VxFrmFtorImToHist_h
00016 #define VxFrmFtorImToHist_h
00017 
00018 #include "VxFrmFtorUfo.h"
00019 #include "HxImageToHistogram.h"
00020 
00021 class VxFrmFtorImToHist : public VxFrmFtorUfo {
00022 public:
00023     VxFrmFtorImToHist(int getDim, double lowBin,
00024         double highBin, int nBin) : _getDim(getDim), _lowBin(lowBin), _highBin(highBin), _nBin(nBin) {
00025     }
00026     
00027     virtual VxValue doIt(int frame, const VxValue& input) {
00028         if (input.isNull())
00029             return VxValue();
00030         HxImageRep im;
00031         input.get(im);
00032         return VxValue(HxImageToHistogram(im, _getDim, _lowBin, _highBin, _nBin));
00033     }
00034         
00035     virtual HxString    getInputClass() const {
00036         return HxString("HxImageRep");
00037     }
00038 
00039     virtual HxString    getOutputClass() const {
00040         return HxString("HxHistogram");
00041     }
00042 
00043     virtual HxString    name() const {
00044         return HxString("ImToHist");
00045     }
00046 
00047 
00048     virtual VxFrmFtorUfo* clone() const {
00049         return new VxFrmFtorImToHist(_getDim,_lowBin,_highBin,_nBin);
00050     }
00051     
00052 private:
00053     int     _getDim;
00054     double  _lowBin;
00055     double  _highBin;
00056     int     _nBin;
00057     
00058 };
00059 #endif

Generated on Tue Feb 3 14:18:45 2004 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001