Re: [Paraview] [EXT] RE: [EXTERNAL] Calculating cylindrical coordinates

2018-04-27 Thread kenichiro yoshimi
Hi Dennis,

You can calculate cylindrical coordinates by utilizing
vtkCylindricalTransform within the python programmable filter. It is
something like below and faster than numpy.

---
import vtk

input = self.GetInput()
output = self.GetOutput()

transform = vtk.vtkCylindricalTransform()

transformFilter = vtk.vtkTransformFilter()
transformFilter.SetInputData(input)
transformFilter.SetTransform(transform.GetInverse())
transformFilter.Update()

output.ShallowCopy(transformFilter.GetOutput())
---

This converts (x,y,z) coordinates to (r,theta,z) coordinates by GetInverse
method,
where the angles are calculated by the following equation to change range
to [0, 2*pi]:
  theta = pi + atan2(-y, -x).

Regards

2018-04-28 5:25 GMT+09:00 Dennis Conklin :

> Alan,
>
>
>
> Yes, I am calling it many times at the same angular location, but it’s
> tough to know you’re at the same angular location without calculating the
> angle.
>
>
>
> Also, C++ is definitely orders of magnitude quicker, but once I have to
> compile routines into Paravew life gets very complicated.   We barely
> survived compiling for cluster use and I haven’t written C++ for at least
> 20 years.
>
>
>
> So, if possible, I would like a clever external add-on that wouldn’t
> require us to re-compile PV everytime we update our version.   I have
> visions of library errors in my nightmares!
>
>
>
> Dennis
>
>
>
> *From:* Scott, W Alan [mailto:wasc...@sandia.gov]
> *Sent:* Friday, April 27, 2018 4:00 PM
> *To:* Dennis Conklin ; Paraview (
> parav...@paraview.org) 
> *Subject:* [EXT] RE: [EXTERNAL] [Paraview] Calculating cylindrical
> coordinates
>
>
>
>  *CAUTION: *EXTERNAL email. Please think before clicking on any links or
> attachments.
>
>
>
> Are there places on the cylinder you are calling atan2 with the same
> inputs, returning the same data, lots of times?  Alternatively, could you
> calculate this in the simulation, and just add it to the simulation
> output?  I am speculating that a C++ call to atan2 may be faster than numpy?
>
>
>
> Alan
>
>
>
> *From:* ParaView [mailto:paraview-boun...@public.kitware.com
> ] *On Behalf Of *Dennis Conklin
> *Sent:* Friday, April 27, 2018 1:39 PM
> *To:* Paraview (parav...@paraview.org) 
> *Subject:* [EXTERNAL] [Paraview] Calculating cylindrical coordinates
>
>
>
> All,
>
>
>
> If I wanted to run atan2(X,Y) on millions and millions of nodes to
> calculate cylindrical coordinates, but found that numpy.atan2 in a
> Programmable Filter was taking 45 minutes to run,   what should I do to
> make it much faster?
>
>
>
> Thanks for any hints
>
>
>
> 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:
> https://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:
https://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] [EXT] RE: [EXTERNAL] Calculating cylindrical coordinates

2018-04-27 Thread Dennis Conklin
Alan,

Yes, I am calling it many times at the same angular location, but it's tough to 
know you're at the same angular location without calculating the angle.

Also, C++ is definitely orders of magnitude quicker, but once I have to compile 
routines into Paravew life gets very complicated.   We barely survived 
compiling for cluster use and I haven't written C++ for at least 20 years.

So, if possible, I would like a clever external add-on that wouldn't require us 
to re-compile PV everytime we update our version.   I have visions of library 
errors in my nightmares!

Dennis

From: Scott, W Alan [mailto:wasc...@sandia.gov]
Sent: Friday, April 27, 2018 4:00 PM
To: Dennis Conklin ; Paraview 
(parav...@paraview.org) 
Subject: [EXT] RE: [EXTERNAL] [Paraview] Calculating cylindrical coordinates

 CAUTION: EXTERNAL email. Please think before clicking on any links or 
attachments.



Are there places on the cylinder you are calling atan2 with the same inputs, 
returning the same data, lots of times?  Alternatively, could you calculate 
this in the simulation, and just add it to the simulation output?  I am 
speculating that a C++ call to atan2 may be faster than numpy?

Alan

From: ParaView [mailto:paraview-boun...@public.kitware.com] On Behalf Of Dennis 
Conklin
Sent: Friday, April 27, 2018 1:39 PM
To: Paraview (parav...@paraview.org) 
>
Subject: [EXTERNAL] [Paraview] Calculating cylindrical coordinates

All,

If I wanted to run atan2(X,Y) on millions and millions of nodes to calculate 
cylindrical coordinates, but found that numpy.atan2 in a Programmable Filter 
was taking 45 minutes to run,   what should I do to make it much faster?

Thanks for any hints

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:
https://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Volume rendering rectilinear data

2018-04-27 Thread Weiguang Guan

Hi David,

Thanks for confirming it. Does Kitware have a plan to implement volume 
rendering for rectilinear volume? You see the spectrum from 
vtkImageData, to vtkRectilinearGrid, vtkStructuredGrid --- volume 
rendering is implemented on both ends but not for the middle one, which 
is a bit odd to the user.


Best,
Weiguang


On 4/27/2018 12:06 PM, David E DeMarle wrote:

You are correct it will not directly volume render vtkRectilinearGrids.

Use threshold filter (all values) to map to a vtkUnstructuredGrid for 
direct rendering but at a cost of memory explosion.
Apply the resample to image filter to map to vtkImageData for fast 
volume rendering, but at a cost of trading off precision for memory size.



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

On Fri, Apr 27, 2018 at 11:13 AM, Weiguang Guan 
> wrote:


