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

VxFrmFtorSeqToIm.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 VxFrmFtorSeqToIm_h
00016 #define VxFrmFtorSeqToIm_h
00017 
00018 
00019 #include "HxImageSeq.h"
00020 #include "VxFrmFtorUfo.h"
00021 
00022 class VxFrmFtorSeqToIm : public VxFrmFtorUfo {
00023 public:
00024     VxFrmFtorSeqToIm(HxImageSeq seq) : _seq(seq) {};
00025     
00026     virtual VxValue doIt(int frame, const VxValue& input) {
00027         // edge condition: return first of last frame if framenr is out of boundaries
00028         if(frame<0)
00029             frame = 0;
00030         if(frame>=_seq.nrFrames())
00031             frame = _seq.nrFrames()-1;
00032         
00033         return VxValue(_seq.getFrame(frame));
00034         
00035     };
00036     
00037     virtual HxString    getInputClass() const {
00038         return HxString("");
00039     }
00040     virtual HxString    getOutputClass() const {
00041         return HxString("HxImageRep");
00042     }
00043 
00044     virtual HxString    name() const {
00045         return HxString("SeqToIm");
00046     }
00047 
00048     virtual VxFrmFtorUfo* clone() const {
00049         return new VxFrmFtorSeqToIm(_seq);
00050     }
00051     
00052 private:
00053     HxImageSeq          _seq;
00054 };
00055 
00056 
00057 
00058 #endif

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