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

VxFrmFtorHistToDiff.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 VxFrmFtorHistToDiff_h
00016 #define VxFrmFtorHistToDiff_h
00017 
00018 #include "VxFrmFtorDfo.h"
00019 #include "HxHistogram.h"
00020 
00021 class VxFrmFtorHistToDiff : public VxFrmFtorDfo {
00022 public:
00023     VxFrmFtorHistToDiff(){};
00024     
00025     virtual VxValue         doIt(int frame, const VxValue& input1, const VxValue& input2) {
00026         if (input1.isNull() || input2.isNull())
00027             return VxValue();
00028         
00029         HxHistogram hist1, hist2;
00030         input1.get(hist1);
00031         input2.get(hist2);
00032         
00033         return VxValue((double) hist1.chiSquareNorm(hist2));
00034     };
00035         
00036     virtual HxString        getInputClass() const {
00037         return HxString("HxHistogram");
00038     }
00039     virtual HxString        getOutputClass() const {
00040         return HxString("double");
00041     }
00042 
00043     virtual HxString    name() const {
00044         return HxString("HistToDiff");
00045     }
00046 
00047     virtual VxFrmFtorDfo*   clone() const {
00048         return new VxFrmFtorHistToDiff();
00049     }
00050     
00051 private:    
00052     
00053 };
00054 #endif

Generated on Mon Jan 27 15:48:51 2003 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001