The solution was to use "pqDisplayColorWidget" ... 

I'd use it like follow and it worked well : 

this->m_RenderView = qobject_cast<pqRenderView*>(
          m_object_builder->createView(pqRenderView::renderViewType(), 
m_server));

           QPointer<pqPipelineSource> m_source = 
m_object_builder->createReader("sources", 
"LegacyVTKFileReader",QStringList(given_file), m_server);

            pqDataRepresentation* repr = 
m_input->getRepresentation(m_RenderView);

            
this->m_color->setRepresentation(m_input->getRepresentation(m_RenderView));


Hope it'll help someone.

Wertz Gil
gilwe...@hotmail.com




From: gilwe...@hotmail.com
To: paraview@paraview.org
Date: Mon, 28 Mar 2011 14:32:53 +0200
Subject: [Paraview] How to get the different data array / data set of a vtk     
file








In Paraview, in "Information" > "Data Arrays" there is a list of the data set 
of my vtk file (name,type,Data range).

But when I create a 'LegacyVTKFileReader', I give the inputFile, but how do I 
know number of dataSet , their names and how do I use one specifically ? ( 
Actually I automaticaly use the first dataSet )

Thanks in advance ! :-) 

Wertz Gil
gilwe...@hotmail.com


                                          

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview                               
          
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to