RenderManAPI  24.0
ndspy.h File Reference
#include <math.h>
#include "prmanapi.h"
#include "ri.h"

Go to the source code of this file.

Classes

struct  PtDspyDevFormat
 
struct  PtDspySizeInfo
 
struct  PtDspyOverwriteInfo
 
struct  PtDspyRedrawInfo
 
struct  PtDspyRewriteInfo
 
struct  PtDspyNextDataInfo
 
struct  PtDspyRenderingStartQuery
 
struct  PtDspySupportsCheckpointing
 
struct  PtDspyPointCloudQuery
 
struct  PtDspyGridQuery
 
struct  PtDspyMultiResolutionQuery
 
struct  PtDspyQuantizationQuery
 
struct  PtMemoryUsageQuery
 
struct  PtElapsedTimeQuery
 
struct  PtFlagStuff
 
struct  PtDspyMsgOpen
 
struct  PtDspyMsgAddOutput
 
struct  PtDspyMsgImage
 
struct  PtDspyMsgData
 
struct  PtDspyMsgActiveRegion
 
struct  PtDspyMsgDeepData
 
struct  PtDspyMsgQuery
 
struct  PtDspyMsgClose
 
struct  PtDspyMsgMetadata
 
struct  PtDspyMsgFormat
 
struct  uparam
 
struct  PtDspyDriverFunctionTable
 

Macros

#define PkDspyMaxMsgSize   131064
 
#define PkDspyServerMsgOpen   (65 + 1)
 
#define PkDspyServerMsgImage   (65 + 2)
 
#define PkDspyServerMsgData   (65 + 3)
 
#define PkDspyServerMsgQuery   (65 + 4)
 
#define PkDspyServerMsgClose   (65 + 5)
 
#define PkDspyServerMsgDeepData   (65 + 6)
 
#define PkDspyServerMsgActiveRegion   (65 + 7)
 
#define PkDspyServerMsgMetadata   (65 + 8)
 
#define PkDspyServerMsgMetadataPart   (65 + 9)
 
#define PkDspyByteOrderNative   PkDspyByteOrderLoHi
 
#define PkDspyClassFloat   1
 
#define PkDspyClassInt   2
 
#define PkDspyNone   0
 
#define PkDspyFloat32   1
 
#define PkDspyUnsigned32   2
 
#define PkDspySigned32   3
 
#define PkDspyUnsigned16   4
 
#define PkDspySigned16   5
 
#define PkDspyUnsigned8   6
 
#define PkDspySigned8   7
 
#define PkDspyArrayBegin   10
 
#define PkDspyArrayEnd   11
 
#define PkDspyMaskType   8191
 
#define PkDspyMaskOrder   (PkDspyByteOrderHiLo | PkDspyByteOrderLoHi)
 
#define PkDspyShiftOrder   13
 
#define PkDspyByteOrderHiLo   8192
 
#define PkDspyByteOrderLoHi   16384
 
#define PkDspyOpenPortCount   1024
 
#define PkDspyFlagsWantsScanLineOrder   1
 
#define PkDspyFlagsWantsEmptyBuckets   2
 
#define PkDspyFlagsWantsNullEmptyBuckets   4
 

Typedefs

typedef double PtDspyFloat64
 
typedef float PtDspyFloat32
 
typedef unsigned int PtDspyUnsigned32
 
typedef int PtDspySigned32
 
typedef unsigned short PtDspyUnsigned16
 
typedef short PtDspySigned16
 
typedef unsigned char PtDspyUnsigned8
 
typedef char PtDspySigned8
 
typedef PtDspyUnsigned32 PtDspyMsgLen
 
typedef PtDspyUnsigned32 PtDspyServerMessage
 
typedef void * PtDspyImageHandle
 
typedef void * PtDspyChannel
 
typedef void * PtDspyOutput
 
typedef struct uparam UserParameter
 
