Look at ParaViewSource/Servers/ServerManager/Resources/readers.xml Almost all readers have properties like CellArrayStatus/CellArrayInfo or PointArrayStatus/PointArrayInfo. You want to define your reader xml similarly. Note that it expects your reader to have API as
* int GetNumberOf<Attribute>Arrays * const char* Get<Attribute>ArrayName (int index) * int Get<Attribute>ArrayStatus(const char* arrayname) Where <Attribute> is replaced by the value for the XML item "attribute_name" specified on the ArraySelectionInformationHelper element. Hope that helps. Utkarsh On Mon, Nov 15, 2010 at 10:52 AM, R M <[email protected]> wrote: > Hello, > > I have a file format that contains arrays of scalars data (each array has a > name) . What I would like to do is to choose the array I have selected and > load it in paraview. > ex: > array 0 -> name = temp_0 1.2 3.5 7.8 .... > array 1 -> name = temp_1 8.7 5.9 2.3 .... > array 2 -> name = temp_2 72 10.5 87.8 .... > > So, I have wrote a plugin reader and in the xml file I have add for some > tests (from > http://paraview.org/Wiki/Plugin_HowTo#Adding_Categories_to_the_Filters_Menu): > <IntVectorProperty > name="temperature" > command="SetTemperature" > number_of_elements="1" > default_values="0"> > <EnumerationDomain name="enum"> > <Entry value="0" text="temp_0"/> > <Entry value="1" text="temp_1"/> > <Entry value="2" text="temp_2"/> > </EnumerationDomain> > </IntVectorProperty> > > When I use the plugin, I have a drop down list. But What I want is start > from an empty drop down list and add the name and index of the array at the > end of the requestInformation (Because files don't have the same number of > arrays and differents names). > > But, I can find anything about how to do that (internet and The ParaView > Guide book and VTK User's Guide book). > > How can I do that ? > > Thank you for your help. > > > _______________________________________________ > 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
