Re: [Paraview] Writer plugin with selection of data arrays to output

2017-01-31 Thread Sergey Alexandrov
Hi Dennis,

Thanks for the suggestion! Honestly, at first I was skeptical about your
advice because it looked very
similar to my first solution that I outlined in the beginning of this
thread. However, as soon as I examined
the XML code for the PassArrays filter, I realized that this is exactly
what I need. It uses some built-in
ParaView magic to fill the list with data array names, so there is no need
for me to "inject" my custom
code to populate it. Neat!

Thanks again!

Cheers,
Sergey


On Mon, Jan 30, 2017 at 8:31 PM, Dennis Conklin  wrote:

> Sergey,
>
>
>
> You could combine the PassArrays filter and your custom writer into a
> Custom Filter and then Expose the properties of Cell Data Arrays and Point
> Data Arrays from the PassArray filter within your Custom Filter.
>
>
>
> This would allow your users to select which arrays to pass and write them
> out – I think this would do exactly what you want, but you should test it.
>
>
>
> Dennis
>
> ___
> 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
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Writer plugin with selection of data arrays to output

2017-01-30 Thread Dennis Conklin
Sergey,

You could combine the PassArrays filter and your custom writer into a Custom 
Filter and then Expose the properties of Cell Data Arrays and Point Data Arrays 
from the PassArray filter within your Custom Filter.

This would allow your users to select which arrays to pass and write them out - 
I think this would do exactly what you want, but you should test it.

Dennis
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Writer plugin with selection of data arrays to output

2017-01-30 Thread Sergey Alexandrov
Hi Cory,

Thanks for the answer and the workaround, will go this way.

Cheers,
Sergey


On Mon, Jan 30, 2017 at 4:18 PM, Cory Quammen 
wrote:

> Hi Sergey,
>
> I'm not aware of another writer that has the behavior you describe of
> saving out specified data arrays. As a result, there isn't any
> existing code to select the data arrays to be saved. There are a
> number of readers that do support which arrays to load, but it's not
> really possible to reuse that infrastructure without some additional
> ParaView development work to support selecting arrays to be written.
>
> A workaround would be to use a Pass Data Arrays filter to select the
> data arrays, then save the Pass Data Arrays output to your custom
> writer.
>
> Hope that helps,
> Cory
>
> On Mon, Jan 30, 2017 at 5:00 AM, Sergey Alexandrov
>  wrote:
> > Hi,
> >
> > I am trying to implement a sink algorithm (writer) to output point
> clouds in
> > my custom format. The points may have multiple data
> > arrays, and the writer should provide the user with an option to select
> > which of these arrays are to be output.
> >
> > Unfortunately, I am not able to find any wiki pages or articles that
> explain
> > how to implement such a writer. Also, I do not find any
> > existing writers with this functionality. The most similar things I found
> > are:
> >
> > 1) AMR base particles reader. It provides a facility to select which data
> > arrays are to be read from a file. Basically, when the user
> > sets the filename, the reader loads the meta-information about available
> > arrays from the file, and then these are displayed in
> > ParaView properties panel. The user can tick the arrays he wants and
> press
> > "Apply" to read. I can not figure out how to apply this
> > in my writer, because the only extension point for writers is the
> > WriteData() function. It is called after the user has pressed the
> > "Save" button, which is too late. In fact, I want to "inject" some code
> > between the moment the user chose the output filename (and
> > hence the writer to use), and the moment a dialog window with the
> properties
> > of the writer is shown.
> >
> > 2) Wiki page on writing readers. There is an example how make a drop-down
> > list to select which input array to process. Perhaps
> > I could add this to the writer, however it does seem to support only a
> > single array choice, whereas I need multiple.
> >
> > I would be very grateful for suggestions on how to implement the
> > functionality I need. Examples of existing readers would be
> > great. Or if there is definitely no "official" clean way to implement
> this,
> > please also let me know.
> >
> > Cheers,
> > Sergey
> >
> > ___
> > 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
> >
> > Search the list archives at: http://markmail.org/search/?q=ParaView
> >
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/paraview
> >
>
>
>
> --
> Cory Quammen
> Staff R Engineer
> Kitware, Inc.
>
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Writer plugin with selection of data arrays to output

2017-01-30 Thread Cory Quammen
Hi Sergey,

I'm not aware of another writer that has the behavior you describe of
saving out specified data arrays. As a result, there isn't any
existing code to select the data arrays to be saved. There are a
number of readers that do support which arrays to load, but it's not
really possible to reuse that infrastructure without some additional
ParaView development work to support selecting arrays to be written.

A workaround would be to use a Pass Data Arrays filter to select the
data arrays, then save the Pass Data Arrays output to your custom
writer.

Hope that helps,
Cory