typedef PtDspyError(* PtDspyOpenFuncPtr) (PtDspyImageHandle *image, const char *drivername, const char *filename, int width, int height, int paramCount, const UserParameter *parameters, int iFormatCount, PtDspyDevFormat *format, PtFlagStuff *flagstuff)
 
typedef PtDspyError(* PtDspyWriteFuncPtr) (PtDspyImageHandle image, int xmin, int xmax_plus_one, int ymin, int ymax_plus_one, int entrysize, const unsigned char *data)
 
typedef PtDspyError(* PtDspyDeepWriteFuncPtr) (PtDspyImageHandle image, int xmin, int xmax_plus_one, int ymin, int ymax_plus_one, char *data, int datasize, PtDspyUnsigned32 *pixeloffsets, PtDspyUnsigned32 *pixelsizes)
 
typedef PtDspyError(* PtDspyActiveRegionFuncPtr) (PtDspyImageHandle image, int xmin, int xmax_plus_one, int ymin, int ymax_plus_one)
 
typedef PtDspyError(* PtDspyMetadataFuncPtr) (PtDspyImageHandle image, char *metadata)
 
typedef PtDspyError(* PtDspyCloseFuncPtr) (PtDspyImageHandle)
 
typedef PtDspyError(* PtDspyFlushFuncPtr) (PtDspyImageHandle)
 
typedef PtDspyError(* PtDspyReopenFuncPtr) (PtDspyImageHandle image, const char *drivername, const char *filename, int width, int height, int paramCount, const UserParameter *parameters, int iFormatCount, PtDspyDevFormat *format, PtFlagStuff *flagstuff)
 
typedef PtDspyError(* PtDspyDelayCloseFuncPtr) (PtDspyImageHandle)
 
typedef PtDspyError(* PtDspyQueryFuncPtr) (PtDspyImageHandle, PtDspyQueryType, int, void *)
 

Enumerations

enum  PtDspyQueryType {
  PkSizeQuery, PkOverwriteQuery, PkNextDataQuery, PkRedrawQuery,
  PkRenderingStartQuery, PkSupportsCheckpointing, PkPointCloudQuery, PkGridQuery,
  PkMultiResolutionQuery, PkQuantizationQuery, PkMemoryUsageQuery, PkElapsedTimeQuery
}
 
enum  PtDspyGridStyle { PkDspyGridConnected, PkDspyGridLines, PkDspyGridPoints }
 
enum  PtDspyBucketOrder {
  PkDspyBucketOrderHorizontal = 1, PkDspyBucketOrderVertical, PkDspyBucketOrderZigZagX, PkDspyBucketOrderZigZagY,
  PkDspyBucketOrderSpiral, PkDspyBucketOrderSpaceFill, PkDspyBucketOrderRandom
}
 
enum  PtDspyError {
  PkDspyErrorNone = 0, PkDspyErrorNoMemory, PkDspyErrorUnsupported, PkDspyErrorBadParams,
  PkDspyErrorNoResource, PkDspyErrorUndefined, PkDspyErrorCancel
}
 
enum  PtDriverVersion { k_PtDriverUnknownVersion = 0, k_PtDriverCurrentVersion = 1 }
 

Functions

PRMANAPI void DspyMemReverseCopy (unsigned char *t, const unsigned char *s, int len)
 
PRMANAPI void DspyMemReverse (unsigned char *t, int len)
 
PRMANAPI PtDspyError DspyFindStringInParamList (RtConstString const string, char **result, int paramCount, const UserParameter *parameters)
 
PRMANAPI PtDspyError DspyFindMatrixInParamList (RtConstString const string, float *result, int paramCount, const UserParameter *parameters)
 
PRMANAPI PtDspyError DspyFindFloatInParamList (RtConstString const string, float *result, int paramCount, const UserParameter *parameters)
 
PRMANAPI PtDspyError DspyFindFloatsInParamList (RtConstString const string, int *resultCount, float *result, int paramCount, const UserParameter *parameters)
 
PRMANAPI PtDspyError DspyFindIntInParamList (RtConstString const string, int *result, int paramCount, const UserParameter *parameters)
 
