[Paraview] Tcl / C++ Code from Paraview ?

Berk Geveci berklist at nycap.rr.com
Fri Sep 17 09:34:31 EDT 2004


There is no way to have paraview write vtk scripts or programs.
You have to start with the batch file and convert that to a
vtk script. It is not too hard. First, get paraview 1.6 (source).
Second, make it write a batch script. Third, look at the xml
files in Servers/ServerManager/Resources to figure out which
"proxies" correspond to which vtk classes and which "properties"
correspond to which methods. For example:

batch script:
 
set pvTemp223 [$proxyManager NewProxy filters ShrinkFilter]
  [$pvTemp223 GetProperty Input] AddProxy $pvTemp269
  [$pvTemp223 GetProperty ShrinkFactor] SetElement 0 0.5

corresponding xml from filtering.xml:

   <SourceProxy name="ShrinkFilter" class="vtkShrinkFilter">
     <InputProperty
        name="Input"
        command="SetInput">
           <ProxyGroupDomain name="groups">
             <Group name="sources"/>
             <Group name="filters"/>
           </ProxyGroupDomain>
           <DataTypeDomain name="input_type">
             <DataType value="vtkDataSet"/>
           </DataTypeDomain>
      </InputProperty>

      <DoubleVectorProperty
         name="ShrinkFactor"
         command="SetShrinkFactor"
         number_of_elements="1"
         default_values="0.5" >
        <DoubleRangeDomain name="range" min="0" max="1" />
      </DoubleVectorProperty>
   <!-- End ShrinkFilter -->
   </SourceProxy>

These together tell you that the filter is vtkShrinkFilter, it
is connected to whatever pvTemp269 is (a cylinder source,
vtkCylinderSource) and the SetShrinkFactor method has to be
called with 0.5. If you go over a few batch scripts, you should
figure out how it works easily. Feel free to post questions if
you don't understand how it works.

-Berk


On Tue, 2004-09-14 at 21:45, ***Ambalavanan*** wrote:
> Hai all,
> Just wanted to ask if it is possible to get paraview to get the TCL/C++
> code out of whatever it is doing. Not the interfaces, but for the file
> open / filters and things like that... I saw that there is a bathc file
> that can be exported, but it needs paraview to run it... i would be
> happier with a standalone piece of code that could run with just vtk !
> 
> Thanks
> Amba
> 
> 
> 		
> _______________________________
> Do you Yahoo!?
> Declare Yourself - Register online to vote today!
> http://vote.yahoo.com
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
-- 
Berk Geveci <berklist at nycap.rr.com>



More information about the ParaView mailing list