HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HOM_CopNode.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * COMMENTS:
7  */
8 
9 #ifndef __HOM_CopNode_h__
10 #define __HOM_CopNode_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_BinaryString.h"
14 #include "HOM_Defines.h"
15 #include "HOM_Errors.h"
16 #include "HOM_Node.h"
17 #include "HOM_Track.h"
18 
19 SWIGOUT(%rename(CopNode) HOM_CopNode;)
20 
21 class HOM_API HOM_CopNode : virtual public HOM_Node
22 {
23 public:
25  : HOM_NetworkMovableItem(HOM_networkItemType::Node)
26  { HOM_CONSTRUCT_OBJECT(this) }
27  HOM_CopNode(const HOM_CopNode &cop_node)
28  : HOM_Node(cop_node),
29  HOM_NetworkMovableItem(cop_node)
30  { HOM_CONSTRUCT_OBJECT(this) }
31  virtual ~HOM_CopNode()
32  { HOM_DESTRUCT_OBJECT(this) }
33 
34  // Let swig know we're overriding __repr__ for this class so it doesn't
35  // provide its own __repr__.
36  SWIGOUT(virtual std::string __repr__() = 0;)
37 
38  virtual bool isBypassed() = 0;
39  virtual void bypass(bool on) = 0;
40  virtual bool isDisplayFlagSet() = 0;
41  virtual void setDisplayFlag(bool on) = 0;
42  virtual bool isRenderFlagSet() = 0;
43  virtual void setRenderFlag(bool on) = 0;
44  virtual bool isTemplateFlagSet() = 0;
45  virtual void setTemplateFlag(bool on) = 0;
46  virtual bool isCompressFlagSet() = 0;
47  virtual void setCompressFlag(bool on) = 0;
48 
49  virtual std::vector<std::string> planes() = 0;
50  virtual std::vector<std::string> components(const char *plane) = 0;
51  virtual HOM_EnumValue &depth(const char *plane) = 0;
52  virtual int maskInputIndex() = 0;
53 
54  SWIGOUT(%kwargs getPixelByUV);
55  virtual std::vector<float> getPixelByUV(const char *plane,
56  double u, double v, const char *component=NULL,
57  bool interpolate=true) = 0;
58 
59  SWIGOUT(%kwargs getPixelHSVByUV);
60  virtual std::vector<float> getPixelHSVByUV(
61  double u, double v, bool interpolate=true) = 0;
62 
63  SWIGOUT(%kwargs getPixelLuminanceByUV);
64  virtual float getPixelLuminanceByUV(
65  double u, double v, bool interpolate=true) = 0;
66 
67  SWIGOUT(%kwargs allPixels);
68  virtual std::vector<float> allPixels(
69  const char *plane="C", const char *component=NULL,
70  bool interleaved=true, double time=-1.0) = 0;
71  SWIGOUT(%kwargs allPixelsAsString);
72  virtual HOM_BinaryString allPixelsAsString(
73  const char *plane="C", const char *component=NULL,
74  bool interleaved=true, double time=-1.0, HOM_EnumValue *depth=NULL) = 0;
75 
76  SWIGOUT(%kwargs setPixelsOfCookingPlane);
77  virtual void setPixelsOfCookingPlane(
78  const std::vector<float> &values,
79  const char *component=NULL, bool interleaved=true,
80  bool flip_vertically=false) = 0;
81  SWIGOUT(%ignore opaqueSetPixelsOfCookingPlaneFromString);
82  virtual void opaqueSetPixelsOfCookingPlaneFromString(
83  const char *values, int64 length,
84  const char *component=NULL, bool interleaved=true,
85  HOM_EnumValue *depth=NULL, bool flip_vertically=false) = 0;
86 
87  SWIGOUT(%kwargs imageBounds);
88  virtual std::vector<int> imageBounds(const char *plane="C") = 0;
89  virtual int xRes() = 0;
90  virtual int yRes() = 0;
91 
92  virtual double sequenceStartFrame() = 0;
93  virtual double sequenceEndFrame() = 0;
94  virtual double sequenceFrameLength() = 0;
95 
96  virtual bool isSingleImage() = 0;
97 
98  virtual void saveImage(const char *file_name,
99  const std::vector<int> &frame_range = std::vector<int>()) = 0;
100 
101  virtual bool hasMetaData(const char *metadata_name) = 0;
102 
103  virtual int getMetaDataInt(const char *metadata_name, int index = 0) = 0;
104 
105  virtual double getMetaDataFloat(const char *metadata_name, int index = 0) = 0;
106 
107  virtual std::string getMetaDataString(const char *metadata_name) = 0;
108 
109  virtual std::vector<int> getMetaDataIntArray(const char *metadata_name) = 0;
110 
111  virtual std::vector<double> getMetaDataFloatArray(const char *metadata_name) = 0;
112 
113 #ifdef SWIG
114 %extend
115 {
116  %kwargs setPixelsOfCookingPlaneFromString;
117  void setPixelsOfCookingPlaneFromString(
118  InterpreterObject values, const char *component=NULL,
119  bool interleaved=true, HOM_EnumValue *depth=NULL,
120  bool flip_vertically=false) = 0
121  {
122  HOM_PyBuffer buffer(values);
123  self->opaqueSetPixelsOfCookingPlaneFromString(
124  (const char *)buffer.myData, buffer.myLength,
125  component, interleaved, depth, flip_vertically);
126  }
127 }
128 #endif
129 };
130 
131 #endif
virtual std::string __repr__()=0
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:981
const GLdouble * v
Definition: glcorearb.h:836
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
GLuint buffer
Definition: glcorearb.h:659
virtual ~HOM_CopNode()
Definition: HOM_CopNode.h:31
long long int64
Definition: SYS_Types.h:106
GLint GLint GLsizei GLsizei GLsizei depth
Definition: glcorearb.h:475
#define HOM_API
Definition: HOM_API.h:13
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:980
GLenum GLsizei GLsizei GLint * values
Definition: glcorearb.h:1601
HOM_CopNode(const HOM_CopNode &cop_node)
Definition: HOM_CopNode.h:27
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER IMF_EXPORT void saveImage(const std::string &fileName, const Header &hdr, const Image &img, DataWindowSource dws=USE_IMAGE_DATA_WINDOW)
GLuint index
Definition: glcorearb.h:785
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:794