PRMANAPI PtDspyError DspyFindIntsInParamList (RtConstString const string, int *resultCount, int *result, int paramCount, const UserParameter *parameters)
 
PRMANAPI PtDspyError DspyReorderFormattingRE (int formatCount, PtDspyDevFormat *format, int outFormatCount, const PtDspyDevFormat *outFormat)
 reorder incoming channels to match outFormat's order match incoming channels to outFormat's regex channel names. More...
 
PRMANAPI PtDspyError DspyReorderFormatting (int formatCount, PtDspyDevFormat *format, int outFormatCount, const PtDspyDevFormat *outFormat)
 
PRMANAPI void DspyError (const char *module, const char *fmt,...)
 
PRMANAPI PtDspyError DspyRegisterDriver (const char *name, const PtDspyOpenFuncPtr pOpen, const PtDspyWriteFuncPtr pWrite, const PtDspyCloseFuncPtr pClose, const PtDspyQueryFuncPtr pQuery)
 
PRMANAPI PtDspyError DspyRegisterDriverTable (const char *name, const PtDspyDriverFunctionTable *pTable)
 
PRMANAPI int DspyGetNumberOfHosts ()
 
PRMANEXPORT PtDspyError DspyImageOpen (PtDspyImageHandle *image, const char *drivername, const char *filename, int width, int height, int paramCount, const UserParameter *parameters, int iFormatCount, PtDspyDevFormat *format, PtFlagStuff *flagstuff)
 
PRMANEXPORT PtDspyError DspyImageData (PtDspyImageHandle image, int xmin, int xmax, int ymin, int ymax, int entrysize, const unsigned char *data)
 
PRMANEXPORT PtDspyError DspyImageActiveRegion (PtDspyImageHandle image, int xmin, int xmax, int ymin, int ymax)
 
PRMANEXPORT PtDspyError DspyImageClose (PtDspyImageHandle)
 
PRMANEXPORT PtDspyError DspyImageReopen (PtDspyImageHandle image, const char *drivername, const char *filename, int width, int height, int paramCount, const UserParameter *parameters, int iFormatCount, PtDspyDevFormat *format, PtFlagStuff *flagstuff)
 
PRMANEXPORT PtDspyError DspyImageDelayClose (PtDspyImageHandle)
 
PRMANEXPORT PtDspyError DspyImageQuery (PtDspyImageHandle, PtDspyQueryType, int, void *)
 
PRMANEXPORT PtDspyError DspyMetadata (PtDspyImageHandle, char *metadata)
 
PRMANEXPORT PtDspyError DspyImageDeepData (PtDspyImageHandle pvImage, int xmin, int xmax, int ymin, int ymax, char *data, int datasize, int *pixeloffsets, int *pixelsizes)
 
PRMAN_INLINE int DspyClamp (float value, int min, int max)
 
PRMAN_INLINE float DspyLinearTosRGB (float u)
 
PRMAN_INLINE int DspyQuantize (float value, int x, int y, int k, int min, int max, int dither)
 

Macro Definition Documentation

◆ PkDspyArrayBegin

#define PkDspyArrayBegin   10

◆ PkDspyArrayEnd

#define PkDspyArrayEnd   11

◆ PkDspyByteOrderHiLo

#define PkDspyByteOrderHiLo   8192

◆ PkDspyByteOrderLoHi

#define PkDspyByteOrderLoHi   16384

◆ PkDspyByteOrderNative

#define PkDspyByteOrderNative   PkDspyByteOrderLoHi

◆ PkDspyClassFloat

#define PkDspyClassFloat   1

◆ PkDspyClassInt

#define PkDspyClassInt   2

◆ PkDspyFlagsWantsEmptyBuckets

#define PkDspyFlagsWantsEmptyBuckets   2

◆ PkDspyFlagsWantsNullEmptyBuckets

#define PkDspyFlagsWantsNullEmptyBuckets   4

◆ PkDspyFlagsWantsScanLineOrder

#define PkDspyFlagsWantsScanLineOrder   1

