-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathitkVideoViewerBase.h
More file actions
101 lines (79 loc) · 3.16 KB
/
itkVideoViewerBase.h
File metadata and controls
101 lines (79 loc) · 3.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: itkVideoViewerBase.h
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Insight Software Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "itkLightProcessObject.h"
#include "itkExceptionObject.h"
#include "itkImage.h"
#ifndef __itkVideoViewerBase_h
#define __itkVideoViewerBase_h
namespace itk
{
/** \class VideoViewerBase
* \brief Create a pop up window that display your video
*
* Abstract base class for the viewer class. All viewer should
* inherits from this class and reimplement its method.
*
* The main goal of this class is to propose create an interface
* between the iktVideoViewer which takes care of the pipeline
* implementation of itk and the Viewer like itkOpenCVViewer or
* itkVXLViewer that are doing the actual displaying.
* This way the itkVideoViewer can operate regardless the library
* you want to use (as long as you use a least one...) and you can implement
* your own Viewer that uses your own library.
*
* \sa VideoViewer
* \sa OpenCVViewer
* \sa VXLViewer
*/
template <class TImage>
class ITK_EXPORT VideoViewerBase : public LightProcessObject
{
public:
/** Standard class typedefs. **/
typedef VideoViewerBase Self;
typedef LightProcessObject Superclass;
typedef SmartPointer< Self > Pointer;
/** Convinient typedef **/
typedef TImage ImageType;
typedef typename ImageType::PixelType PixelType;
/** Run-time type information (and related methods). **/
itkTypeMacro(VideoViewerBase, Superclass);
/** Try to open a windows **/
/** Return true if in case of a success, false for a faillure **/
/** Intended to be overloaded by subclasses **/
virtual bool Open (const char* WindowName) = 0;
/** Try to close a viewer **/
/** Return true if in case of a success, false for a faillure **/
virtual bool Close (const char* WindowName) = 0;
/** Display the input image **/
virtual bool Play(typename itk::Image<PixelType,2>::Pointer ITKImage) = 0;
/** Wait the time specified by the SetWaitTime() **/
virtual void Wait() = 0;
/** Wait the time specified **/
virtual void Wait (int MSec) = 0;
/** Accessors **/
virtual int GetWaitTime () = 0;
virtual void SetWaitTime(int MSec) = 0;
protected:
VideoViewerBase();
~VideoViewerBase(){};
void PrintSelf(std::ostream & os, Indent indent) const;
private:
VideoViewerBase(const Self &); //purposely not implemented
void operator=(const Self &); //purposely not implemented
};
} // end namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
#include "itkVideoViewerBase.txx"
#endif
#endif // __itkVideoViewerBase_h