On Mon, Jan 30, 2017 at 5:00 AM, Sergey Alexandrov
 wrote:
> Hi,
>
> I am trying to implement a sink algorithm (writer) to output point clouds in
> my custom format. The points may have multiple data
> arrays, and the writer should provide the user with an option to select
> which of these arrays are to be output.
>
> Unfortunately, I am not able to find any wiki pages or articles that explain
> how to implement such a writer. Also, I do not find any
> existing writers with this functionality. The most similar things I found
> are:
>
> 1) AMR base particles reader. It provides a facility to select which data
> arrays are to be read from a file. Basically, when the user
> sets the filename, the reader loads the meta-information about available
> arrays from the file, and then these are displayed in
> ParaView properties panel. The user can tick the arrays he wants and press
> "Apply" to read. I can not figure out how to apply this
> in my writer, because the only extension point for writers is the
> WriteData() function. It is called after the user has pressed the
> "Save" button, which is too late. In fact, I want to "inject" some code
> between the moment the user chose the output filename (and
> hence the writer to use), and the moment a dialog window with the properties
> of the writer is shown.
>
> 2) Wiki page on writing readers. There is an example how make a drop-down
> list to select which input array to process. Perhaps
> I could add this to the writer, however it does seem to support only a
> single array choice, whereas I need multiple.
>
> I would be very grateful for suggestions on how to implement the
> functionality I need. Examples of existing readers would be
> great. Or if there is definitely no "official" clean way to implement this,
> please also let me know.
>
> Cheers,
> Sergey
>
> ___
> 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
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>



-- 
Cory Quammen
Staff R Engineer
Kitware, Inc.
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


[Paraview] Writer plugin with selection of data arrays to output

2017-01-30 Thread Sergey Alexandrov
Hi,

I am trying to implement a sink algorithm (writer) to output point clouds
in my custom format. The points may have multiple data
arrays, and the writer should provide the user with an option to select
which of these arrays are to be output.

Unfortunately, I am not able to find any wiki pages or articles that
explain how to implement such a writer. Also, I do not find any
existing writers with this functionality. The most similar things I found
are:

1) AMR base particles reader
.
It provides a facility to select which data arrays are to be read from a
file. Basically, when the user
sets the filename, the reader loads the meta-information about available
arrays from the file, and then these are displayed in
ParaView properties panel. The user can tick the arrays he wants and press
"Apply" to read. I can not figure out how to apply this
in my writer, because the only extension point for writers is the
WriteData() function. It is called after the user has pressed the
"Save" button, which is too late. In fact, I want to "inject" some code
between the moment the user chose the output filename (and
hence the writer to use), and the moment a dialog window with the
properties of the writer is shown.

2) Wiki page on writing readers
.
There is an example how make a drop-down list to select which input array
to process. Perhaps
I could add this to the writer, however it does seem to support only a
single array choice, whereas I need multiple.

I would be very grateful for suggestions on how to implement the
functionality I need. Examples of existing readers would be
great. Or if there is definitely no "official" clean way to implement this,
please also let me know.

Cheers,
Sergey
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Writer plugin?

2015-01-29 Thread Biddiscombe, John A.
David

I used to make my writers the same as filters and even allow them to shallow 
copy their input to the output. Then in paraview they can appear in the filters 
menu and can be inserted in the middle of a pipeline and each time a render is 
activated, the writer would be triggered. (I used it for saving particles out 
from animations of advected flows). (you can check if the timestep has changed 
or other stuff is different and skip writes if necessary).

Adding the writer as a filter is an easy option!

JB

-Original Message-
From: ParaView [mailto:paraview-boun...@paraview.org] On Behalf Of David 
Thompson
Sent: 28 January 2015 17:35
To: ParaView
Subject: [Paraview] Writer plugin?

Hi all,

