CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[General] How to use Median filter in Paraview? It's always greyed out...

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 20, 2015, 02:13
Default How to use Median filter in Paraview? It's always greyed out...
  #1
Senior Member
 
Jie
Join Date: Jan 2010
Location: Australia
Posts: 134
Rep Power: 16
jiejie is on a distinguished road
Dear Paraview users

I am trying to use the median filter from Paraview to remove some noise / smooth out the data. However, the median filter is alway in grey, which cannot be applied to the data set I have. My data is in the plt format. I am wondering if anyone used the median filter?

Thank you.
Jie
jiejie is offline   Reply With Quote

Old   August 20, 2015, 22:00
Default
  #2
Senior Member
 
Jie
Join Date: Jan 2010
Location: Australia
Posts: 134
Rep Power: 16
jiejie is on a distinguished road
I played around with different types of data. I found the median filter works with the vti data format. The question is how to use the median filter if the data is a in different format, e.g. plt format?
jiejie is offline   Reply With Quote

Old   August 21, 2015, 18:49
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: The problem is not due to the file format itself, the problem is the data structure it's in.

After loading the "vti" or "plt" file, with it selected in the "Pipeline Browser", go to the tab "Information" below and check what type of data structure it's defined as. For example, as shown in the attached image.
Attached Images
File Type: png Type of data structure.png (26.0 KB, 20 views)
wyldckat is offline   Reply With Quote

Old   August 23, 2015, 19:29
Default
  #4
Senior Member
 
Jie
Join Date: Jan 2010
Location: Australia
Posts: 134
Rep Power: 16
jiejie is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answer: The problem is not due to the file format itself, the problem is the data structure it's in.

After loading the "vti" or "plt" file, with it selected in the "Pipeline Browser", go to the tab "Information" below and check what type of data structure it's defined as. For example, as shown in the attached image.
Hi wyldckat

Thanks for your advice. The vti data has the type of image (uniform rectilinear grid) where as my tecplot data has the type of multi-block dataset. The question is whether it is possible to convert one to the other so that the median filter can be applied to the data set I want or is there a type of median filter that can be applied to the multi-block data set?

Thanks
Jie
jiejie is offline   Reply With Quote

Old   August 23, 2015, 19:53
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Jie,

I did some looking into this and it seems that perhaps you're confusing "Median" with "Temporal Average"?

I ask this because:
  • The filter "Median" is available only for image processing.
  • As for "Temporal Average", I'll quote the answer I found:
    Quote:
    Originally Posted by tonyuprm View Post
    One should use the filter "temporal statistics" under "Temporal". This will calculate the average of all the time steps.
Beyond this, my guess all that it's left is to use the "Programmable Filter" along with the Python modules "numpy" and "scipy", which would require you to search for ways to do some noise filtering with numpy/scipy!?


Of course the other way to actually use the Median filter is for you to use the menu "File -> Save Screenshot", save as an image and then load it again to apply the filter... although this doesn't sound very healthy...

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   August 23, 2015, 20:20
Default
  #6
Senior Member
 
Jie
Join Date: Jan 2010
Location: Australia
Posts: 134
Rep Power: 16
jiejie is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Jie,

I did some looking into this and it seems that perhaps you're confusing "Median" with "Temporal Average"?

I ask this because:
  • The filter "Median" is available only for image processing.
  • As for "Temporal Average", I'll quote the answer I found:
Beyond this, my guess all that it's left is to use the "Programmable Filter" along with the Python modules "numpy" and "scipy", which would require you to search for ways to do some noise filtering with numpy/scipy!?


Of course the other way to actually use the Median filter is for you to use the menu "File -> Save Screenshot", save as an image and then load it again to apply the filter... although this doesn't sound very healthy...

Best regards,
Bruno
Hi Bruno

Thanks for you quick reply again. I used to use python script to postprocessing my Tecplot data. However, I found it is a bit slow to re-load the data into a 3D array and apply a 3D median filter. Hence, I tried to do it in Paraview. Then, I realised that the median filter from Paraview can only be applied to the images. I am in the process to use the programable filter. However, I am still at the stage of learning how to use the python command to access the data in Paraview. Any advice will be appreciated.

Regards,
Jie
jiejie is offline   Reply With Quote

Old   August 24, 2015, 12:02
Default
  #7
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Jie,

A few good references:
For the rest, I suggest Googling for:
Code:
paraview python
And possibly:
Code:
paraview numpy
Good luck! Best regards,
Bruno
wyldckat is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[General] Listing the inputs of a grouped dataset with a programmable python filter in Paraview NadineHS ParaView 3 December 12, 2021 14:54
[General] scripting with paraview clip filter yongxiang ParaView 0 November 7, 2017 08:07
[OpenFOAM] ParaView Plotting: Why are some Filters in the Alphabetical list greyed out? arieljeds ParaView 3 August 23, 2017 13:30
[OpenFOAM] specific filter in paraview sanjar ParaView 2 January 20, 2014 11:53
paraFoam reader for OpenFOAM 1.6 smart OpenFOAM Installation 13 November 16, 2009 21:41


All times are GMT -4. The time now is 20:15.