Thanks a lot, David. Both you and Karl nailed my problem. I was not aware of the XML aspect at all by following http://www.cmake.org/Wiki/ParaView/Plugin_HowTo#Adding_a_Reader http://www.kitware.com/products/html/WritingAParaViewReaderPlug-in.html which all stopped at exposing WHOLE_EXTENT(), SPACING(), and ORIGIN(). Maybe my experience can be crafted into an updated reader plugin tutorial? Best, x
-----Original Message----- From: David E DeMarle [mailto:dave.dema...@kitware.com] Sent: Monday, April 18, 2011 5:46 PM To: Xunlei Wu Cc: kkoeni...@web.de; paraview@paraview.org Subject: Re: [Paraview] Empty Object Properties - Custom Reader Plugin Do you have the XML to tell paraview to use those? The AVS UCD entry in filters.xml has the following, the first is an information_only (ie readback) property that tells ParaView what the available arrays are, the sencond is a normal (ie write) property that tells ParaView how to tell which arrays to enable. With these, ParaVIew should create the selection widget on the Properties tab and then be able to call those Set methods you added to the reader. <StringVectorProperty name="CellArrayInfo" information_only="1"> <ArraySelectionInformationHelper attribute_name="Cell"/> </StringVectorProperty> <StringVectorProperty name="CellArrayStatus" command="SetCellArrayStatus" number_of_elements="2" repeat_command="1" number_of_elements_per_command="2" element_types="2 0" information_property="CellArrayInfo" label="Cell Arrays"> <ArraySelectionDomain name="array_list"> <RequiredProperties> <Property name="CellArrayInfo" function="ArrayList"/> </RequiredProperties> </ArraySelectionDomain> <Documentation> This property contains a list of the cell-centered arrays to read. </Documentation> </StringVectorProperty> David E DeMarle Kitware, Inc. R&D Engineer 28 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-371-3971 x109 On Sat, Apr 16, 2011 at 5:50 AM, Xunlei Wu <xun...@renci.org> wrote: > Hi Karl, > > Thanks a lot for the tip. I followed vtkAVSucdReader.h/cxx and hoped to solve > my issue. I understood vtkAVSucdReader:: CellDataArraySelection and > vtkAVSucdReader ::PointDataArraySelection are responsible filling the > "Cell/Point Array Status" window. However, I am not sure how these two arrays > are interfaced. I have added these two arrays and corresponding access > functions (Get/Set) in my reader class. I still do not see anything within > "Cell/Point Array Status" window. > FYI, my reader is a plugin class. Is AVSucdReader a plugin class as well? > Thanks a lot for the help. > > Best, > xunlei > > -----Original Message----- > From: kkoeni...@web.de [mailto:kkoeni...@web.de] > Sent: Friday, March 25, 2011 7:11 AM > To: Xunlei Wu > Cc: paraview@paraview.org > Subject: Re: [Paraview] Empty Object Properties - Custom Reader Plugin > > By the way, don't let yourself confuse by the fact that that > particular reader currently does only fill "Cell/Point Array Status" > for binary AVS UCD files (vtkdata-5.6.1.zip:Data/cellsnd.bin.inp), but > not for ASCII AVS UCD files (vtkdata-5.6.1.zip:Data/cellsnd.ascii.inp) > > Karl > > > Karl König wrote, On 25.03.2011 12:04: >> Xunlei, >> >> Have a look at VTK/IO/vtkAVSucdReader.{h,cxx}, that's a simple >> self-contained reader. You'll need to integrate everything (headers, >> methods, code blocks etc.) mentioning "DataArraySelection" into your reader. >> >> Karl >> >> >> Xunlei Wu wrote, On 25.03.2011 11:59: >>> Hi Karl, >>> Exactly as you said! >>> Where should I look? Thanks a lot. >>> >>> Best, >>> xunlei >>> >>> -----Original Message----- >>> From: kkoeni...@web.de [mailto:kkoeni...@web.de] >>> Sent: Friday, March 25, 2011 6:54 AM >>> To: Xunlei Wu >>> Cc: paraview@paraview.org >>> Subject: Re: [Paraview] Empty Object Properties - Custom Reader >>> Plugin >>> >>> Xunlei, >>> >>> There is no auto-generation of GUI elements for the properties tab of a >>> reader. Your reader has to populate the tab. >>> Are you looking for something like "Cell/Point Array Status" to pop up in >>> the properties tab? Like the VTU-XML Reader and many others offer? >>> Such that you can select the variables to actually import or ignore while >>> loading, respectively? >>> >>> Karl >>> >>> >>> Xunlei Wu wrote, On 25.03.2011 11:32: >>>> Hello, >>>> >>>> I still cannot figure out why I had such problem. Would you please help? >>>> Thanks a lot. >>>> >>>> Best, >>>> >>>> xunlei >>>> >>>> >>>> >>>> *From:*Xunlei Wu >>>> *Sent:* Monday, March 21, 2011 8:22 PM >>>> *To:* paraview@paraview.org >>>> *Subject:* Empty Object Properties - Custom Reader Plugin >>>> >>>> >>>> >>>> Hello, >>>> >>>> I am writing a reader plugin for ParaView following examples in >>>> >>>> http://www.kitware.com/products/html/WritingAParaViewReaderPlug-in. >>>> h >>>> tm >>>> l >>>> >>>> However, after the file metadata is read by ::RequestInformation(), >>>> there are no scalar attributes shown in "Object Inspector" -> >>>> "Properties" illustrated in Empty_Object_Inspector_Properties.PNG. >>>> After click "Apply", ::RequestData() gets all the attribute data >>>> and displays the information in "Object Inspector" -> "Information" -> >>>> "Data Arrays" >>>> table as shown in Updated_Object_Inspector_Information.PNG. After >>>> the data is read, "Properties" page is still empty. Would you >>>> please suggest what I should do? Any functions that I should >>>> implement or call in my reader class? Thanks a lot. >>>> >>>> >>>> >>>> Best, >>>> >>>> xunlei >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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 > > _______________________________________________ > 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