[Paraview] Help with Programmable Filters

2016-04-15 Thread Scott, W Alan
>From a user:



Hi
I'm trying to get started with programmable filters and am having a little 
trouble putting it together from the material in the paraview user guide. I 
have a few questions below:

1.   Is there any documentation generally describing the input and output 
data objects that form the programmable filter API?

a.   I was able to get some basic info on these objects by executing "print 
dir(inputs[0])" for example in the program. filter window, but if there is 
documentation somewhere for each of the object types, that would be useful...

2.   It appears that the user guide suggested methods for accessing the 
data in the input objects (input.Points, input.PointData['Name'], etc) produce 
vtk data objects of some form. These can be indexed similar to numpy arrays, 
but seem to behave differently in other cases. For instance, I couldn't figure 
how to reshape these arrays (numpy.reshape fails as the vtk array objects don't 
have any shape attribute defined...). Is there any way to get the input data 
into actual numpy array form? This would be helpful for direct reuse of 
existing scripts designed to work on numpy arrays...

3.   I was attempting to write a simple script that does some calcs on a 
block structured input dataset (input comes in as vtkCompositeDataSet) and 
writes out some reduced data to a table (I chose vtkTable as the output 
format). Through inspection of the output object, I found that I could add new 
rows (which appear in paraview as columns...) of data using 
output.RowData.append(DATA,NAME). However, DATA needs to be some basic python 
sequence type or numpy array, and the vtk array types created by the input data 
access methods (input.Points etc...) don't work... So again here, if there is a 
good way to convert the data held in the vtk array types to numpy array types, 
that would be useful here...

Thanks,
Jon




Thanks,

Alan
___
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] couple of issues related with co-processing ...

2016-04-15 Thread Andy Bauer
I haven't seen issues like that. Can you share the Catalyst script that
fails?

On Fri, Apr 15, 2016 at 5:02 AM, Ufuk Utku Turuncoglu (BE) <
u.utku.turunco...@be.itu.edu.tr> wrote:

> Hi Andy,
>
> As you suggested in your previous mail, i used allinputsgridwriter.py
> script to write all the available fields as multiblock dataset and i
> created co-processing scripts using this dataset. Now, i could handle
> multiple 3d fields but i have still problem in the combination of contour
> and vector visualization. In this case, the code hangs in same way that i
> mentioned in my initial mail.
>
> So, to find the source of the problem i tried different pipelines and
> check the co-processing,
>
> 1 - A pipeline with only Glyph filter. In this case, i set Gradients as
> Vectors in Active Attributes section in the properties window. The
> co-processing is working without any problem in this case.
>
> 2 - I used Calculator Filter to compute vector using u*iHat+v*jHat
> equation along with Glyph to produce vector field visualization. In this
> case, the pipeline is working without any error under co-processing.
>
> 3 - A visualization pipeline with an iso-surface which is colored by
> different variable. It works also.
>
> 4 - The combination of step 2 and 3. In this case, i used same
> visualization pipeline with 2 but in this case, i add a Contour filter to
> create an iso-surface for a scalar 3d field (same as step 3). The
> co-processing code hands with white screen and does not produce the output.
>
> So, it seems that the combination of Contour and vector visualization
> affects the co-processing. Anyway, do you have similar experience in
> co-processing?
>
> Regards,
>
> --ufuk
>
> On 13/04/16 16:24, Andy Bauer wrote:
>
> Hi Ufuk,
>
> I would suggest testing out some of the Catalyst examples which are in the
> source code under the Examples/Catalyst subdirectory. I would also suggest
> creating Catalyst scripts from data sets generated through Catalyst output
> instead of the NetCDF files. There are two example scripts for this in
> Examples/Catalyst/SampleScripts that you can use for this.
>
> As for the grid names for the axes, this may be a bug in ParaView. I'll
> look into that.
>
> Best,
> Andy
>
> On Wed, Apr 13, 2016 at 8:44 AM, Ufuk Utku Turuncoglu (BE) <
> u.utku.turunco...@be.itu.edu.tr> wrote:
>
>> Hi,
>>
>> I am using co-processing (Catalyst) and i have couple of issues about the
>> behavior of the co-processing module.
>>
>> 1 - If i send multiple 2d variable or single 3d variable to the
>> co-processor, my custom code is working without any problem and produces
>> desired output. On the other hand, the code hangs with multiple 3d variable
>> (it basically opens a square white window and waits, see the attached
>> screenshot). I have no idea about the problem because the terminal does not
>> produces any output. I could install the ParaView in debug mode and it
>> might help?
>>
>> 2 - The axis names (edited by Edit Axes Grid section in Properties
>> window) are not written to the produced png file when the visualization
>> pipeline is driven by co-processing but it looks fine under ParaView.
>>
>> 3 - When i trying to use volume rendering (single 3d field) along with
>> co-processing, the code gives following error
>>
>> ERROR: In
>> /opt/progs/paraview-5.0.0/src/VTK/Common/ExecutionModel/vtkCompositeDataPipeline.cxx,
>> line 171
>> vtkPVDataRepresentationPipeline (0x7fea05244010): Can not execute simple
>> alorithm without output ports
>> ...
>> ...
>> ERROR: In
>> /opt/progs/paraview-5.0.0/src/VTK/Filters/Parallel/vtkPKdTree.cxx, line 296
>> vtkPKdTree (0x7fea04f42840): (process 0) NumberOfDatasets = 0, cannot
>> determine volume bounds.
>>
>> I could produce iso-surface with same code without any problem. The
>> volume rendering is also working under ParaView.
>>
>> The last question might be related with the grid definition in the
>> co-processing because i am using single netcdf dataset to create
>> visualization scripts (python) under ParaView but in the model code
>> (co-processing) the dataset is defined as MultiBlockDataSet due to the
>> parallel nature of the simulation code.
>>
>> Regards,
>>
>> --ufuk
>>
>> ___
>> 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/Par

