ParaView:Extend
From KitwarePublic
Jump to navigationJump to search
There are several ways to extend ParaView's capabilities:
- Enable existing VTK reader, writer, source, or algorithm.
- Include new reader, writer, source, or algorightm during compile time
- Include new reader, writer, source, or algorightm during run time
- Include arbitrary new code during compile time
- Include arbitrary new code during run time
- Include ParaView in some other project
Enable Existing VTK Class
Let say we require a class in ParaView that already exists in VTK, but is not available in the ParaView GUI. To enable this filter we need to provide two XML files. One describes the use of class in the ParaView server manager, while the other describes the properties GUI. Let take as an example vtkCellDerivatives.
The first part is the server manager XML which we will call vtkCellDerivatives.pvsm:
<ServerManagerConfiguration> <ProxyGroup name="filters"> <SourceProxy name="CellDerivatives" class="vtkCellDerivatives"> <InputProperty name="Input" command="SetInput"> <ProxyGroupDomain name="groups"> <Group name="sources"/> <Group name="filters"/> </ProxyGroupDomain> <DataTypeDomain name="input_type"> <DataType value="vtkDataSet"/> </DataTypeDomain> </InputProperty> <IntVectorProperty name="VectorMode" command="SetVectorMode" number_of_elements="1" default_values="0" > <EnumerationDomain name="enum"> <Entry value="0" text="PassVectors"/> <Entry value="1" text="ComputeGradient"/> <Entry value="2" text="ComputeVorticity"/> </EnumerationDomain> </IntVectorProperty> <!-- End CellCenters --> </SourceProxy> </ProxyGroup> </ServerManagerConfiguration