Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
VideoSource_DiskZessPMD.hh
1 /*
2 This file is part of the BIAS library (Basic ImageAlgorithmS).
3 
4 Copyright (C) 2003-2009 (see file CONTACT for details)
5  Multimediale Systeme der Informationsverarbeitung
6  Institut fuer Informatik
7  Christian-Albrechts-Universitaet Kiel
8 
9 
10 BIAS is free software; you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14 
15 BIAS is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU Lesser General Public License for more details.
19 
20 You should have received a copy of the GNU Lesser General Public License
21 along with BIAS; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24 
25 
26 #ifndef __BIASVIDEOSOURCE_DISKZESSPMD_HH__
27 #define __BIASVIDEOSOURCE_DISKZESSPMD_HH__
28 
29 #include <VideoSource/VideoSource_Disk.hh>
30 #include <Image/Camera.hh>
31 #include <bias_config.h>
32 #include <vector>
33 
34 
35 namespace BIAS {
36 
37  /** @class VideoSource_DiskZessPMD
38  @ingroup g_videosource
39  @brief reads images from three image lists with 2d images, depth images and modulation coefficients
40  @author kellner 10/2007 */
41  class BIASVideoSource_EXPORT VideoSource_DiskZessPMD : public VideoSource_Disk {
42 
43  public:
45 
46  virtual ~VideoSource_DiskZessPMD();
47 
48  /** The filenames vector should contain the names of PMD-TIFFS
49  */
50  virtual int OpenDevice(const std::vector<std::string> &FileNames);
51 
52  virtual int OpenDevice();
53 
54  /** Returns the 2D image, and reads depth and modulation coefficients */
55  virtual int GrabSingle(Camera<unsigned char> &image);
56 
57  /** Returns the depth image. Must be called after GrabSingle() */
58  inline int GrabSingleDepth(Camera<float> &image)
59  {
60  if (!DepthImg_.IsEmpty()) {
61  image = DepthImg_;
62  return 0;
63  }
64  return -1;
65  }
66 
67  /** Returns the depth image. Must be called after GrabSingle() */
68  inline int GrabSingleModCoeff(Camera<float> &image)
69  {
70  if (!ModCoeffImg_.IsEmpty()) {
71  image = ModCoeffImg_;
72  return 0;
73  }
74  return -1;
75  }
76 
77  void SetGenerateNewUIDs(bool s) {
78  BIASERR("Always generating new UUIDS for PMD images");
79  BIASABORT;
80  }
81 
82  protected:
85  };
86 
87 } // namespace BIAS
88 
89 #endif
int GrabSingleModCoeff(Camera< float > &image)
Returns the depth image.
int GrabSingleDepth(Camera< float > &image)
Returns the depth image.
reads images from three image lists with 2d images, depth images and modulation coefficients ...
This class simulates a video device by loading images from disk.