I have a ParaView plugin that contains a new writer which I would like to 
expose. However, while the plugin does properly expose a new view and 
representation, the writer does not appear to get added (when I try to save a 
vtkTable such as a statistics filter output, it doesn't appear as an option).

1. Is there any documentation for adding writers in plugins? This page has a 
comment or two but doesn't appear complete:

http://www.paraview.org/Wiki/ParaView/Plugin_HowTo

2. If you're willing to look over the XML, I've attached it below. See any 
mistakes?

Thanks,
David

ServerManagerConfiguration
  !-- Other proxy groups for views and representations here --

  ProxyGroup name=writers
WriterProxy
  class=vtkPJSONTableWriter
  name=PJSONTableWriter
  Documentation
Write tabular data to a JSON file.
  /Documentation
  InputProperty
command=SetInputConnection
name=Input
DataTypeDomain
  composite_data_supported=0
  name=input_type
  DataType value=vtkTable/
/DataTypeDomain
DocumentationThe input filter/source whose output dataset is to
written to the file./Documentation
  /InputProperty
  Hints
WriterFactory extensions=json file_description=JSON tabular data /
  /Hints
/WriterProxy

  /ProxyGroup
/ServerManagerConfiguration

___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Writer plugin?

2015-01-29 Thread David Thompson
Hi John,

 I used to make my writers the same as filters ...
 Adding the writer as a filter is an easy option!

Thanks! Changing the ProxyGroup to filters and the WriterProxy element to a 
SourceProxy seems to have worked. I still want to understand why I can't expose 
it as a writer, but at least I can move on to the actual work.

David
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Writer plugin?

2015-01-29 Thread David Thompson
Hi David

   InputProperty name=Input command=SetInputConnection
 ProxyGroupDomain name=groups
   Group name=sources/
   Group name=filters/
 /ProxyGroupDomain
 
 ?

Nope.

Thanks,
David

___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Writer plugin?

2015-01-29 Thread David E DeMarle
  InputProperty name=Input command=SetInputConnection
ProxyGroupDomain name=groups
  Group name=sources/
  Group name=filters/
/ProxyGroupDomain

?

David E DeMarle
Kitware, Inc.
RD Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909

On Thu, Jan 29, 2015 at 7:13 AM, Biddiscombe, John A. biddi...@cscs.ch
wrote:

 David

 I used to make my writers the same as filters and even allow them to
 shallow copy their input to the output. Then in paraview they can appear in
 the filters menu and can be inserted in the middle of a pipeline and each
 time a render is activated, the writer would be triggered. (I used it for
 saving particles out from animations of advected flows). (you can check if
 the timestep has changed or other stuff is different and skip writes if
 necessary).

 Adding the writer as a filter is an easy option!

 JB

 -Original Message-
 From: ParaView [mailto:paraview-boun...@paraview.org] On Behalf Of David
 Thompson
 Sent: 28 January 2015 17:35
 To: ParaView
 Subject: [Paraview] Writer plugin?

 Hi all,

 I have a ParaView plugin that contains a new writer which I would like to
 expose. However, while the plugin does properly expose a new view and
 representation, the writer does not appear to get added (when I try to save
 a vtkTable such as a statistics filter output, it doesn't appear as an
 option).

 1. Is there any documentation for adding writers in plugins? This page has
 a comment or two but doesn't appear complete:

 http://www.paraview.org/Wiki/ParaView/Plugin_HowTo

 2. If you're willing to look over the XML, I've attached it below. See any
 mistakes?

 Thanks,
 David

 ServerManagerConfiguration
   !-- Other proxy groups for views and representations here --

   ProxyGroup name=writers
 WriterProxy
   class=vtkPJSONTableWriter
   name=PJSONTableWriter
   Documentation
 Write tabular data to a JSON file.
   /Documentation
   InputProperty
 command=SetInputConnection
 name=Input
 DataTypeDomain
   composite_data_supported=0
   name=input_type
   DataType value=vtkTable/
 /DataTypeDomain
 DocumentationThe input filter/source whose output dataset is to
 written to the file./Documentation
   /InputProperty
   Hints
 WriterFactory extensions=json file_description=JSON tabular
 data /
   /Hints
 /WriterProxy

   /ProxyGroup
 /ServerManagerConfiguration

 ___
 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

 Search the list archives at: http://markmail.org/search/?q=ParaView

 Follow this link to subscribe/unsubscribe:
 http://public.kitware.com/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

 Search the list archives at: http://markmail.org/search/?q=ParaView

 Follow this link to subscribe/unsubscribe:
 http://public.kitware.com/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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Writer plugin?

2015-01-28 Thread David Thompson
Hi Burlen,

 The WriterProxy may have a special file_name_method attribute that needs to 
 be set. I'm not sure if that's required, optional, or long since obsolete 
 since I haven't used our plugin in quite a while.

I did see the file_name_method (and supports_parallel and parallel_only) 
attribute, but not all of the writers have it. When I add it, nothing happens.

Thanks,
David

 
 13   WriterProxy name=vtkSQBOVWriter
 14 class=vtkSQBOVWriter
 15 file_name_method=SetFileName
 16 supports_parallel=1
 
 On 1/28/2015 8:54 AM, David Thompson wrote:
 Hi Andy,
 
 I think you may be missing the FileName property. I thought that PV looked 
 for that attribute to know that it should be classified as a writer. Also, 
 you'll want to hide that property.
 Adding the FileName property and hints did not work.
 
  Thanks,
  David
 
 So:
   StringVectorProperty name=FileName
 command=SetFileName
 number_of_elements=1
 label=File Name
 Documentation
   The file name.
 /Documentation
   /StringVectorProperty
 
 
 and:
   Hints
 Property name=Input show=0/
 Property name=FileName show=0/
 WriterFactory extensions=json file_description=JSON tabular 
 data /
   /Hints
 
 
 
 
 On Wed, Jan 28, 2015 at 11:34 AM, David Thompson 
 david.thomp...@kitware.com wrote:
 Hi all,
 
 I have a ParaView plugin that contains a new writer which I would like to 
 expose. However, while the plugin does properly expose a new view and 
 representation, the writer does not appear to get added (when I try to save 
 a vtkTable such as a statistics filter output, it doesn't appear as an 
 option).
 
 1. Is there any documentation for adding writers in plugins? This page has 
 a comment or two but doesn't appear complete:
 
 http://www.paraview.org/Wiki/ParaView/Plugin_HowTo
 
 2. If you're willing to look over the XML, I've attached it below. See any 
 mistakes?
 
 Thanks,
 David
 
 ServerManagerConfiguration
   !-- Other proxy groups for views and representations here --
 
   ProxyGroup name=writers
 WriterProxy
   class=vtkPJSONTableWriter
   name=PJSONTableWriter
   Documentation
 Write tabular data to a JSON file.
   /Documentation
   InputProperty
 command=SetInputConnection
 name=Input
 DataTypeDomain
   composite_data_supported=0
   name=input_type
   DataType value=vtkTable/
 /DataTypeDomain
 DocumentationThe input filter/source whose output dataset is to
 written to the file./Documentation
   /InputProperty
   Hints
 WriterFactory extensions=json file_description=JSON tabular 
 data /
   /Hints
 /WriterProxy
 
   /ProxyGroup
 /ServerManagerConfiguration
 
 ___
 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
 
 Search the list archives at: http://markmail.org/search/?q=ParaView
 
 Follow this link to subscribe/unsubscribe:
 http://public.kitware.com/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
 
 Search the list archives at: http://markmail.org/search/?q=ParaView
 
 Follow this link to subscribe/unsubscribe:
 http://public.kitware.com/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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Writer plugin?

2015-01-28 Thread Burlen Loring
The WriterProxy may have a special file_name_method attribute that 
needs to be set. I'm not sure if that's required, optional, or long 
since obsolete since I haven't used our plugin in quite a while.


 13   WriterProxy name=vtkSQBOVWriter
 14 class=vtkSQBOVWriter
 15 file_name_method=SetFileName
 16 supports_parallel=1

On 1/28/2015 8:54 AM, David Thompson wrote:

Hi Andy,


I think you may be missing the FileName property. I thought that PV looked for 
that attribute to know that it should be classified as a writer. Also, you'll 
want to hide that property.

Adding the FileName property and hints did not work.

Thanks,
David


So:
   StringVectorProperty name=FileName
 command=SetFileName
 number_of_elements=1
 label=File Name
 Documentation
   The file name.
 /Documentation
   /StringVectorProperty


and:
   Hints
 Property name=Input show=0/
 Property name=FileName show=0/
 WriterFactory extensions=json file_description=JSON tabular data 
/
   /Hints




On Wed, Jan 28, 2015 at 11:34 AM, David Thompson david.thomp...@kitware.com 
wrote:
Hi all,

I have a ParaView plugin that contains a new writer which I would like to 
expose. However, while the plugin does properly expose a new view and 
representation, the writer does not appear to get added (when I try to save a 
vtkTable such as a statistics filter output, it doesn't appear as an option).

1. Is there any documentation for adding writers in plugins? This page has a 
comment or two but doesn't appear complete:

 http://www.paraview.org/Wiki/ParaView/Plugin_HowTo

2. If you're willing to look over the XML, I've attached it below. See any 
mistakes?

 Thanks,
 David

ServerManagerConfiguration
   !-- Other proxy groups for views and representations here --

   ProxyGroup name=writers
 WriterProxy
   class=vtkPJSONTableWriter
   name=PJSONTableWriter
   Documentation
 Write tabular data to a JSON file.
   /Documentation
   InputProperty
 command=SetInputConnection
 name=Input
 DataTypeDomain
   composite_data_supported=0
   name=input_type
   DataType value=vtkTable/
 /DataTypeDomain
 DocumentationThe input filter/source whose output dataset is to
 written to the file./Documentation
   /InputProperty
   Hints
 WriterFactory extensions=json file_description=JSON tabular data 
/
   /Hints
 /WriterProxy

   /ProxyGroup
/ServerManagerConfiguration

___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


[Paraview] Writer plugin?

2015-01-28 Thread David Thompson
Hi all,

I have a ParaView plugin that contains a new writer which I would like to 
expose. However, while the plugin does properly expose a new view and 
representation, the writer does not appear to get added (when I try to save a 
vtkTable such as a statistics filter output, it doesn't appear as an option).

1. Is there any documentation for adding writers in plugins? This page has a 
comment or two but doesn't appear complete:

http://www.paraview.org/Wiki/ParaView/Plugin_HowTo

2. If you're willing to look over the XML, I've attached it below. See any 
mistakes?

Thanks,
David

ServerManagerConfiguration
  !-- Other proxy groups for views and representations here --

  ProxyGroup name=writers
WriterProxy
  class=vtkPJSONTableWriter
  name=PJSONTableWriter
  Documentation
Write tabular data to a JSON file.
  /Documentation
  InputProperty
command=SetInputConnection
name=Input
DataTypeDomain
  composite_data_supported=0
  name=input_type
  DataType value=vtkTable/
/DataTypeDomain
DocumentationThe input filter/source whose output dataset is to
written to the file./Documentation
  /InputProperty
  Hints
WriterFactory extensions=json file_description=JSON tabular data /
  /Hints
/WriterProxy

  /ProxyGroup
/ServerManagerConfiguration

___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Writer plugin?

2015-01-28 Thread Andy Bauer
I think you may be missing the FileName property. I thought that PV looked
for that attribute to know that it should be classified as a writer. Also,
you'll want to hide that property.

So:
  StringVectorProperty name=FileName
command=SetFileName
number_of_elements=1
label=File Name
Documentation
  The file name.
/Documentation
  /StringVectorProperty


and:
  Hints
Property name=Input show=0/
Property name=FileName show=0/
WriterFactory extensions=json file_description=JSON tabular
data /
  /Hints




On Wed, Jan 28, 2015 at 11:34 AM, David Thompson david.thomp...@kitware.com
 wrote:

 Hi all,

 I have a ParaView plugin that contains a new writer which I would like to
 expose. However, while the plugin does properly expose a new view and
 representation, the writer does not appear to get added (when I try to save
 a vtkTable such as a statistics filter output, it doesn't appear as an
 option).

 1. Is there any documentation for adding writers in plugins? This page has
 a comment or two but doesn't appear complete:

 http://www.paraview.org/Wiki/ParaView/Plugin_HowTo

 2. If you're willing to look over the XML, I've attached it below. See any
 mistakes?

 Thanks,
 David

 ServerManagerConfiguration
   !-- Other proxy groups for views and representations here --

   ProxyGroup name=writers
 WriterProxy
   class=vtkPJSONTableWriter
   name=PJSONTableWriter
   Documentation
 Write tabular data to a JSON file.
   /Documentation
   InputProperty
 command=SetInputConnection
 name=Input
 DataTypeDomain
   composite_data_supported=0
   name=input_type
   DataType value=vtkTable/
 /DataTypeDomain
 DocumentationThe input filter/source whose output dataset is to
 written to the file./Documentation
   /InputProperty
   Hints
 WriterFactory extensions=json file_description=JSON tabular
 data /
   /Hints
 /WriterProxy

   /ProxyGroup
 /ServerManagerConfiguration

 ___
 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

 Search the list archives at: http://markmail.org/search/?q=ParaView

 Follow this link to subscribe/unsubscribe:
 http://public.kitware.com/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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Writer plugin?

2015-01-28 Thread David Thompson
Hi Andy,

 I think you may be missing the FileName property. I thought that PV looked 
 for that attribute to know that it should be classified as a writer. Also, 
 you'll want to hide that property.

Adding the FileName property and hints did not work.

Thanks,
David

 So:
   StringVectorProperty name=FileName
 command=SetFileName
 number_of_elements=1
 label=File Name
 Documentation
   The file name.
 /Documentation
   /StringVectorProperty
 
 
 and:
   Hints
 Property name=Input show=0/
 Property name=FileName show=0/
 WriterFactory extensions=json file_description=JSON tabular data 
 /
   /Hints
 
 
 
 
 On Wed, Jan 28, 2015 at 11:34 AM, David Thompson david.thomp...@kitware.com 
 wrote:
 Hi all,
 
 I have a ParaView plugin that contains a new writer which I would like to 
 expose. However, while the plugin does properly expose a new view and 
 representation, the writer does not appear to get added (when I try to save a 
 vtkTable such as a statistics filter output, it doesn't appear as an option).
 
 1. Is there any documentation for adding writers in plugins? This page has a 
 comment or two but doesn't appear complete:
 
 http://www.paraview.org/Wiki/ParaView/Plugin_HowTo
 
 2. If you're willing to look over the XML, I've attached it below. See any 
 mistakes?
 
 Thanks,
 David
 
 ServerManagerConfiguration
   !-- Other proxy groups for views and representations here --
 
   ProxyGroup name=writers
 WriterProxy
   class=vtkPJSONTableWriter
   name=PJSONTableWriter
   Documentation
 Write tabular data to a JSON file.
   /Documentation
   InputProperty
 command=SetInputConnection
 name=Input
 DataTypeDomain
   composite_data_supported=0
   name=input_type
   DataType value=vtkTable/
 /DataTypeDomain
 DocumentationThe input filter/source whose output dataset is to
 written to the file./Documentation
   /InputProperty
   Hints
 WriterFactory extensions=json file_description=JSON tabular data 
 /
   /Hints
 /WriterProxy
 
   /ProxyGroup
 /ServerManagerConfiguration
 
 ___
 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
 
 Search the list archives at: http://markmail.org/search/?q=ParaView
 
 Follow this link to subscribe/unsubscribe:
 http://public.kitware.com/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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


[Paraview] Writer plugin C++ code example

2012-03-25 Thread Nicholas Yue

Hi,

I checked out from the git repository of paraview and build with 
PARAVIEW_INSTALL_DEVELOPMENT=ON


While looking at the plugins directory

some-path/Paraview_git/Examples/Plugins/Writer

I can see the directory contains the XML files for writer plugin 
but no C++ code to illustrate how one should write the plugins in C++


On closer examination, the CMakeLists talks about building reader

My interest is to write geometry information out for rendering 
using and external software e.g. RenderMan.


Any pointers or URL I can start looking at ?

Regards

--
Nicholas Yue
Graphics - RenderMan, Visualization, OpenGL, HDF5
Custom Dev - C++ porting, OSX, Linux, Windows
Management - Recruitment, career management
http://www.proceduralinsight.com/
http://au.linkedin.com/in/nicholasyue

___
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


Re: [Paraview] Writer Plugin cannot be loaded

2009-01-17 Thread Natalie Happenhofer

Well,
I tried everything, changing the cmake_install_prefix and so on, and lastly I 
checked  the CMakeLists.txt file  which took care of the Plugin and there I 
found a mistake.. a library name spelled incorrectly. I changed that and now I 
get
linker errors which I do not know how to get rid of:

No rule to make target `/usr/local/unpackaged/libcommon.so', needed by 
`bin/libVdcWriter.so'.  Stop.

That libcommon.so is a library which is already build, but not by paraview, and 
I want it to be linked to my code. Here
is the CMakeLists.txt:

INCLUDE(${ParaView_SOURCE_DIR}/CMake/ParaViewPlugins.cmake)

INCLUDE_DIRECTORIES(
  ${VTK_INCLUDE_DIR}
  ${PARAVIEW_INCLUDE_DIRS}
  ${VTKEXPAT_SOURCE_DIR}
 )

FIND_PACKAGE(Qt4)
INCLUDE(${QT_USE_FILE})

FIND_PACKAGE(ParaView REQUIRED)
 INCLUDE(${PARAVIEW_USE_FILE})

FIND_PACKAGE(VDC REQUIRED)
INCLUDE_DIRECTORIES(${VDC_INCLUDE_DIR})

FIND_PACKAGE(NETCDF REQUIRED)
INCLUDE_DIRECTORIES(${NETCDF_INCLUDE_DIR})

IF (PARAVIEW_BUILD_QT_GUI)
  ADD_PARAVIEW_PLUGIN(VdcWriter 1.0
GUI_RESOURCE_FILES GUIVdcWriter.xml
SERVER_MANAGER_XML SMVdcWriter.xml
SERVER_MANAGER_SOURCES vtkVdcWriter.cxx
)
ELSE (PARAVIEW_BUILD_QT_GUI)
  ADD_PARAVIEW_PLUGIN(VdcWriter 1.0
SERVER_MANAGER_XML SMVdcWriter.xml
SERVER_MANAGER_SOURCES vtkVdcWriter.cxx
)
ENDIF (PARAVIEW_BUILD_QT_GUI)

TARGET_LINK_LIBRARIES(VdcWriter ${EXPAT_LIBRARY} ${NETCDF_LIBRARY} 
${COMMON_LIBRARY} ${VDF_LIBRARY}

I believe that target_link_libraries command is not correct, but how can I link 
all these libraries to my code?

thx
Natalie



 Date: Thu, 15 Jan 2009 10:15:44 -0500
 From: burlen.lor...@kitware.com
 To: natalieh...@hotmail.com
 CC: paraview@paraview.org
 Subject: Re: [Paraview] Writer Plugin cannot be loaded
 
 Natalie Happenhofer wrote:
  Hi!
 
  I have written a Writer-Plugin and after (at last) successfully 
  compiling and linking it within Paraview, I tried to load it with the 
  PluginManager,
  and in the Paraview/build/bin directory I found my libVdcWriter.so, 
  but loading fails. I get the error message: libVdcWriter.so: no such 
  file or directory
  But the file is in the build/bin - directory, the 
  plugin-manager-browser found it!
  Does anyone know what could be the problem here? Is it possible that I 
  missed to link something, any library from paraview so that this 
  plugin can be loaded?
 
 It sounds like the dynamic linker/loader , ld, isn't finding your 
 libVdcWriter.so library. first you can verify by running ldd on your 
 plugin and searching for not found. like this:
 
 ldd /path/to/libMyPlugin.so | grep not found
 
 This will list the libraries that are not found. There are a number of 
 ways to remedy such an issue. The easiest (especially for debugging 
 purposes) is to use LD_LIBRARY_PATH on the command line to add locations 
 to ld's search path. You know where the missing library is located then 
 you can run paraview like this:
 
 LD_LIBRARY_PATH=/path/to/missing/lib/folder /path/to/paraview
 
 or you can export this variable in your shell.
 
 
  and by the way, a stupid question: linux .so - files are equivalent to 
  windows .dll-files, true? so while I´m loading my plugins as .dlls in 
  windows, with linux they have the ending .so, right?
 
  thx a lot,
  Natalie Happenhofer
 
 
 
  
  ¡Descúbrelo! ¿Qué puedes hacer con el nuevo Windows Live? 
  http://www.microsoft.com/latam/windows/windowslive/
  
 
  ___
  ParaView mailing list
  ParaView@paraview.org
  http://www.paraview.org/mailman/listinfo/paraview

 
 
 -- 
 Burlen Loring
 Kitware, Inc.
 RD Engineer
 28 Corporate Drive
 Clifton Park, NY 12065-8662
 Phone: 518-371-3971 x137
 

_
Descubre todas las formas en que puedes estar en contacto con amigos y 
familiares.
http://www.microsoft.com/latam/windows/windowslive/___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Writer Plugin cannot be loaded

2009-01-17 Thread Michael Jackson

You can try the following:

SET(PARAVIEW_ADDITIONAL_LIBRARIES
 ${PARAVIEW_ADDITIONAL_LIBRARIES}
 ${vtkexpat} ${NETCDF_LIBRARY} ${COMMON_LIBRARY} ${VDF_LIBRARY})

BEFORE the line

IF (PARAVIEW_BUILD_QT_GUI)


Also ParaView provides its own expat library which you may be able to  
use instead of your own or a system one. vtkexpat


Hope that helps
_
Mike Jackson  mike.jack...@bluequartz.net
BlueQuartz Softwarewww.bluequartz.net
Principal Software Engineer  Dayton, Ohio



On Jan 17, 2009, at 8:53 AM, Natalie Happenhofer wrote:


Well,
I tried everything, changing the cmake_install_prefix and so on, and  
lastly I checked  the CMakeLists.txt file  which took care of the  
Plugin and there I found a mistake.. a library name spelled  
incorrectly. I changed that and now I get

linker errors which I do not know how to get rid of:

No rule to make target `/usr/local/unpackaged/libcommon.so', needed  
by `bin/libVdcWriter.so'.  Stop.


That libcommon.so is a library which is already build, but not by  
paraview, and I want it to be linked to my code. Here

is the CMakeLists.txt:

INCLUDE(${ParaView_SOURCE_DIR}/CMake/ParaViewPlugins.cmake)

INCLUDE_DIRECTORIES(
  ${VTK_INCLUDE_DIR}
  ${PARAVIEW_INCLUDE_DIRS}
  ${VTKEXPAT_SOURCE_DIR}
 )

FIND_PACKAGE(Qt4)
INCLUDE(${QT_USE_FILE})

FIND_PACKAGE(ParaView REQUIRED)
 INCLUDE(${PARAVIEW_USE_FILE})

FIND_PACKAGE(VDC REQUIRED)
INCLUDE_DIRECTORIES(${VDC_INCLUDE_DIR})

FIND_PACKAGE(NETCDF REQUIRED)
INCLUDE_DIRECTORIES(${NETCDF_INCLUDE_DIR})

IF (PARAVIEW_BUILD_QT_GUI)
  ADD_PARAVIEW_PLUGIN(VdcWriter 1.0
GUI_RESOURCE_FILES GUIVdcWriter.xml
SERVER_MANAGER_XML SMVdcWriter.xml
SERVER_MANAGER_SOURCES vtkVdcWriter.cxx
)
ELSE (PARAVIEW_BUILD_QT_GUI)
  ADD_PARAVIEW_PLUGIN(VdcWriter 1.0
SERVER_MANAGER_XML SMVdcWriter.xml
SERVER_MANAGER_SOURCES vtkVdcWriter.cxx
)
ENDIF (PARAVIEW_BUILD_QT_GUI)

TARGET_LINK_LIBRARIES(VdcWriter ${EXPAT_LIBRARY} ${NETCDF_LIBRARY} $ 
{COMMON_LIBRARY} ${VDF_LIBRARY}


I believe that target_link_libraries command is not correct, but how  
can I link all these libraries to my code?


thx
Natalie



 Date: Thu, 15 Jan 2009 10:15:44 -0500
 From: burlen.lor...@kitware.com
 To: natalieh...@hotmail.com
 CC: paraview@paraview.org
 Subject: Re: [Paraview] Writer Plugin cannot be loaded

 Natalie Happenhofer wrote:
  Hi!
 
  I have written a Writer-Plugin and after (at last) successfully
  compiling and linking it within Paraview, I tried to load it  
with the

  PluginManager,
  and in the Paraview/build/bin directory I found my  
libVdcWriter.so,
  but loading fails. I get the error message: libVdcWriter.so: no  
such

  file or directory
  But the file is in the build/bin - directory, the
  plugin-manager-browser found it!
  Does anyone know what could be the problem here? Is it possible  
that I

  missed to link something, any library from paraview so that this
  plugin can be loaded?

 It sounds like the dynamic linker/loader , ld, isn't finding your
 libVdcWriter.so library. first you can verify by running ldd on your
 plugin and searching for not found. like this:

 ldd /path/to/libMyPlugin.so | grep not found

 This will list the libraries that are not found. There are a  
number of

 ways to remedy such an issue. The easiest (especially for debugging
 purposes) is to use LD_LIBRARY_PATH on the command line to add  
locations
 to ld's search path. You know where the missing library is located  
then

 you can run paraview like this:

 LD_LIBRARY_PATH=/path/to/missing/lib/folder /path/to/paraview

 or you can export this variable in your shell.

 
  and by the way, a stupid question: linux .so - files are  
equivalent to
  windows .dll-files, true? so while I´m loading my plugins  
as .dlls in

  windows, with linux they have the ending .so, right?
 
  thx a lot,
  Natalie Happenhofer
 
 
 
   


  ¡Descúbrelo! ¿Qué puedes hacer con el nuevo Windows Live?
  http://www.microsoft.com/latam/windows/windowslive/
   


 
  ___
  ParaView mailing list
  ParaView@paraview.org
  http://www.paraview.org/mailman/listinfo/paraview
 


 --
 Burlen Loring
 Kitware, Inc.
 RD Engineer
 28 Corporate Drive
 Clifton Park, NY 12065-8662
 Phone: 518-371-3971 x137


con amigos y familiares. Descubre todas las formas en que puedes  
estar en contacto___

ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview


___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Writer Plugin cannot be loaded

2009-01-17 Thread Natalie Happenhofer

Ok, changing the linking order fixed it. Now I can load the plugin, thanks!
Natalie

_
¿Quieres saber cómo va a estar el clima mañana? Ingresa ahora a MSN.
http://tiempo.latam.msn.com/ ___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Writer Plugin cannot be loaded

2009-01-15 Thread Burlen Loring

Natalie Happenhofer wrote:

Hi!

I have written a Writer-Plugin and after (at last) successfully 
compiling and linking it within Paraview, I tried to load it with the 
PluginManager,
and in the Paraview/build/bin directory I found my libVdcWriter.so, 
but loading fails. I get the error message: libVdcWriter.so: no such 
file or directory
But the file is in the build/bin - directory, the 
plugin-manager-browser found it!
Does anyone know what could be the problem here? Is it possible that I 
missed to link something, any library from paraview so that this 
plugin can be loaded?


It sounds like the dynamic linker/loader , ld, isn't finding your 
libVdcWriter.so library. first you can verify by running ldd on your 
plugin and searching for not found. like this:


ldd /path/to/libMyPlugin.so | grep not found

This will list the libraries that are not found. There are a number of 
ways to remedy such an issue. The easiest (especially for debugging 
purposes) is to use LD_LIBRARY_PATH on the command line to add locations 
to ld's search path. You know where the missing library is located then 
you can run paraview like this:


LD_LIBRARY_PATH=/path/to/missing/lib/folder /path/to/paraview

or you can export this variable in your shell.



and by the way, a stupid question: linux .so - files are equivalent to 
windows .dll-files, true? so while I´m loading my plugins as .dlls in 
windows, with linux they have the ending .so, right?


thx a lot,
Natalie Happenhofer




¡Descúbrelo! ¿Qué puedes hacer con el nuevo Windows Live? 
http://www.microsoft.com/latam/windows/windowslive/



___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview
  



--
Burlen Loring
Kitware, Inc.
RD Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x137

___
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview