VTK
9.1.0
|
Export the content of a vtkRenderWindow into a directory with a JSON meta file describing the scene along with the http datasets. More...
#include <vtkJSONSceneExporter.h>
Public Types | |
typedef vtkExporter | Superclass |
Public Types inherited from vtkExporter | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual vtkTypeBool | IsA (const char *type) |
Return 1 if this class is the same type of (or a subclass of) the named class. | |
vtkJSONSceneExporter * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. | |
vtkSetFilePathMacro (FileName) | |
Specify file name of vtk data file to write. | |
vtkGetFilePathMacro (FileName) | |
Specify file name of vtk data file to write. | |
virtual void | SetWriteTextures (bool) |
Whether or not to write textures. | |
virtual bool | GetWriteTextures () |
Whether or not to write textures. | |
virtual void | SetWriteTextureLODs (bool) |
Whether or not to write texture LODs. | |
virtual bool | GetWriteTextureLODs () |
Whether or not to write texture LODs. | |
virtual void | SetTextureLODsBaseSize (size_t) |
The base size to be used for texture LODs. | |
virtual size_t | GetTextureLODsBaseSize () |
The base size to be used for texture LODs. | |
virtual void | SetTextureLODsBaseUrl (const char *) |
The base URL to be used for texture LODs. | |
virtual char * | GetTextureLODsBaseUrl () |
The base URL to be used for texture LODs. | |
virtual void | SetWritePolyLODs (bool) |
Whether or not to write poly LODs. | |
virtual bool | GetWritePolyLODs () |
Whether or not to write poly LODs. | |
virtual void | SetPolyLODsBaseSize (size_t) |
The base size to be used for poly LODs. | |
virtual size_t | GetPolyLODsBaseSize () |
The base size to be used for poly LODs. | |
virtual void | SetPolyLODsBaseUrl (const char *) |
The base URL to be used for poly LODs. | |
virtual char * | GetPolyLODsBaseUrl () |
The base URL to be used for poly LODs. | |
Public Member Functions inherited from vtkExporter | |
virtual vtkTypeBool | IsA (const char *type) |
Return 1 if this class is the same type of (or a subclass of) the named class. | |
vtkExporter * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. | |
virtual void | Write () |
Write data to output. | |
void | Update () |
Convenient alias for Write() method. | |
void | SetStartWrite (void(*f)(void *), void *arg) |
Specify a function to be called before data is written. | |
void | SetEndWrite (void(*f)(void *), void *arg) |
Specify a function to be called after data is written. | |
void | SetStartWriteArgDelete (void(*f)(void *)) |
Set the arg delete method. | |
void | SetEndWriteArgDelete (void(*f)(void *)) |
Set the arg delete method. | |
vtkMTimeType | GetMTime () override |
Returns the MTime also considering the RenderWindow. | |
virtual void | SetRenderWindow (vtkRenderWindow *) |
Set/Get the rendering window that contains the scene to be written. | |
virtual vtkRenderWindow * | GetRenderWindow () |
Set/Get the rendering window that contains the scene to be written. | |
virtual void | SetActiveRenderer (vtkRenderer *) |
Set/Get the renderer that contains actors to be written. | |
virtual vtkRenderer * | GetActiveRenderer () |
Set/Get the renderer that contains actors to be written. | |
void | SetInput (vtkRenderWindow *renWin) |
These methods are provided for backward compatibility. | |
vtkRenderWindow * | GetInput () |
These methods are provided for backward compatibility. | |
Public Member Functions inherited from vtkObject | |
vtkBaseTypeMacro (vtkObject, vtkObjectBase) | |
virtual void | DebugOn () |
Turn debugging output on. | |
virtual void | DebugOff () |
Turn debugging output off. | |
bool | GetDebug () |
Get the value of the debug flag. | |
void | SetDebug (bool debugFlag) |
Set the value of the debug flag. | |
virtual void | Modified () |
Update the modification time for this object. | |
virtual vtkMTimeType | GetMTime () |
Return this object's modified time. | |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. | |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
vtkTypeBool | HasObserver (unsigned long event) |
vtkTypeBool | HasObserver (const char *event) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
vtkCommand * | GetCommand (unsigned long tag) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
void | RemoveObserver (vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
void | RemoveObservers (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
void | RemoveObservers (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
vtkTypeBool | HasObserver (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
vtkTypeBool | HasObserver (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
Overloads to AddObserver that allow developers to add class member functions as callbacks for events. | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
Overloads to AddObserver that allow developers to add class member functions as callbacks for events. | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
Allow user to set the AbortFlagOn() with the return value of the callback method. | |
int | InvokeEvent (unsigned long event, void *callData) |
This method invokes an event and return whether the event was aborted or not. | |
int | InvokeEvent (const char *event, void *callData) |
This method invokes an event and return whether the event was aborted or not. | |
Public Member Functions inherited from vtkObjectBase | |
const char * | GetClassName () const |
Return the class name as a string. | |
virtual vtkTypeBool | IsA (const char *name) |
Return 1 if this class is the same type of (or a subclass of) the named class. | |
virtual vtkIdType | GetNumberOfGenerationsFromBase (const char *name) |
Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). | |
virtual void | Delete () |
Delete a VTK object. | |
virtual void | FastDelete () |
Delete a reference to this object. | |
void | InitializeObjectBase () |
void | Print (ostream &os) |
Print an object to an ostream. | |
virtual void | Register (vtkObjectBase *o) |
Increase the reference count (mark as used by another object). | |
virtual void | UnRegister (vtkObjectBase *o) |
Decrease the reference count (release by another object). | |
int | GetReferenceCount () |
Return the current reference count of this object. | |
void | SetReferenceCount (int) |
Sets the reference count. | |
bool | GetIsInMemkind () const |
A local state flag that remembers whether this object lives in the normal or extended memory space. | |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. | |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. | |
Static Public Member Functions | |
static vtkJSONSceneExporter * | New () |
static vtkTypeBool | IsTypeOf (const char *type) |
static vtkJSONSceneExporter * | SafeDownCast (vtkObjectBase *o) |
Static Public Member Functions inherited from vtkExporter | |
static vtkTypeBool | IsTypeOf (const char *type) |
static vtkExporter * | SafeDownCast (vtkObjectBase *o) |
Static Public Member Functions inherited from vtkObject | |
static vtkObject * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. | |
static void | BreakOnError () |
This method is called when vtkErrorMacro executes. | |
static void | SetGlobalWarningDisplay (int val) |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
static void | GlobalWarningDisplayOn () |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
static void | GlobalWarningDisplayOff () |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
static int | GetGlobalWarningDisplay () |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
Static Public Member Functions inherited from vtkObjectBase | |
static vtkTypeBool | IsTypeOf (const char *name) |
Return 1 if this class type is the same type of (or a subclass of) the named class. | |
static vtkIdType | GetNumberOfGenerationsFromBaseType (const char *name) |
Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). | |
static vtkObjectBase * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. | |
static void | SetMemkindDirectory (const char *directoryname) |
The name of a directory, ideally mounted -o dax, to memory map an extended memory space within. | |
static bool | GetUsingMemkind () |
A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space. | |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkJSONSceneExporter () | |
~vtkJSONSceneExporter () override | |
void | WritePropCollection (vtkPropCollection *collection, std::ostream &sceneComponents) |
void | WriteVolumeCollection (vtkVolumeCollection *volumeCollection, std::ostream &sceneComponents) |
void | WriteDataObject (ostream &os, vtkDataObject *dataObject, vtkActor *actor, vtkVolume *volume) |
std::string | ExtractPiecewiseFunctionSetup (vtkPiecewiseFunction *pwf) |
std::string | ExtractColorTransferFunctionSetup (vtkColorTransferFunction *volume) |
std::string | ExtractVolumeRenderingSetup (vtkVolume *volume) |
std::string | ExtractActorRenderingSetup (vtkActor *actor) |
std::string | WriteDataSet (vtkDataSet *dataset, const char *addOnMeta) |
void | WriteLookupTable (const char *name, vtkScalarsToColors *lookupTable) |
void | WriteData () override |
std::string | CurrentDataSetPath () const |
std::string | WriteTexture (vtkTexture *texture) |
std::string | WriteTextureLODSeries (vtkTexture *texture) |
vtkSmartPointer< vtkPolyData > | WritePolyLODSeries (vtkPolyData *polys, std::string &config) |
Protected Member Functions inherited from vtkExporter | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkExporter () | |
~vtkExporter () override | |
virtual void | WriteData ()=0 |
Protected Member Functions inherited from vtkObject | |
vtkObject () | |
~vtkObject () override | |
void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr) |
These methods allow a command to exclusively grab all events. | |
void | InternalReleaseFocus () |
These methods allow a command to exclusively grab all events. | |
Protected Member Functions inherited from vtkObjectBase | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) |
virtual void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Protected Attributes | |
char * | FileName |
bool | WriteTextures |
bool | WriteTextureLODs |
size_t | TextureLODsBaseSize |
char * | TextureLODsBaseUrl |
bool | WritePolyLODs |
size_t | PolyLODsBaseSize |
char * | PolyLODsBaseUrl |
int | DatasetCount |
std::map< std::string, std::string > | LookupTables |
std::map< vtkTexture *, std::string > | TextureStrings |
std::map< vtkTexture *, std::string > | TextureLODStrings |
std::vector< std::string > | FilesToZip |
Protected Attributes inherited from vtkExporter | |
vtkRenderWindow * | RenderWindow |
vtkRenderer * | ActiveRenderer |
void(* | StartWrite )(void *) |
void(* | StartWriteArgDelete )(void *) |
void * | StartWriteArg |
void(* | EndWrite )(void *) |
void(* | EndWriteArgDelete )(void *) |
void * | EndWriteArg |
Protected Attributes inherited from vtkObject | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
Protected Attributes inherited from vtkObjectBase | |
std::atomic< int32_t > | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
Additional Inherited Members | |
Static Protected Member Functions inherited from vtkObjectBase | |
static vtkMallocingFunction | GetCurrentMallocFunction () |
static vtkReallocingFunction | GetCurrentReallocFunction () |
static vtkFreeingFunction | GetCurrentFreeFunction () |
static vtkFreeingFunction | GetAlternateFreeFunction () |
Export the content of a vtkRenderWindow into a directory with a JSON meta file describing the scene along with the http datasets.
Definition at line 48 of file vtkJSONSceneExporter.h.
Definition at line 52 of file vtkJSONSceneExporter.h.
|
protected |
|
overrideprotected |
|
static |
|
static |
|
virtual |
Return 1 if this class is the same type of (or a subclass of) the named class.
Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkExporter.
|
static |
|
protectedvirtual |
Reimplemented from vtkExporter.
vtkJSONSceneExporter * vtkJSONSceneExporter::NewInstance | ( | ) | const |
|
overridevirtual |
Methods invoked by print to print information about the object including superclasses.
Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkExporter.
vtkJSONSceneExporter::vtkSetFilePathMacro | ( | FileName | ) |
Specify file name of vtk data file to write.
This correspond to the root directory of the data to write.
vtkJSONSceneExporter::vtkGetFilePathMacro | ( | FileName | ) |
Specify file name of vtk data file to write.
This correspond to the root directory of the data to write.
|
virtual |
Whether or not to write textures.
Textures will be written in JPEG format. Default is false.
|
virtual |
Whether or not to write textures.
Textures will be written in JPEG format. Default is false.
|
virtual |
Whether or not to write texture LODs.
This will write out the textures in a series of decreasing resolution JPEG files, which are intended to be uploaded to the web. Each file will be 1/4 the size of the previous one. The files will stop being written out when one is smaller than the TextureLODsBaseSize. Default is false.
|
virtual |
Whether or not to write texture LODs.
This will write out the textures in a series of decreasing resolution JPEG files, which are intended to be uploaded to the web. Each file will be 1/4 the size of the previous one. The files will stop being written out when one is smaller than the TextureLODsBaseSize. Default is false.
|
virtual |
The base size to be used for texture LODs.
The texture LODs will stop being written out when one is smaller than this size. Default is 100 KB. Units are in bytes.
|
virtual |
The base size to be used for texture LODs.
The texture LODs will stop being written out when one is smaller than this size. Default is 100 KB. Units are in bytes.
|
virtual |
The base URL to be used for texture LODs.
Default is nullptr.
|
virtual |
The base URL to be used for texture LODs.
Default is nullptr.
|
virtual |
Whether or not to write poly LODs.
This will write out the poly LOD sources in a series of decreasing resolution data sets, which are intended to be uploaded to the web. vtkQuadricCluster is used to decrease the resolution of the poly data. Each will be approximately 1/4 the size of the previous one (unless certain errors occur, and then the defaults for quadric clustering will be used, which will produce an unknown size). The files will stop being written out when one is smaller than the PolyLODsBaseSize, or if the difference in the sizes of the two most recent LODs is less than 5%. The smallest LOD will be written into the vtkjs file, rather than with the rest of the LODs. Default is false.
|
virtual |
Whether or not to write poly LODs.
This will write out the poly LOD sources in a series of decreasing resolution data sets, which are intended to be uploaded to the web. vtkQuadricCluster is used to decrease the resolution of the poly data. Each will be approximately 1/4 the size of the previous one (unless certain errors occur, and then the defaults for quadric clustering will be used, which will produce an unknown size). The files will stop being written out when one is smaller than the PolyLODsBaseSize, or if the difference in the sizes of the two most recent LODs is less than 5%. The smallest LOD will be written into the vtkjs file, rather than with the rest of the LODs. Default is false.
|
virtual |
The base size to be used for poly LODs.
The poly LODs will stop being written out when one is smaller than this size, or if the difference in the sizes of the two most recent LODs is less than 5%. Default is 100 KB. Units are in bytes.
|
virtual |
The base size to be used for poly LODs.
The poly LODs will stop being written out when one is smaller than this size, or if the difference in the sizes of the two most recent LODs is less than 5%. Default is 100 KB. Units are in bytes.
|
virtual |
The base URL to be used for poly LODs.
Default is nullptr.
|
virtual |
The base URL to be used for poly LODs.
Default is nullptr.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
overrideprotectedvirtual |
Implements vtkExporter.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 173 of file vtkJSONSceneExporter.h.
|
protected |
Definition at line 174 of file vtkJSONSceneExporter.h.
|
protected |
Definition at line 175 of file vtkJSONSceneExporter.h.
|
protected |
Definition at line 176 of file vtkJSONSceneExporter.h.
|
protected |
Definition at line 177 of file vtkJSONSceneExporter.h.
|
protected |
Definition at line 178 of file vtkJSONSceneExporter.h.
|
protected |
Definition at line 179 of file vtkJSONSceneExporter.h.
|
protected |
Definition at line 180 of file vtkJSONSceneExporter.h.
|
protected |
Definition at line 181 of file vtkJSONSceneExporter.h.
|
protected |
Definition at line 182 of file vtkJSONSceneExporter.h.
|
protected |
Definition at line 183 of file vtkJSONSceneExporter.h.
|
protected |
Definition at line 184 of file vtkJSONSceneExporter.h.
|
protected |
Definition at line 187 of file vtkJSONSceneExporter.h.