HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 
18 SWIGOUT(%rename(CopNode) HOM_CopNode;)
19 
20 class HOM_API HOM_CopNode : virtual public HOM_Node
21 {
22 public:
24  : HOM_NetworkMovableItem(HOM_networkItemType::Node)
25  { HOM_CONSTRUCT_OBJECT(this) }
26  HOM_CopNode(const HOM_CopNode &cop_node)
27  : HOM_Node(cop_node),
28  HOM_NetworkMovableItem(cop_node)
29  { HOM_CONSTRUCT_OBJECT(this) }
30  ~HOM_CopNode() override
31  { HOM_DESTRUCT_OBJECT(this) }
32 
33  // Let swig know we're overriding __repr__ for this class so it doesn't
34  // provide its own __repr__.
35  SWIGOUT(virtual std::string __repr__() = 0;)
36 
37  virtual bool isBypassed() = 0;
38  virtual void bypass(bool on) = 0;
39  virtual bool isDisplayFlagSet() = 0;
40  virtual void setDisplayFlag(bool on) = 0;
41  virtual bool isRenderFlagSet() = 0;
42  virtual void setRenderFlag(bool on) = 0;
43  virtual bool isTemplateFlagSet() = 0;
44  virtual void setTemplateFlag(bool on) = 0;
45  virtual bool isCompressFlagSet() = 0;
46  virtual void setCompressFlag(bool on) = 0;
47 
48  virtual std::vector<std::string> planes() = 0;
49  virtual std::vector<std::string> components(const char *plane) = 0;
50  virtual HOM_EnumValue &depth(const char *plane) = 0;
51  virtual int maskInputIndex() = 0;
52 
53  SWIGOUT(%kwargs getPixelByUV);
54  virtual std::vector<float> getPixelByUV(const char *plane,
55  double u, double v, const char *component=NULL,
56  bool interpolate=true) = 0;
57 
58  SWIGOUT(%kwargs getPixelHSVByUV);
59  virtual std::vector<float> getPixelHSVByUV(
60  double u, double v, bool interpolate=true) = 0;
61 
62  SWIGOUT(%kwargs getPixelLuminanceByUV);
63  virtual float getPixelLuminanceByUV(
64  double u, double v, bool interpolate=true) = 0;
65 
66  SWIGOUT(%kwargs allPixels);
67  virtual std::vector<float> allPixels(
68  const char *plane="C", const char *component=NULL,
69  bool interleaved=true, double time=-1.0) = 0;
70  SWIGOUT(%kwargs allPixelsAsString);
71  virtual HOM_BinaryString allPixelsAsString(
72  const char *plane="C", const char *component=NULL,
73  bool interleaved=true, double time=-1.0, HOM_EnumValue *depth=NULL) = 0;
74 
75  SWIGOUT(%kwargs setPixelsOfCookingPlane);
76  virtual void setPixelsOfCookingPlane(
77  const std::vector<float> &values,
78  const char *component=NULL, bool interleaved=true,
79  bool flip_vertically=false) = 0;
80  SWIGOUT(%ignore opaqueSetPixelsOfCookingPlaneFromString);
81  virtual void opaqueSetPixelsOfCookingPlaneFromString(
82  const char *values, int64 length,
83  const char *component=NULL, bool interleaved=true,
84  HOM_EnumValue *depth=NULL, bool flip_vertically=false) = 0;
85 
86  SWIGOUT(%kwargs imageBounds);
87  virtual std::vector<int> imageBounds(const char *plane="C") = 0;
88  virtual int xRes() = 0;
89  virtual int yRes() = 0;
90 
91  virtual double sequenceStartFrame() = 0;
92  virtual double sequenceEndFrame() = 0;
93  virtual double sequenceFrameLength() = 0;
94 
95  virtual bool isSingleImage() = 0;
96 
97  virtual void saveImage(const char *file_name,
98  const std::vector<int> &frame_range = std::vector<int>()) = 0;
99 
100  virtual bool hasMetaData(const char *metadata_name) = 0;
101 
102  virtual int getMetaDataInt(const char *metadata_name, int index = 0) = 0;
103 
104  virtual double getMetaDataFloat(const char *metadata_name, int index = 0) = 0;
105 
106  virtual std::string getMetaDataString(const char *metadata_name) = 0;
107 
108  virtual std::vector<int> getMetaDataIntArray(const char *metadata_name) = 0;
109 
110  virtual std::vector<double> getMetaDataFloatArray(const char *metadata_name) = 0;
111 
112 #ifdef SWIG
113 %extend
114 {
115  %kwargs setPixelsOfCookingPlaneFromString;
116  void setPixelsOfCookingPlaneFromString(
117  InterpreterObject values, const char *component=NULL,
118  bool interleaved=true, HOM_EnumValue *depth=NULL,
119  bool flip_vertically=false) = 0
120  {
121  HOM_PyBuffer buffer(values);
122  self->opaqueSetPixelsOfCookingPlaneFromString(
123  (const char *)buffer.myData, buffer.myLength,
124  component, interleaved, depth, flip_vertically);
125  }
126 }
127 #endif
128 };
129 
130 #endif
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1211
GT_API const UT_StringHolder time
GLuint index
Definition: glew.h:1814
OIIO_API bool rename(string_view from, string_view to, std::string &err)
GLint GLsizei const GLuint64 * values
Definition: glew.h:3612
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:349
const GLdouble * v
Definition: glew.h:1391
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER IMFUTIL_EXPORT void saveImage(const std::string &fileName, const Header &hdr, const Image &img, DataWindowSource dws=USE_IMAGE_DATA_WINDOW)
~HOM_CopNode() override
Definition: HOM_CopNode.h:30
#define HOM_API
Definition: HOM_API.h:13
GLenum GLenum GLuint components
Definition: glew.h:11491
GLuint buffer
Definition: glew.h:1680
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1210
GLuint GLsizei GLsizei * length
Definition: glew.h:1825
long long int64
Definition: SYS_Types.h:116
HOM_CopNode(const HOM_CopNode &cop_node)
Definition: HOM_CopNode.h:26
GLsizei const GLchar *const * string
Definition: glew.h:1844
GLint GLint GLsizei GLsizei GLsizei depth
Definition: glew.h:1254