VTK
9.5.20250708
|
This header file provides the C API for working with standalone/remote visualization applications. More...
#include <stddef.h>
#include <stdint.h>
#include "vtkABINamespace.h"
#include "vtkSerializationManagerModule.h"
Go to the source code of this file.
Classes | |
struct | vtkSessionDescriptor |
Macros | |
#define | vtkSessionResultSuccess 1 |
#define | vtkSessionResultFailure 0 |
#define | vtkCreateSession VTK_ABI_NAMESPACE_MANGLE(vtkCreateSession) |
#define | vtkFreeSession VTK_ABI_NAMESPACE_MANGLE(vtkFreeSession) |
#define | vtkSessionInitializeObjectManager VTK_ABI_NAMESPACE_MANGLE(vtkSessionInitializeObjectManager) |
#define | vtkSessionInitializeObjectManagerExtensionHandlers VTK_ABI_NAMESPACE_MANGLE(vtkSessionInitializeObjectManagerExtensionHandlers) |
#define | vtkSessionGetManager VTK_ABI_NAMESPACE_MANGLE(vtkSessionGetManager) |
#define | vtkSessionCreateObject VTK_ABI_NAMESPACE_MANGLE(vtkSessionCreateObject) |
#define | vtkSessionDestroyObject VTK_ABI_NAMESPACE_MANGLE(vtkSessionDestroyObject) |
#define | vtkSessionRegisterState VTK_ABI_NAMESPACE_MANGLE(vtkSessionRegisterState) |
#define | vtkSessionUnRegisterState VTK_ABI_NAMESPACE_MANGLE(vtkSessionUnRegisterState) |
#define | vtkSessionGetState VTK_ABI_NAMESPACE_MANGLE(vtkSessionGetState) |
#define | vtkSessionSkipProperty VTK_ABI_NAMESPACE_MANGLE(vtkSessionSkipProperty) |
#define | vtkSessionUnSkipProperty VTK_ABI_NAMESPACE_MANGLE(vtkSessionUnSkipProperty) |
#define | vtkSessionRegisterBlob VTK_ABI_NAMESPACE_MANGLE(vtkSessionRegisterBlob) |
#define | vtkSessionUnRegisterBlob VTK_ABI_NAMESPACE_MANGLE(vtkSessionUnRegisterBlob) |
#define | vtkSessionGetBlob VTK_ABI_NAMESPACE_MANGLE(vtkSessionGetBlob) |
#define | vtkSessionPruneUnusedBlobs VTK_ABI_NAMESPACE_MANGLE(vtkSessionPruneUnusedBlobs) |
#define | vtkSessionPruneUnusedObjects VTK_ABI_NAMESPACE_MANGLE(vtkSessionPruneUnusedObjects) |
#define | vtkSessionPruneUnusedStates VTK_ABI_NAMESPACE_MANGLE(vtkSessionPruneUnusedStates) |
#define | vtkSessionClear VTK_ABI_NAMESPACE_MANGLE(vtkSessionClear) |
#define | vtkSessionInvoke VTK_ABI_NAMESPACE_MANGLE(vtkSessionInvoke) |
#define | vtkSessionGetAllDependencies VTK_ABI_NAMESPACE_MANGLE(vtkSessionGetAllDependencies) |
#define | vtkSessionFreeGetAllDependenciesResult VTK_ABI_NAMESPACE_MANGLE(vtkSessionFreeGetAllDependenciesResult) |
#define | vtkSessionGetTotalBlobMemoryUsage VTK_ABI_NAMESPACE_MANGLE(vtkSessionGetTotalBlobMemoryUsage) |
#define | vtkSessionGetTotalVTKDataObjectMemoryUsage VTK_ABI_NAMESPACE_MANGLE(vtkSessionGetTotalVTKDataObjectMemoryUsage) |
#define | vtkSessionUpdateObjectsFromStates VTK_ABI_NAMESPACE_MANGLE(vtkSessionUpdateObjectsFromStates) |
#define | vtkSessionUpdateStatesFromObjects VTK_ABI_NAMESPACE_MANGLE(vtkSessionUpdateStatesFromObjects) |
#define | vtkSessionUpdateObjectFromState VTK_ABI_NAMESPACE_MANGLE(vtkSessionUpdateObjectFromState) |
#define | vtkSessionUpdateStateFromObject VTK_ABI_NAMESPACE_MANGLE(vtkSessionUpdateStateFromObject) |
#define | vtkSessionSetSize VTK_ABI_NAMESPACE_MANGLE(vtkSessionSetSize) |
#define | vtkSessionRender VTK_ABI_NAMESPACE_MANGLE(vtkSessionRender) |
#define | vtkSessionResetCamera VTK_ABI_NAMESPACE_MANGLE(vtkSessionResetCamera) |
#define | vtkSessionStartEventLoop VTK_ABI_NAMESPACE_MANGLE(vtkSessionStartEventLoop) |
#define | vtkSessionStopEventLoop VTK_ABI_NAMESPACE_MANGLE(vtkSessionStopEventLoop) |
#define | vtkSessionAddObserver VTK_ABI_NAMESPACE_MANGLE(vtkSessionAddObserver) |
#define | vtkSessionRemoveObserver VTK_ABI_NAMESPACE_MANGLE(vtkSessionRemoveObserver) |
#define | vtkSessionImport VTK_ABI_NAMESPACE_MANGLE(vtkSessionImport) |
#define | vtkSessionExport VTK_ABI_NAMESPACE_MANGLE(vtkSessionExport) |
#define | vtkSessionPrintSceneManagerInformation VTK_ABI_NAMESPACE_MANGLE(vtkSessionPrintSceneManagerInformation) |
#define | vtkSessionSetDeserializerLogVerbosity VTK_ABI_NAMESPACE_MANGLE(vtkSessionSetDeserializerLogVerbosity) |
#define | vtkSessionSetInvokerLogVerbosity VTK_ABI_NAMESPACE_MANGLE(vtkSessionSetInvokerLogVerbosity) |
#define | vtkSessionSetObjectManagerLogVerbosity VTK_ABI_NAMESPACE_MANGLE(vtkSessionSetObjectManagerLogVerbosity) |
#define | vtkSessionSetSerializerLogVerbosity VTK_ABI_NAMESPACE_MANGLE(vtkSessionSetSerializerLogVerbosity) |
Typedefs | |
typedef uint32_t | vtkObjectHandle |
typedef int | vtkSessionResult |
typedef struct vtkSessionImpl * | vtkSession |
typedef struct vtkSessionJsonImpl * | vtkSessionJson |
typedef int(* | vtkSessionObjectManagerRegistrarFunc) (void *ser, void *deser, void *invoker, const char **error) |
typedef vtkSessionJson(* | vtkSessionJsonParseFunc) (const char *) |
typedef char *(* | vtkSessionJsonStringifyFunc) (vtkSessionJson) |
typedef void(* | vtkSessionObserverCallbackFunc) (vtkObjectHandle, const char *) |
typedef struct vtkSessionDescriptor | vtkSessionDescriptor |
Functions | |
VTKSERIALIZATIONMANAGER_EXPORT void | vtkFreeSession (vtkSession session) |
Free a session. | |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult | vtkSessionInitializeObjectManager (vtkSession session) |
Loads the default (de)serialization handlers and constructors for VTK classes. | |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult | vtkSessionInitializeObjectManagerExtensionHandlers (vtkSession session, const vtkSessionObjectManagerRegistrarFunc *registrars, size_t count) |
Loads user provided handlers. | |
VTKSERIALIZATIONMANAGER_EXPORT void * | vtkSessionGetManager (vtkSession session) |
Get underlying object manager of a vtkSession. | |
VTKSERIALIZATIONMANAGER_EXPORT vtkObjectHandle | vtkSessionCreateObject (vtkSession session, const char *className) |
Create an object of type className . | |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult | vtkSessionDestroyObject (vtkSession session, vtkObjectHandle object) |
Destroy a VTKObject. | |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult | vtkSessionRegisterState (vtkSession session, vtkSessionJson state) |
Adds state into an internal container and returns a unique identifier. | |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult | vtkSessionUnRegisterState (vtkSession session, vtkObjectHandle object) |
Removes a state at id . | |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionJson | vtkSessionGetState (vtkSession session, vtkObjectHandle object) |
Get the state of the object at id . | |
VTKSERIALIZATIONMANAGER_EXPORT void | vtkSessionSkipProperty (vtkSession session, const char *className, const char *propertyName) |
Skip a property of a class. | |
VTKSERIALIZATIONMANAGER_EXPORT void | vtkSessionUnSkipProperty (vtkSession session, const char *className, const char *propertyName) |
Remove a property of a class from the skip list. | |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult | vtkSessionRegisterBlob (vtkSession session, const char *hash, uint8_t *blob, size_t length) |
Register a blob with the session. | |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult | vtkSessionUnRegisterBlob (vtkSession session, const char *hash) |
Unregister a blob with the session. | |
VTKSERIALIZATIONMANAGER_EXPORT uint8_t * | vtkSessionGetBlob (vtkSession session, const char *hash, size_t *length) |
Get a blob from the session. | |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionJson | vtkSessionInvoke (vtkSession session, vtkObjectHandle object, const char *methodName, vtkSessionJson args) |
Invokes a method on the object at id with the given arguments. | |
VTKSERIALIZATIONMANAGER_EXPORT vtkObjectHandle * | vtkSessionGetAllDependencies (vtkSession session, vtkObjectHandle object, size_t *count) |
Get all dependencies of an object. | |
VTKSERIALIZATIONMANAGER_EXPORT void | vtkSessionFreeGetAllDependenciesResult (vtkSession session, vtkObjectHandle *ptr) |
Free the result of vtkSessionGetAllDependencies. | |
VTKSERIALIZATIONMANAGER_EXPORT void | vtkSessionUpdateObjectFromState (vtkSession session, vtkSessionJson state) |
Update the object from the state. | |
VTKSERIALIZATIONMANAGER_EXPORT void | vtkSessionUpdateStateFromObject (vtkSession session, vtkObjectHandle object) |
Update the state from the object. | |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult | vtkSessionSetSize (vtkSession session, vtkObjectHandle object, int width, int height) |
Set the size of the render window. | |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult | vtkSessionRender (vtkSession session, vtkObjectHandle object) |
Render the window. | |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult | vtkSessionResetCamera (vtkSession session, vtkObjectHandle object) |
Reset the camera of the renderer to fit the bounds of the scene. | |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult | vtkSessionStartEventLoop (vtkSession session, vtkObjectHandle object) |
Start the event loop for the render window interactor. | |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult | vtkSessionStopEventLoop (vtkSession session, vtkObjectHandle object) |
Stop the event loop for the render window interactor. | |
VTKSERIALIZATIONMANAGER_EXPORT unsigned long | vtkSessionAddObserver (vtkSession session, vtkObjectHandle object, const char *eventName, vtkSessionObserverCallbackFunc callback) |
Add an observer to the object for the given event. | |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult | vtkSessionRemoveObserver (vtkSession session, vtkObjectHandle object, unsigned long tag) |
Remove an observer from the object for the given event. | |
VTKSERIALIZATIONMANAGER_EXPORT void | vtkSessionExport (vtkSession session, const char *fileName) |
Writes state of all registered objects to fileName.states.json The blobs are written into fileName.blobs.json . | |
VTKSERIALIZATIONMANAGER_EXPORT void | vtkSessionImport (vtkSession session, const char *stateFileName, const char *blobFileName) |
Import a session from a state file and a blob file. | |
VTKSERIALIZATIONMANAGER_EXPORT void | vtkSessionUpdateObjectsFromStates (vtkSession session) |
Deserialize registered states from objects. | |
VTKSERIALIZATIONMANAGER_EXPORT void | vtkSessionUpdateStatesFromObjects (vtkSession session) |
Serialize registered objects into states. | |
VTKSERIALIZATIONMANAGER_EXPORT void | vtkSessionPruneUnusedBlobs (vtkSession session) |
Prune unused blobs from the session. | |
VTKSERIALIZATIONMANAGER_EXPORT void | vtkSessionPruneUnusedObjects (vtkSession session) |
Prune unused objects from the session. | |
VTKSERIALIZATIONMANAGER_EXPORT void | vtkSessionPruneUnusedStates (vtkSession session) |
Prune unused states from the session. | |
VTKSERIALIZATIONMANAGER_EXPORT void | vtkSessionClear (vtkSession session) |
Clear the session. | |
VTKSERIALIZATIONMANAGER_EXPORT size_t | vtkSessionGetTotalBlobMemoryUsage (vtkSession session) |
Get the total memory usage of the blobs in the session. | |
VTKSERIALIZATIONMANAGER_EXPORT size_t | vtkSessionGetTotalVTKDataObjectMemoryUsage (vtkSession session) |
Get the total memory usage of the VTK data objects in the session. | |
VTKSERIALIZATIONMANAGER_EXPORT void | vtkSessionPrintSceneManagerInformation (vtkSession session) |
Print the scene manager information to the console. | |
VTKSERIALIZATIONMANAGER_EXPORT void | vtkSessionSetDeserializerLogVerbosity (vtkSession session, const char *verbosityStr) |
Set the log verbosity for the session deserializer. | |
VTKSERIALIZATIONMANAGER_EXPORT void | vtkSessionSetInvokerLogVerbosity (vtkSession session, const char *verbosityStr) |
Set the log verbosity for the session invoker. | |
VTKSERIALIZATIONMANAGER_EXPORT void | vtkSessionSetObjectManagerLogVerbosity (vtkSession session, const char *verbosityStr) |
Set the log verbosity for the session object manager. | |
VTKSERIALIZATIONMANAGER_EXPORT void | vtkSessionSetSerializerLogVerbosity (vtkSession session, const char *verbosityStr) |
Set the log verbosity for the session serializer. | |
This header file provides the C API for working with standalone/remote visualization applications.
It includes functions for creating and freeing sessions, managing serialization handlers, registering and unregistering objects and states, handling blobs, invoking methods, and managing dependencies. Additionally, it provides utilities for rendering, event handling, pruning unused resources, and logging verbosity control.
The API is designed to facilitate serialization and deserialization of VTK objects and states in a session-based environment. It supports JSON-based state management and provides mechanisms for interacting with VTK objects, including rendering and event loop management.
Parts of this API are designed to be used in a standalone visualization application, while other parts are intended for use in a remote visualization context. The API is designed to be flexible.
vtkSessionCreateObject
, users can instantiate VTK objects directly within the session, allowing for the creation of visualization pipelines in a standalone or local context. This enables users to build and manage pipelines entirely within the session without relying on external states.vtkSessionRegisterState
, users can synchronize and manage the state of objects on a remote machine, enabling remote visualization workflows. This allows users to replicate and interact with a visualization pipeline that exists on a remote system.vtkCreateSession
and freed using vtkFreeSession
. Objects, states, and blobs must be registered with the session before use.vtkCreateSession
.vtkSessionInitializeObjectManager
or vtkSessionInitializeObjectManagerExtensionHandlers
.vtkSessionJsonImpl
is only implemented for javascript JSON objects in the VTK::WebAssembly module.vtkRenderWindow
, vtkRenderer
, and vtkRenderWindowInteractor
.Definition in file vtkSession.h.
#define vtkSessionResultSuccess 1 |
Definition at line 119 of file vtkSession.h.
#define vtkSessionResultFailure 0 |
Definition at line 120 of file vtkSession.h.
#define vtkCreateSession VTK_ABI_NAMESPACE_MANGLE(vtkCreateSession) |
Definition at line 123 of file vtkSession.h.
#define vtkFreeSession VTK_ABI_NAMESPACE_MANGLE(vtkFreeSession) |
Definition at line 124 of file vtkSession.h.
#define vtkSessionInitializeObjectManager VTK_ABI_NAMESPACE_MANGLE(vtkSessionInitializeObjectManager) |
Definition at line 125 of file vtkSession.h.
#define vtkSessionInitializeObjectManagerExtensionHandlers VTK_ABI_NAMESPACE_MANGLE(vtkSessionInitializeObjectManagerExtensionHandlers) |
Definition at line 126 of file vtkSession.h.
#define vtkSessionGetManager VTK_ABI_NAMESPACE_MANGLE(vtkSessionGetManager) |
Definition at line 127 of file vtkSession.h.
#define vtkSessionCreateObject VTK_ABI_NAMESPACE_MANGLE(vtkSessionCreateObject) |
Definition at line 128 of file vtkSession.h.
#define vtkSessionDestroyObject VTK_ABI_NAMESPACE_MANGLE(vtkSessionDestroyObject) |
Definition at line 129 of file vtkSession.h.
#define vtkSessionRegisterState VTK_ABI_NAMESPACE_MANGLE(vtkSessionRegisterState) |
Definition at line 130 of file vtkSession.h.
#define vtkSessionUnRegisterState VTK_ABI_NAMESPACE_MANGLE(vtkSessionUnRegisterState) |
Definition at line 131 of file vtkSession.h.
#define vtkSessionGetState VTK_ABI_NAMESPACE_MANGLE(vtkSessionGetState) |
Definition at line 132 of file vtkSession.h.
#define vtkSessionSkipProperty VTK_ABI_NAMESPACE_MANGLE(vtkSessionSkipProperty) |
Definition at line 133 of file vtkSession.h.
#define vtkSessionUnSkipProperty VTK_ABI_NAMESPACE_MANGLE(vtkSessionUnSkipProperty) |
Definition at line 134 of file vtkSession.h.
#define vtkSessionRegisterBlob VTK_ABI_NAMESPACE_MANGLE(vtkSessionRegisterBlob) |
Definition at line 135 of file vtkSession.h.
#define vtkSessionUnRegisterBlob VTK_ABI_NAMESPACE_MANGLE(vtkSessionUnRegisterBlob) |
Definition at line 136 of file vtkSession.h.
#define vtkSessionGetBlob VTK_ABI_NAMESPACE_MANGLE(vtkSessionGetBlob) |
Definition at line 137 of file vtkSession.h.
#define vtkSessionPruneUnusedBlobs VTK_ABI_NAMESPACE_MANGLE(vtkSessionPruneUnusedBlobs) |
Definition at line 138 of file vtkSession.h.
#define vtkSessionPruneUnusedObjects VTK_ABI_NAMESPACE_MANGLE(vtkSessionPruneUnusedObjects) |
Definition at line 139 of file vtkSession.h.
#define vtkSessionPruneUnusedStates VTK_ABI_NAMESPACE_MANGLE(vtkSessionPruneUnusedStates) |
Definition at line 140 of file vtkSession.h.
#define vtkSessionClear VTK_ABI_NAMESPACE_MANGLE(vtkSessionClear) |
Definition at line 141 of file vtkSession.h.
#define vtkSessionInvoke VTK_ABI_NAMESPACE_MANGLE(vtkSessionInvoke) |
Definition at line 142 of file vtkSession.h.
#define vtkSessionGetAllDependencies VTK_ABI_NAMESPACE_MANGLE(vtkSessionGetAllDependencies) |
Definition at line 143 of file vtkSession.h.
#define vtkSessionFreeGetAllDependenciesResult VTK_ABI_NAMESPACE_MANGLE(vtkSessionFreeGetAllDependenciesResult) |
Definition at line 144 of file vtkSession.h.
#define vtkSessionGetTotalBlobMemoryUsage VTK_ABI_NAMESPACE_MANGLE(vtkSessionGetTotalBlobMemoryUsage) |
Definition at line 145 of file vtkSession.h.
#define vtkSessionGetTotalVTKDataObjectMemoryUsage VTK_ABI_NAMESPACE_MANGLE(vtkSessionGetTotalVTKDataObjectMemoryUsage) |
Definition at line 146 of file vtkSession.h.
#define vtkSessionUpdateObjectsFromStates VTK_ABI_NAMESPACE_MANGLE(vtkSessionUpdateObjectsFromStates) |
Definition at line 147 of file vtkSession.h.
#define vtkSessionUpdateStatesFromObjects VTK_ABI_NAMESPACE_MANGLE(vtkSessionUpdateStatesFromObjects) |
Definition at line 148 of file vtkSession.h.
#define vtkSessionUpdateObjectFromState VTK_ABI_NAMESPACE_MANGLE(vtkSessionUpdateObjectFromState) |
Definition at line 149 of file vtkSession.h.
#define vtkSessionUpdateStateFromObject VTK_ABI_NAMESPACE_MANGLE(vtkSessionUpdateStateFromObject) |
Definition at line 150 of file vtkSession.h.
#define vtkSessionSetSize VTK_ABI_NAMESPACE_MANGLE(vtkSessionSetSize) |
Definition at line 151 of file vtkSession.h.
#define vtkSessionRender VTK_ABI_NAMESPACE_MANGLE(vtkSessionRender) |
Definition at line 152 of file vtkSession.h.
#define vtkSessionResetCamera VTK_ABI_NAMESPACE_MANGLE(vtkSessionResetCamera) |
Definition at line 153 of file vtkSession.h.
#define vtkSessionStartEventLoop VTK_ABI_NAMESPACE_MANGLE(vtkSessionStartEventLoop) |
Definition at line 154 of file vtkSession.h.
#define vtkSessionStopEventLoop VTK_ABI_NAMESPACE_MANGLE(vtkSessionStopEventLoop) |
Definition at line 155 of file vtkSession.h.
#define vtkSessionAddObserver VTK_ABI_NAMESPACE_MANGLE(vtkSessionAddObserver) |
Definition at line 156 of file vtkSession.h.
#define vtkSessionRemoveObserver VTK_ABI_NAMESPACE_MANGLE(vtkSessionRemoveObserver) |
Definition at line 157 of file vtkSession.h.
#define vtkSessionImport VTK_ABI_NAMESPACE_MANGLE(vtkSessionImport) |
Definition at line 158 of file vtkSession.h.
#define vtkSessionExport VTK_ABI_NAMESPACE_MANGLE(vtkSessionExport) |
Definition at line 159 of file vtkSession.h.
#define vtkSessionPrintSceneManagerInformation VTK_ABI_NAMESPACE_MANGLE(vtkSessionPrintSceneManagerInformation) |
Definition at line 160 of file vtkSession.h.
#define vtkSessionSetDeserializerLogVerbosity VTK_ABI_NAMESPACE_MANGLE(vtkSessionSetDeserializerLogVerbosity) |
Definition at line 161 of file vtkSession.h.
#define vtkSessionSetInvokerLogVerbosity VTK_ABI_NAMESPACE_MANGLE(vtkSessionSetInvokerLogVerbosity) |
Definition at line 162 of file vtkSession.h.
#define vtkSessionSetObjectManagerLogVerbosity VTK_ABI_NAMESPACE_MANGLE(vtkSessionSetObjectManagerLogVerbosity) |
Definition at line 163 of file vtkSession.h.
#define vtkSessionSetSerializerLogVerbosity VTK_ABI_NAMESPACE_MANGLE(vtkSessionSetSerializerLogVerbosity) |
Definition at line 164 of file vtkSession.h.
typedef uint32_t vtkObjectHandle |
Definition at line 85 of file vtkSession.h.
typedef int vtkSessionResult |
Definition at line 86 of file vtkSession.h.
typedef struct vtkSessionImpl* vtkSession |
Definition at line 91 of file vtkSession.h.
typedef struct vtkSessionJsonImpl* vtkSessionJson |
Definition at line 96 of file vtkSession.h.
typedef int(* vtkSessionObjectManagerRegistrarFunc) (void *ser, void *deser, void *invoker, const char **error) |
Definition at line 99 of file vtkSession.h.
typedef vtkSessionJson(* vtkSessionJsonParseFunc) (const char *) |
Definition at line 102 of file vtkSession.h.
typedef char *(* vtkSessionJsonStringifyFunc) (vtkSessionJson) |
Definition at line 105 of file vtkSession.h.
typedef void(* vtkSessionObserverCallbackFunc) (vtkObjectHandle, const char *) |
Definition at line 107 of file vtkSession.h.
typedef struct vtkSessionDescriptor vtkSessionDescriptor |
VTKSERIALIZATIONMANAGER_EXPORT void vtkFreeSession | ( | vtkSession | session | ) |
Free a session.
session | The session to free. The session must be created using vtkCreateSession. |
delete
or free
to free the session. VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult vtkSessionInitializeObjectManager | ( | vtkSession | session | ) |
Loads the default (de)serialization handlers and constructors for VTK classes.
session | The session to initialize. The session must be created using vtkCreateSession. |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult vtkSessionInitializeObjectManagerExtensionHandlers | ( | vtkSession | session, |
const vtkSessionObjectManagerRegistrarFunc * | registrars, | ||
size_t | count | ||
) |
Loads user provided handlers.
session | The session to initialize. The session must be created using vtkCreateSession. |
registrars | The array of function pointers to register the handlers. |
count | The number of function pointers in the array. |
VTKSERIALIZATIONMANAGER_EXPORT void * vtkSessionGetManager | ( | vtkSession | session | ) |
Get underlying object manager of a vtkSession.
session | The session to get the object manager from. The session must be created using vtkCreateSession. |
VTKSERIALIZATIONMANAGER_EXPORT vtkObjectHandle vtkSessionCreateObject | ( | vtkSession | session, |
const char * | className | ||
) |
Create an object of type className
.
session | The session to create the object in. The session must be created using vtkCreateSession. |
className | The name of the class to create. |
vtkObjectHandle
. The caller is responsible for freeing the object using vtkSessionDestroyObject. VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult vtkSessionDestroyObject | ( | vtkSession | session, |
vtkObjectHandle | object | ||
) |
Destroy a VTKObject.
session | The session to destroy the object in. The session must be created using vtkCreateSession. |
object | The object to destroy. The object must be created using vtkSessionRegisterState or vtkSessionCreateObject or a dependent of objects created through either of those two methods. |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult vtkSessionRegisterState | ( | vtkSession | session, |
vtkSessionJson | state | ||
) |
Adds state
into an internal container and returns a unique identifier.
session | The session to register the state in. The session must be created using vtkCreateSession. |
state | The state to register. The state must be valid json and must have the required key value pairs. |
where n is an integer of type vtkObjectHandle
have a key-value pair
{'ClassName': "className"}where "className" is the name of the class.
have a key-value pair
{'Superclass': ["superClassName1", ..]}` where "superClassName1" is the name of a superclass. The superclass names must be ordered from the least derived to the most derived class. The superclass names must be valid class names. VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult vtkSessionUnRegisterState | ( | vtkSession | session, |
vtkObjectHandle | object | ||
) |
Removes a state at id
.
session | The session to unregister the state from. The session must be created using vtkCreateSession. |
object | The object to unregister. The object must be registered using vtkSessionRegisterState or vtkSessionCreateObject or a dependent of objects created through either of those two methods. |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionJson vtkSessionGetState | ( | vtkSession | session, |
vtkObjectHandle | object | ||
) |
Get the state of the object at id
.
session | The session to get the state from. The session must be created using vtkCreateSession. |
object | The object to get the state from. The object must be registered using vtkSessionRegisterState or vtkSessionCreateObject or a dependent of objects created through either of those two methods. |
vtkSessionJson
. VTKSERIALIZATIONMANAGER_EXPORT void vtkSessionSkipProperty | ( | vtkSession | session, |
const char * | className, | ||
const char * | propertyName | ||
) |
Skip a property of a class.
The property will not be serialized or deserialized.
session | The session to skip the property in. The session must be created using vtkCreateSession. |
className | The name of the class to skip the property in. |
propertyName | The name of the property to skip. |
VTKSERIALIZATIONMANAGER_EXPORT void vtkSessionUnSkipProperty | ( | vtkSession | session, |
const char * | className, | ||
const char * | propertyName | ||
) |
Remove a property of a class from the skip list.
The property will be serialized and deserialized.
session | The session to unskip the property in. The session must be created using vtkCreateSession. |
className | The name of the class to unskip the property in. |
propertyName | The name of the property to unskip. |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult vtkSessionRegisterBlob | ( | vtkSession | session, |
const char * | hash, | ||
uint8_t * | blob, | ||
size_t | length | ||
) |
Register a blob with the session.
session | The session to register the blob with. The session must be created using vtkCreateSession. |
hash | The hash of the blob. The hash must be a valid string. |
blob | The blob to register. The blob must be a valid pointer to a uint8_t array. |
length | The length of the blob. The length must be a valid size_t. |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult vtkSessionUnRegisterBlob | ( | vtkSession | session, |
const char * | hash | ||
) |
Unregister a blob with the session.
session | The session to unregister the blob from. The session must be created using vtkCreateSession. |
hash | The hash of the blob. The hash must be a valid string. |
VTKSERIALIZATIONMANAGER_EXPORT uint8_t * vtkSessionGetBlob | ( | vtkSession | session, |
const char * | hash, | ||
size_t * | length | ||
) |
Get a blob from the session.
session | The session to get the blob from. The session must be created using vtkCreateSession. |
hash | The hash of the blob. The hash must be a valid string. |
length | A pointer to a size_t that will be set to the length of the blob. |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionJson vtkSessionInvoke | ( | vtkSession | session, |
vtkObjectHandle | object, | ||
const char * | methodName, | ||
vtkSessionJson | args | ||
) |
Invokes a method on the object at id
with the given arguments.
session | The session to invoke the method on. The session must be created using vtkCreateSession. |
object | The object to invoke the method on. The object must be registered using vtkSessionRegisterState or vtkSessionCreateObject or a dependent of objects created through either of those two methods. |
methodName | The name of the method to invoke. The method must be a valid string. |
args | The arguments to pass to the method. The arguments must be a valid vtkSessionJson. |
vtkObjectHandle
. VTKSERIALIZATIONMANAGER_EXPORT vtkObjectHandle * vtkSessionGetAllDependencies | ( | vtkSession | session, |
vtkObjectHandle | object, | ||
size_t * | count | ||
) |
Get all dependencies of an object.
session | The session to get the dependencies from. The session must be created using vtkCreateSession. |
object | The object to get the dependencies from. The object must be registered using vtkSessionRegisterState or vtkSessionCreateObject or a dependent of objects created through either of those two methods. |
count | A pointer to a size_t that will be set to the number of dependencies. |
VTKSERIALIZATIONMANAGER_EXPORT void vtkSessionFreeGetAllDependenciesResult | ( | vtkSession | session, |
vtkObjectHandle * | ptr | ||
) |
Free the result of vtkSessionGetAllDependencies.
session | The session to free the result from. The session must be created using vtkCreateSession. |
ptr | The pointer to the result to free. The pointer must be a valid pointer to an array of vtkObjectHandle. |
VTKSERIALIZATIONMANAGER_EXPORT void vtkSessionUpdateObjectFromState | ( | vtkSession | session, |
vtkSessionJson | state | ||
) |
Update the object from the state.
session | The session to update the object in. The session must be created using vtkCreateSession. |
state | The state to update the object from. The state must be valid json and must have the required key value pairs. |
VTKSERIALIZATIONMANAGER_EXPORT void vtkSessionUpdateStateFromObject | ( | vtkSession | session, |
vtkObjectHandle | object | ||
) |
Update the state from the object.
session | The session to update the state from. The session must be created using vtkCreateSession. |
object | The object to update the state from. The object must be registered using vtkSessionRegisterState or vtkSessionCreateObject or a dependent of objects created through either of those two methods. |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult vtkSessionSetSize | ( | vtkSession | session, |
vtkObjectHandle | object, | ||
int | width, | ||
int | height | ||
) |
Set the size of the render window.
session | The session to set the size in. The session must be created using vtkCreateSession. |
object | The object to set the size for. The object must be registered using vtkSessionRegisterState or vtkSessionCreateObject or a dependent of objects created through either of those two methods. |
width | The width of the render window. |
height | The height of the render window. |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult vtkSessionRender | ( | vtkSession | session, |
vtkObjectHandle | object | ||
) |
Render the window.
session | The session to render the object in. The session must be created usingvtkCreateSession. |
object | The object to render. The object must be registered usingvtkSessionRegisterState or vtkSessionCreateObject or a dependent of objects created through either of those two methods. |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult vtkSessionResetCamera | ( | vtkSession | session, |
vtkObjectHandle | object | ||
) |
Reset the camera of the renderer to fit the bounds of the scene.
session | The session to reset the camera in. The session must be created using vtkCreateSession. |
object | The object to reset the camera for. The object must be registered using vtkSessionRegisterState or vtkSessionCreateObject or a dependent of objects created through either of those two methods. |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult vtkSessionStartEventLoop | ( | vtkSession | session, |
vtkObjectHandle | object | ||
) |
Start the event loop for the render window interactor.
session | The session to start the event loop in. The session must be created using vtkCreateSession. |
object | The object to start the event loop for. The object must be registered using vtkSessionRegisterState or vtkSessionCreateObject or a dependent of objects created through either of those two methods. |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult vtkSessionStopEventLoop | ( | vtkSession | session, |
vtkObjectHandle | object | ||
) |
Stop the event loop for the render window interactor.
session | The session to start the event loop in. The session must be created using vtkCreateSession. |
object | The object to start the event loop for. The object must be registered using vtkSessionRegisterState or vtkSessionCreateObject or a dependent of objects created through either of those two methods. |
VTKSERIALIZATIONMANAGER_EXPORT unsigned long vtkSessionAddObserver | ( | vtkSession | session, |
vtkObjectHandle | object, | ||
const char * | eventName, | ||
vtkSessionObserverCallbackFunc | callback | ||
) |
Add an observer to the object for the given event.
session | The session to add the observer to. The session must be created using vtkCreateSession. |
object | The object to add the observer to. The object must be registered using vtkSessionRegisterState or vtkSessionCreateObject or a dependent of objects created through either of those two methods. |
eventName | The name of the event to observe. The event must be a valid string. |
callback | The callback function to call when the event is triggered. The callback must be a valid function pointer. |
VTKSERIALIZATIONMANAGER_EXPORT vtkSessionResult vtkSessionRemoveObserver | ( | vtkSession | session, |
vtkObjectHandle | object, | ||
unsigned long | tag | ||
) |
Remove an observer from the object for the given event.
session | The session to remove the observer from. The session must be created using vtkCreateSession. |
object | The object to remove the observer from. The object must be registered using vtkSessionRegisterState or vtkSessionCreateObject or a dependent of objects created through either of those two methods. |
tag | The tag of the observer to remove. The tag is a unique identifier for the observer. |
VTKSERIALIZATIONMANAGER_EXPORT void vtkSessionExport | ( | vtkSession | session, |
const char * | fileName | ||
) |
Writes state of all registered objects to fileName.states.json
The blobs are written into fileName.blobs.json
.
session | The session to export the state and blob into. The session must be created using vtkCreateSession. |
fileName | The name of the state file to export. The file must be a valid json file. |
VTKSERIALIZATIONMANAGER_EXPORT void vtkSessionImport | ( | vtkSession | session, |
const char * | stateFileName, | ||
const char * | blobFileName | ||
) |
Import a session from a state file and a blob file.
session | The session to import the state and blob into. The session must be created using vtkCreateSession. |
stateFileName | The name of the state file to import. The file must be a valid json file. |
blobFileName | The name of the blob file to import. The file must be a valid json file. |
VTKSERIALIZATIONMANAGER_EXPORT void vtkSessionUpdateObjectsFromStates | ( | vtkSession | session | ) |
Deserialize registered states from objects.
session | The session to deserialize the states in. The session must be created using vtkCreateSession. |
VTKSERIALIZATIONMANAGER_EXPORT void vtkSessionUpdateStatesFromObjects | ( | vtkSession | session | ) |
Serialize registered objects into states.
session | The session to serialize the objects in. The session must be created using vtkCreateSession. |
VTKSERIALIZATIONMANAGER_EXPORT void vtkSessionPruneUnusedBlobs | ( | vtkSession | session | ) |
Prune unused blobs from the session.
session | The session to prune the blobs from. The session must be created using vtkCreateSession. |
VTKSERIALIZATIONMANAGER_EXPORT void vtkSessionPruneUnusedObjects | ( | vtkSession | session | ) |
Prune unused objects from the session.
session | The session to prune the objects from. The session must be created using vtkCreateSession. |
VTKSERIALIZATIONMANAGER_EXPORT void vtkSessionPruneUnusedStates | ( | vtkSession | session | ) |
Prune unused states from the session.
session | The session to prune the states from. The session must be created using vtkCreateSession. |
VTKSERIALIZATIONMANAGER_EXPORT void vtkSessionClear | ( | vtkSession | session | ) |
Clear the session.
This will remove all registered objects, states and blobs.
session | The session to clear. The session must be created using vtkCreateSession. |
VTKSERIALIZATIONMANAGER_EXPORT size_t vtkSessionGetTotalBlobMemoryUsage | ( | vtkSession | session | ) |
Get the total memory usage of the blobs in the session.
session | The session to get the memory usage from. The session must be created using vtkCreateSession. |
VTKSERIALIZATIONMANAGER_EXPORT size_t vtkSessionGetTotalVTKDataObjectMemoryUsage | ( | vtkSession | session | ) |
Get the total memory usage of the VTK data objects in the session.
session | The session to get the memory usage from. The session must be created using vtkCreateSession. |
VTKSERIALIZATIONMANAGER_EXPORT void vtkSessionPrintSceneManagerInformation | ( | vtkSession | session | ) |
Print the scene manager information to the console.
session | The session to print the information from. The session must be created using vtkCreateSession. |
VTKSERIALIZATIONMANAGER_EXPORT void vtkSessionSetDeserializerLogVerbosity | ( | vtkSession | session, |
const char * | verbosityStr | ||
) |
Set the log verbosity for the session deserializer.
session | The session to set the log verbosity for. The session must be created using vtkCreateSession. |
verbosityStr | The verbosity level to set. The verbosity level must be a valid string. The valid values are "OFF", "ERROR", "WARNING", "INFO", "TRACE", "MAX", "INVALID" or "ASCII". |
VTKSERIALIZATIONMANAGER_EXPORT void vtkSessionSetInvokerLogVerbosity | ( | vtkSession | session, |
const char * | verbosityStr | ||
) |
Set the log verbosity for the session invoker.
session | The session to set the log verbosity for. The session must be created using vtkCreateSession. |
verbosityStr | The verbosity level to set. The verbosity level must be a valid string. The valid values are "OFF", "ERROR", "WARNING", "INFO", "TRACE", "MAX", "INVALID" or "ASCII". |
VTKSERIALIZATIONMANAGER_EXPORT void vtkSessionSetObjectManagerLogVerbosity | ( | vtkSession | session, |
const char * | verbosityStr | ||
) |
Set the log verbosity for the session object manager.
session | The session to set the log verbosity for. The session must be created using vtkCreateSession. |
verbosityStr | The verbosity level to set. The verbosity level must be a valid string. The valid values are "OFF", "ERROR", "WARNING", "INFO", "TRACE", "MAX", "INVALID" or "ASCII". |
VTKSERIALIZATIONMANAGER_EXPORT void vtkSessionSetSerializerLogVerbosity | ( | vtkSession | session, |
const char * | verbosityStr | ||
) |
Set the log verbosity for the session serializer.
session | The session to set the log verbosity for. The session must be created using vtkCreateSession. |
verbosityStr | The verbosity level to set. The verbosity level must be a valid string. The valid values are "OFF", "ERROR", "WARNING", "INFO", "TRACE", "MAX", "INVALID" or "ASCII". |