◆ PkDspyFloat32

#define PkDspyFloat32   1

◆ PkDspyMaskOrder

#define PkDspyMaskOrder   (PkDspyByteOrderHiLo | PkDspyByteOrderLoHi)

◆ PkDspyMaskType

#define PkDspyMaskType   8191

◆ PkDspyMaxMsgSize

#define PkDspyMaxMsgSize   131064

◆ PkDspyNone

#define PkDspyNone   0

◆ PkDspyOpenPortCount

#define PkDspyOpenPortCount   1024

◆ PkDspyServerMsgActiveRegion

#define PkDspyServerMsgActiveRegion   (65 + 7)

◆ PkDspyServerMsgClose

#define PkDspyServerMsgClose   (65 + 5)

◆ PkDspyServerMsgData

#define PkDspyServerMsgData   (65 + 3)

◆ PkDspyServerMsgDeepData

#define PkDspyServerMsgDeepData   (65 + 6)

◆ PkDspyServerMsgImage

#define PkDspyServerMsgImage   (65 + 2)

◆ PkDspyServerMsgMetadata

#define PkDspyServerMsgMetadata   (65 + 8)

◆ PkDspyServerMsgMetadataPart

#define PkDspyServerMsgMetadataPart   (65 + 9)

◆ PkDspyServerMsgOpen

#define PkDspyServerMsgOpen   (65 + 1)

◆ PkDspyServerMsgQuery

#define PkDspyServerMsgQuery   (65 + 4)

◆ PkDspyShiftOrder

#define PkDspyShiftOrder   13

◆ PkDspySigned16

#define PkDspySigned16   5

◆ PkDspySigned32

#define PkDspySigned32   3

◆ PkDspySigned8

#define PkDspySigned8   7

◆ PkDspyUnsigned16

#define PkDspyUnsigned16   4

◆ PkDspyUnsigned32

#define PkDspyUnsigned32   2

◆ PkDspyUnsigned8

#define PkDspyUnsigned8   6

Typedef Documentation

◆ PtDspyActiveRegionFuncPtr

typedef PtDspyError(* PtDspyActiveRegionFuncPtr) (PtDspyImageHandle image, int xmin, int xmax_plus_one, int ymin, int ymax_plus_one)

◆ PtDspyChannel

typedef void* PtDspyChannel

◆ PtDspyCloseFuncPtr

typedef PtDspyError(* PtDspyCloseFuncPtr) (PtDspyImageHandle)

◆ PtDspyDeepWriteFuncPtr

typedef PtDspyError(* PtDspyDeepWriteFuncPtr) (PtDspyImageHandle image, int xmin, int xmax_plus_one, int ymin, int ymax_plus_one, char *data, int datasize, PtDspyUnsigned32 *pixeloffsets, PtDspyUnsigned32 *pixelsizes)

◆ PtDspyDelayCloseFuncPtr

typedef PtDspyError(* PtDspyDelayCloseFuncPtr) (PtDspyImageHandle)

◆ PtDspyFloat32

typedef float PtDspyFloat32

◆ PtDspyFloat64

typedef double PtDspyFloat64

◆ PtDspyFlushFuncPtr

typedef PtDspyError(* PtDspyFlushFuncPtr) (PtDspyImageHandle)

◆ PtDspyImageHandle

typedef void* PtDspyImageHandle

◆ PtDspyMetadataFuncPtr

typedef PtDspyError(* PtDspyMetadataFuncPtr) (PtDspyImageHandle image, char *metadata)

◆ PtDspyMsgLen

◆ PtDspyOpenFuncPtr

typedef PtDspyError(* PtDspyOpenFuncPtr) (PtDspyImageHandle *image, const char *drivername, const char *filename, int width, int height, int paramCount, const UserParameter *parameters, int iFormatCount, PtDspyDevFormat *format, PtFlagStuff *flagstuff)

◆ PtDspyOutput

typedef void* PtDspyOutput

◆ PtDspyQueryFuncPtr