Re: [Paraview] Changing Opacity with Coordinates

2016-04-15 Thread Utkarsh Ayachit
I am assuming you want to change opacity using Z and color using some
other array -- if that's the case, I am afraid that's not supported
currently. You can only change the color and opacity using the same
array.

Utkarsh

On Fri, Apr 15, 2016 at 5:51 AM, Fastl, Thomas  wrote:
> Hello Community,
>
> I've imported medical DICOM data into ParaView and visualized them in
> 'Volume' mode (rendering takes a really long time and around a massive
> amount of memory). I want to change the visibility/opacity of the medical
> image structure with the z-coordinate (apply and alpha-channel with full
> visibility at the bottom and no visibility at the top), is there a way to do
> that in ParaView? Thanks!
>
> Best wishes, Tom
>
>
> ___
> 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] Changing Opacity with Coordinates

2016-04-15 Thread Fastl, Thomas
Hello Community,

I've imported medical DICOM data into ParaView and visualized them in 'Volume' 
mode (rendering takes a really long time and around a massive amount of 
memory). I want to change the visibility/opacity of the medical image structure 
with the z-coordinate (apply and alpha-channel with full visibility at the 
bottom and no visibility at the top), is there a way to do that in ParaView? 
Thanks!

Best wishes, Tom

___
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] couple of issues related with co-processing ...

2016-04-15 Thread Ufuk Utku Turuncoglu (BE)

Hi Andy,

As you suggested in your previous mail, i used allinputsgridwriter.py 
script to write all the available fields as multiblock dataset and i 
created co-processing scripts using this dataset. Now, i could handle 
multiple 3d fields but i have still problem in the combination of 
contour and vector visualization. In this case, the code hangs in same 
way that i mentioned in my initial mail.


So, to find the source of the problem i tried different pipelines and 
check the co-processing,


1 - A pipeline with only Glyph filter. In this case, i set Gradients as 
Vectors in Active Attributes section in the properties window. The 
co-processing is working without any problem in this case.


2 - I used Calculator Filter to compute vector using u*iHat+v*jHat 
equation along with Glyph to produce vector field visualization. In this 
case, the pipeline is working without any error under co-processing.


3 - A visualization pipeline with an iso-surface which is colored by 
different variable. It works also.


4 - The combination of step 2 and 3. In this case, i used same 
visualization pipeline with 2 but in this case, i add a Contour filter 
to create an iso-surface for a scalar 3d field (same as step 3). The 
co-processing code hands with white screen and does not produce the output.


So, it seems that the combination of Contour and vector visualization 
affects the co-processing. Anyway, do you have similar experience in 
co-processing?


Regards,

--ufuk

On 13/04/16 16:24, Andy Bauer wrote:

Hi Ufuk,

I would suggest testing out some of the Catalyst examples which are in 
the source code under the Examples/Catalyst subdirectory. I would also 
suggest creating Catalyst scripts from data sets generated through 
Catalyst output instead of the NetCDF files. There are two example 
scripts for this in Examples/Catalyst/SampleScripts that you can use 
for this.


As for the grid names for the axes, this may be a bug in ParaView. 
I'll look into that.


Best,
Andy

On Wed, Apr 13, 2016 at 8:44 AM, Ufuk Utku Turuncoglu (BE) 
> wrote:


Hi,

I am using co-processing (Catalyst) and i have couple of issues
about the behavior of the co-processing module.

1 - If i send multiple 2d variable or single 3d variable to the
co-processor, my custom code is working without any problem and
produces desired output. On the other hand, the code hangs with
multiple 3d variable (it basically opens a square white window and
waits, see the attached screenshot). I have no idea about the
problem because the terminal does not produces any output. I could
install the ParaView in debug mode and it might help?

2 - The axis names (edited by Edit Axes Grid section in Properties
window) are not written to the produced png file when the
visualization pipeline is driven by co-processing but it looks
fine under ParaView.

3 - When i trying to use volume rendering (single 3d field) along
with co-processing, the code gives following error

ERROR: In

/opt/progs/paraview-5.0.0/src/VTK/Common/ExecutionModel/vtkCompositeDataPipeline.cxx,
line 171
vtkPVDataRepresentationPipeline (0x7fea05244010): Can not execute
simple alorithm without output ports
...
...
ERROR: In
/opt/progs/paraview-5.0.0/src/VTK/Filters/Parallel/vtkPKdTree.cxx,
line 296
vtkPKdTree (0x7fea04f42840): (process 0) NumberOfDatasets = 0,
cannot determine volume bounds.

I could produce iso-surface with same code without any problem.
The volume rendering is also working under ParaView.

The last question might be related with the grid definition in the
co-processing because i am using single netcdf dataset to create
visualization scripts (python) under ParaView but in the model
code (co-processing) the dataset is defined as MultiBlockDataSet
due to the parallel nature of the simulation code.

Regards,

--ufuk

___
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