I didn't a test and I'm surprised that Paraview cannot do volume
rendering on rectilinear data. Can someone confirm it or I made a
mistake?

Cheers,
Weiguang

-- 
--

Weiguang Guan
Research Scientist
RHPCS, McMaster University
Phone: 905-525-9140 x22540

___
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:
https://public.kitware.com/mailman/listinfo/paraview






--
--
Weiguang Guan
Research Scientist
RHPCS, McMaster University
Phone: 905-525-9140 x22540

___
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:
https://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Volume rendering rectilinear data

2018-04-27 Thread David E DeMarle
Not that I know of.

We are more likely to make the conversion to image based volume rendering
automatic, faster and more precise.


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

On Fri, Apr 27, 2018 at 12:23 PM, Weiguang Guan 
wrote:

> Hi David,
>
> Thanks for confirming it. Does Kitware have a plan to implement volume
> rendering for rectilinear volume? You see the spectrum from vtkImageData,
> to vtkRectilinearGrid, vtkStructuredGrid --- volume rendering is
> implemented on both ends but not for the middle one, which is a bit odd to
> the user.
>
> Best,
> Weiguang
>
>
>
> On 4/27/2018 12:06 PM, David E DeMarle wrote:
>
> You are correct it will not directly volume render vtkRectilinearGrids.
>
> Use threshold filter (all values) to map to a vtkUnstructuredGrid for
> direct rendering but at a cost of memory explosion.
> Apply the resample to image filter to map to vtkImageData for fast volume
> rendering, but at a cost of trading off precision for memory size.
>
>
> David E DeMarle
> Kitware, Inc.
> Principal Engineer
> 21 Corporate Drive
> 
> Clifton Park, NY 12065-8662
> Phone: 518-881-4909
>
> On Fri, Apr 27, 2018 at 11:13 AM, Weiguang Guan 
> wrote:
>
>> I didn't a test and I'm surprised that Paraview cannot do volume
>> rendering on rectilinear data. Can someone confirm it or I made a mistake?
>>
>> Cheers,
>> Weiguang
>>
>> --
>> --
>> Weiguang Guan
>> Research Scientist
>> RHPCS, McMaster University
>> Phone: 905-525-9140 x22540
>>
>> ___
>> 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:
>> https://public.kitware.com/mailman/listinfo/paraview
>>
>
>
>
> --
> --
> Weiguang Guan
> Research Scientist
> RHPCS, McMaster University
> Phone: 905-525-9140 x22540
>
>
___
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:
https://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Volume rendering rectilinear data

2018-04-27 Thread David E DeMarle
You are correct it will not directly volume render vtkRectilinearGrids.

Use threshold filter (all values) to map to a vtkUnstructuredGrid for
direct rendering but at a cost of memory explosion.
Apply the resample to image filter to map to vtkImageData for fast volume
rendering, but at a cost of trading off precision for memory size.


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

On Fri, Apr 27, 2018 at 11:13 AM, Weiguang Guan 
wrote:

> I didn't a test and I'm surprised that Paraview cannot do volume rendering
> on rectilinear data. Can someone confirm it or I made a mistake?
>
> Cheers,
> Weiguang
>
> --
> --
> Weiguang Guan
> Research Scientist
> RHPCS, McMaster University
> Phone: 905-525-9140 x22540
>
> ___
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensou
> rce/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:
> https://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:
https://public.kitware.com/mailman/listinfo/paraview


[Paraview] Volume rendering rectilinear data

2018-04-27 Thread Weiguang Guan
I didn't a test and I'm surprised that Paraview cannot do volume 
rendering on rectilinear data. Can someone confirm it or I made a mistake?


Cheers,
Weiguang

--
--
Weiguang Guan
Research Scientist
RHPCS, McMaster University
Phone: 905-525-9140 x22540

___
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:
https://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] converting .h5 file

2018-04-27 Thread Mathieu Westphal
Hi Phuripan,

Which software are you using to produce your .h5 files ?

Best,

Mathieu Westphal

On Fri, Apr 27, 2018 at 12:09 PM, Phuripan Jangthongsiri <
bung_m...@hotmail.com> wrote:

> Hi there!
>
> Thanks for your answers. I've been trying to find a way to convert .h5
> file to xdmf file. Do you know the easiest way to do that?
>
> Sincerely,
> Phuripan Jangthongsiri
> --
> *From:* Mathieu Westphal 
> *Sent:* Friday, April 27, 2018 9:09 AM
> *To:* Phuripan Jangthongsiri
> *Cc:* paraview@public.kitware.com
> *Subject:* Re: [Paraview] converting .h5 file
>
> Dear Phuripan,
>
> ParaView support some hdf5 based format already, so you may want to try
> that first, i've included a list a .h5 based format supported by ParaView
> natively.
> TRUCHAS dataset
> PDAL Files
> Chombo Files
> GTC Files
> UNIC Files
> VizSchema Files
> H5Nimrod Files
> Multilevel 3D Plasma Files
> PFLOTRAN Files
> Pixie Files
> Tetrad Files
>
> Please note that we also support Xdmf, H5Part and Enzo HDF5 format wich
> are using hdf5 as well.
>
> Best regards,
>
> Mathieu Westphal
>
> On Thu, Apr 26, 2018 at 5:02 PM, Phuripan Jangthongsiri <
> bung_m...@hotmail.com> wrote:
>
> Dear whom it may concern,
>
> I'm having .h5 files for my simulations. I'm wondering if there are easy
> ways to convert those .h5 files to something that Paraview could read and
> what are types of files that are allowed on Paraview.
>
> Sincerely,
> Phuripan
>
> ___
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensou
> rce/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:
> https://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:
https://public.kitware.com/mailman/listinfo/paraview