typedef PtDspyError(* PtDspyQueryFuncPtr) (PtDspyImageHandle, PtDspyQueryType, int, void *)

◆ PtDspyReopenFuncPtr

typedef PtDspyError(* PtDspyReopenFuncPtr) (PtDspyImageHandle image, const char *drivername, const char *filename, int width, int height, int paramCount, const UserParameter *parameters, int iFormatCount, PtDspyDevFormat *format, PtFlagStuff *flagstuff)

◆ PtDspyServerMessage

◆ PtDspySigned16

typedef short PtDspySigned16

◆ PtDspySigned32

typedef int PtDspySigned32

◆ PtDspySigned8

typedef char PtDspySigned8

◆ PtDspyUnsigned16

typedef unsigned short PtDspyUnsigned16

◆ PtDspyUnsigned32

typedef unsigned int PtDspyUnsigned32

◆ PtDspyUnsigned8

typedef unsigned char PtDspyUnsigned8

◆ PtDspyWriteFuncPtr

typedef PtDspyError(* PtDspyWriteFuncPtr) (PtDspyImageHandle image, int xmin, int xmax_plus_one, int ymin, int ymax_plus_one, int entrysize, const unsigned char *data)

◆ UserParameter

typedef struct uparam UserParameter

Enumeration Type Documentation

◆ PtDriverVersion

Enumerator
k_PtDriverUnknownVersion 
k_PtDriverCurrentVersion 

◆ PtDspyBucketOrder

Enumerator
PkDspyBucketOrderHorizontal 
PkDspyBucketOrderVertical 
PkDspyBucketOrderZigZagX 
PkDspyBucketOrderZigZagY 
PkDspyBucketOrderSpiral 
PkDspyBucketOrderSpaceFill 
PkDspyBucketOrderRandom 

◆ PtDspyError

Enumerator
PkDspyErrorNone 
PkDspyErrorNoMemory 
PkDspyErrorUnsupported 
PkDspyErrorBadParams 
PkDspyErrorNoResource 
PkDspyErrorUndefined 
PkDspyErrorCancel 

◆ PtDspyGridStyle

Enumerator
PkDspyGridConnected 
PkDspyGridLines 
PkDspyGridPoints 

◆ PtDspyQueryType

Enumerator
PkSizeQuery 
PkOverwriteQuery 
PkNextDataQuery 
PkRedrawQuery 
PkRenderingStartQuery 
PkSupportsCheckpointing 
PkPointCloudQuery 
PkGridQuery 
PkMultiResolutionQuery 
PkQuantizationQuery 
PkMemoryUsageQuery 
PkElapsedTimeQuery 

Function Documentation

◆ DspyClamp()

PRMAN_INLINE int DspyClamp ( float  value,
int  min,
int  max 
)

◆ DspyError()

PRMANAPI void DspyError ( const char *  module,
const char *  fmt,
  ... 
)

◆ DspyFindFloatInParamList()

PRMANAPI PtDspyError DspyFindFloatInParamList ( RtConstString const  string,
float *  result,
int  paramCount,
const UserParameter parameters 
)

◆ DspyFindFloatsInParamList()

PRMANAPI PtDspyError DspyFindFloatsInParamList ( RtConstString const  string,
int *  resultCount,
float *  result,
int  paramCount,
const UserParameter parameters 
)

◆ DspyFindIntInParamList()

PRMANAPI PtDspyError DspyFindIntInParamList ( RtConstString const  string,
int *  result,
int  paramCount,
const UserParameter parameters 
)

◆ DspyFindIntsInParamList()

PRMANAPI PtDspyError DspyFindIntsInParamList ( RtConstString const  string,
int *  resultCount,
int *  result,
int  paramCount,
const UserParameter parameters 
)

◆ DspyFindMatrixInParamList()

PRMANAPI PtDspyError DspyFindMatrixInParamList ( RtConstString const  string,
float *  result,
int  paramCount,
const UserParameter parameters 
)

◆ DspyFindStringInParamList()

