HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_Cop2Node.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_Cop2Node_h__
10 #define __HOM_Cop2Node_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_OpNode.h"
17 
18 SWIGOUT(%rename(Cop2Node) HOM_Cop2Node;)
19 
20 class HOM_API HOM_Cop2Node : virtual public HOM_OpNode
21 {
22 public:
24  : HOM_NetworkMovableItem(HOM_networkItemType::Node)
25  { HOM_CONSTRUCT_OBJECT(this) }
26  HOM_Cop2Node(const HOM_Cop2Node &cop_node)
27  : HOM_OpNode(cop_node),
28  HOM_NetworkMovableItem(cop_node)
29  { HOM_CONSTRUCT_OBJECT(this) }
30  ~HOM_Cop2Node() 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:1303
HOM_Cop2Node(const HOM_Cop2Node &cop_node)
Definition: HOM_Cop2Node.h:26
Definition: Node.h:52
GT_API const UT_StringHolder time
const GLdouble * v
Definition: glcorearb.h:837
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:349
GLuint buffer
Definition: glcorearb.h:660
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)
Definition: core.h:760
#define HOM_API
Definition: HOM_API.h:13
void ignore(T const &) VULKAN_HPP_NOEXCEPT
Definition: vulkan.hpp:6508
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1302
long long int64
Definition: SYS_Types.h:116
GLint GLint GLsizei GLsizei GLsizei depth
Definition: glcorearb.h:476
GLenum GLsizei GLsizei GLint * values
Definition: glcorearb.h:1602
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
GLuint index
Definition: glcorearb.h:786
~HOM_Cop2Node() override
Definition: HOM_Cop2Node.h:30