[Paraview] Paraview Live Visualisation C++ Pipeline

Kohlhase, Simon simon.kohlhase at tum.de
Thu Jan 26 09:53:17 EST 2017


Hi,

for a University Project we're trying to run Paraview Live Simulation on the local cluster-network. Unfortunately the network only has a Paraview version without python-binding installed, therefore we would like to run the LiveSimulation with a C++-coded Pipeline Skript.

As far as we understood, to make it work we have to rewrite the following lines from the PythonPipeline Script to C++, which turns out to be quite challenging:

coprocessor.UpdateProducers(datadescription)
# Write output data, if appropriate.
coprocessor.WriteData(datadescription);
# Live Visualization, if enabled.
coprocessor.DoLiveVisualization(datadescription, "localhost", 22222)

We tried the following:

//INITIALIZE
vtkNew<vtkLiveInsituLink> link;
vtkSMProxyManager* proxyManager;
vtkSMSessionProxyManager* sessionProxyManager;
link -> SetInsituPort(22222);
link -> SetHostname("localhost");
proxyManager = vtkSMProxyManager::GetProxyManager();
sessionProxyManager = proxyManager->GetActiveSessionProxyManager();
link -> Initialize(sessionProxyManager);

// Initialize returns 1, therefore connection established properly

//Then we tried to coprocess with the following code:
vtkNew<vtkXMLPImageDataWriter> writer;
writer->SetInputConnection(producer->GetOutputPort());
vtkSMProxy* proxy = sessionProxyManager->NewProxy("insitu_writer_parameters","XMLPImageDataWriter");
vtkSMInputProperty* property = (vtkSMInputProperty*) proxy -> GetProperty("Input");

//set input of proxy to our writer or datadescription - DOESN'T WORK
while(true){
  link->InsituUpdate(dataDescription->GetTime(), dataDescription->GetTimeStep());
  //update pipeline
  link->InsituPostProcess(dataDescription->GetTime(), dataDescription->GetTimeStep());
  if(link->GetSimulationPaused()){
    if(link->WaitForLiveChange()){
      break;
    }
  } else{
    break;
}
  }

So how are we supposed to get the data from our simulation into the Proxy?
We have been trying and searching the documentation for the right functions, but we can't figure out how to do it.

We would really appreciate some help ;-)

Best regards,
Simon Kohlhase
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170126/fff37782/attachment.html>


More information about the ParaView mailing list