PRMANAPI PtDspyError DspyFindStringInParamList ( RtConstString const  string,
char **  result,
int  paramCount,
const UserParameter parameters 
)

◆ DspyGetNumberOfHosts()

PRMANAPI int DspyGetNumberOfHosts ( )

◆ DspyImageActiveRegion()

PRMANEXPORT PtDspyError DspyImageActiveRegion ( PtDspyImageHandle  image,
int  xmin,
int  xmax,
int  ymin,
int  ymax 
)

◆ DspyImageClose()

◆ DspyImageData()

PRMANEXPORT PtDspyError DspyImageData ( PtDspyImageHandle  image,
int  xmin,
int  xmax,
int  ymin,
int  ymax,
int  entrysize,
const unsigned char *  data 
)

◆ DspyImageDeepData()

PRMANEXPORT PtDspyError DspyImageDeepData ( PtDspyImageHandle  pvImage,
int  xmin,
int  xmax,
int  ymin,
int  ymax,
char *  data,
int  datasize,
int *  pixeloffsets,
int *  pixelsizes 
)

◆ DspyImageDelayClose()

PRMANEXPORT PtDspyError DspyImageDelayClose ( PtDspyImageHandle  )

◆ DspyImageOpen()

PRMANEXPORT PtDspyError DspyImageOpen ( PtDspyImageHandle image,
const char *  drivername,
const char *  filename,
int  width,
int  height,
int  paramCount,
const UserParameter parameters,
int  iFormatCount,
PtDspyDevFormat format,
PtFlagStuff flagstuff 
)

◆ DspyImageQuery()

PRMANEXPORT PtDspyError DspyImageQuery ( PtDspyImageHandle  ,
PtDspyQueryType  ,
int  ,
void *   
)

◆ DspyImageReopen()

PRMANEXPORT PtDspyError DspyImageReopen ( PtDspyImageHandle  image,
const char *  drivername,
const char *  filename,
int  width,
int  height,
int  paramCount,
const UserParameter parameters,
int  iFormatCount,
PtDspyDevFormat format,
PtFlagStuff flagstuff 
)

◆ DspyLinearTosRGB()

PRMAN_INLINE float DspyLinearTosRGB ( float  u)

◆ DspyMemReverse()

PRMANAPI void DspyMemReverse ( unsigned char *  t,
int  len 
)

◆ DspyMemReverseCopy()

PRMANAPI void DspyMemReverseCopy ( unsigned char *  t,
const unsigned char *  s,
int  len 
)

◆ DspyMetadata()

PRMANEXPORT PtDspyError DspyMetadata ( PtDspyImageHandle  ,
char *  metadata 
)

◆ DspyQuantize()

PRMAN_INLINE int DspyQuantize ( float  value,
int  x,
int  y,
int  k,
int  min,
int  max,
int  dither 
)

◆ DspyRegisterDriver()

PRMANAPI PtDspyError DspyRegisterDriver ( const char *  name,
const PtDspyOpenFuncPtr  pOpen,
const PtDspyWriteFuncPtr  pWrite,
const PtDspyCloseFuncPtr  pClose,
const PtDspyQueryFuncPtr  pQuery 
)

◆ DspyRegisterDriverTable()

PRMANAPI PtDspyError DspyRegisterDriverTable ( const char *  name,
const PtDspyDriverFunctionTable pTable 
)

◆ DspyReorderFormatting()

PRMANAPI PtDspyError DspyReorderFormatting ( int  formatCount,
PtDspyDevFormat format,
int  outFormatCount,
const PtDspyDevFormat outFormat 
)

◆ DspyReorderFormattingRE()

PRMANAPI PtDspyError DspyReorderFormattingRE ( int  formatCount,
PtDspyDevFormat format,
int  outFormatCount,
const PtDspyDevFormat outFormat 
)

reorder incoming channels to match outFormat's order match incoming channels to outFormat's regex channel names.

Parameters
formatCount,numberof channels in format
format,incomingchannels to be reordered
outFormatCount,numberof channels in outFormat
outFormat,desiredchannel order