introduction
Using Vizz you can tweak your normal VTK pipeline to run in
a distributed envirnoment.
In Normal VTK Pipeline flow is as shown:
Source -> Filter -> Mapper -> Actor -> Renderer -> RenderWindow
In Vizz Pipeline
SourceProxy -> FilterProxy -> Mapper -> Actor -> Renderer -> RenderWindow
Change your source and filter to proxy classes and rest of the code remains the same.
Note:
This library is an ideal use case for people wanting to port their existing vtk/qt application to a distributed architecture. This library absracts the intricacies of client/server communications from the programmer. Vizz uses paraview's communication library and adds high level wrappers over it which makes writing paraview clients very easy. We hope it is useful for you. Please get back to us with your comments.
example code
// This example creates a cone source on remote data server and
// then renderers it
#include "vtkConeSourceProxy.h"
#include "vtkPolyDataMapper.h"
#include "vtkRenderWindow.h"
#include "vtkCamera.h"
#include "vtkActor.h"
#include "vtkRenderer.h"
#include "ConnectionInitiator.h"
int main()
{
// Establish connection to paraview data server
//([ServerName],[ServerPort], [IsSelfConnection])
// If Self Connection is 1,
//all objects are created locally without connecting to server
ConnectionInitiator::start("localhost", 11111, 0);
//Use vktConeSourceProxy, this creates the cone source on data server
vtkConeSourceProxy *cone = vtkConeSourceProxy::New();
cone->SetHeight( 3.0 );
cone->SetRadius( 1.0 );
cone->SetResolution( 10 );
vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();
coneMapper->SetInputConnection( cone->GetOutputPort() );
vtkActor *coneActor = vtkActor::New();
coneActor->SetMapper( coneMapper );
vtkRenderer *ren1= vtkRenderer::New();
ren1->AddActor( coneActor );
ren1->SetBackground( 0.1, 0.2, 0.4 );
vtkRenderWindow *renWin = vtkRenderWindow::New();
renWin->AddRenderer( ren1 );
renWin->SetSize( 300, 300 );
int i;
for (i = 0; i < 360; ++i)
{
renWin->Render();
// rotate the active camera by one degree
ren1->GetActiveCamera()->Azimuth( 1 );
}
cone->Delete();
coneMapper->Delete();
coneActor->Delete();
ren1->Delete();
renWin->Delete();
return 0;
}