NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkNVidiaSDIDataType.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef niftkNVidiaSDIDataType_h
16 #define niftkNVidiaSDIDataType_h
17 
18 #include <niftkIGIDataType.h>
19 
20 namespace niftk
21 {
22 
28 {
29 public:
30 
31  //typedef unsigned __int64 NVidiaSDITimeType;
32  typedef unsigned long long NVidiaSDITimeType;
33 
35  mitkNewMacro3Param(NVidiaSDIDataType, unsigned int, unsigned int, NVidiaSDITimeType)
36 
37  unsigned int GetSequenceNumber() const;
38  unsigned int GetCookie() const;
39 
40 protected:
41 
42  NVidiaSDIDataType(unsigned int, unsigned int, NVidiaSDITimeType); // Purposefully hidden.
43  virtual ~NVidiaSDIDataType(); // Purposefully hidden.
44 
45  NVidiaSDIDataType(const NVidiaSDIDataType&); // Purposefully not implemented.
46  NVidiaSDIDataType& operator=(const NVidiaSDIDataType&); // Purposefully not implemented.
47 
48 private:
49 
50  // Used internally to make sure this data item comes from a valid
51  // capture session. Otherwise what could happen is that when signal drops out (e.g. due to
52  // interference on the wire) the old capture context is destroyed and a new one is created
53  // (fairly quickly) but any in-flight NVidiaSDIDataType hanging around in the IGIDataSourceManager
54  // might still reference the previous one.
55  unsigned int m_MagicCookie;
56 
57  // SDI sequence number. Starts counting at 1 and increases for every set of captured images.
58  unsigned int m_SequenceNumber;
59 
60  // The SDI card keeps a time stamp for each frame coming out of the wire.
61  // This is in some arbitrary unit (nanoseconds?) in reference to some arbitrary clock.
62  NVidiaSDITimeType m_GpuArrivalTime;
63 };
64 
65 } // end namespace
66 
67 #endif
mitkClassMacro(NVidiaSDIDataType, IGIDataType) mitkNewMacro3Param(NVidiaSDIDataType
unsigned unsigned NVidiaSDITimeType unsigned int GetSequenceNumber() const
Definition: niftkNVidiaSDIDataType.cxx:36
Abstract base class for IGI Data, such as objects containing tracking data, video frames or ultrasoun...
Definition: niftkIGIDataType.h:35
Class to represent video frame data from NVidia SDI, to integrate within the niftkIGI framework...
Definition: niftkNVidiaSDIDataType.h:27
unsigned int GetCookie() const
Definition: niftkNVidiaSDIDataType.cxx:43
unsigned long long NVidiaSDITimeType
Definition: niftkNVidiaSDIDataType.h:32
Definition: niftkExceptionObject.h:21