Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding more filters and readers #35

Open
MariDani opened this issue Aug 4, 2017 · 9 comments
Open

Adding more filters and readers #35

MariDani opened this issue Aug 4, 2017 · 9 comments

Comments

@MariDani
Copy link

MariDani commented Aug 4, 2017

Hi all,

I am trying to add more filters and readers to Visualizer. I have created file named filter.json, see below:

    "sources": [
        { "name": "AnnotateTime", "label": "Annotate Time" },
        { "name": "Cone" },
        { "name": "Sphere" },
        { "name": "Text" },
        { "name": "Wavelet" }
    ],

    "filters": [
        { "name": "Calculator" },
        { "name": "CellDatatoPointData", "label": "Cell Data To Point Data" },
        { "name": "Clip" },
        { "name": "Contour" },
        { "name": "D3" },
        { "name": "ExtractCTHParts", "label": "Extract CTH Parts" },
        { "name": "MaskPoints", "label": "Mask Points" },
        { "name": "ProcessIdScalars", "label": "Process ID Scalars" },
        { "name": "Reflect" },
        { "name": "Slice" },
        { "name": "StreamTracer", "label": "Stream Tracer" },
        { "name": "Threshold" },
        { "name": "Transform" },
        { "name": "Tube" },
        { "name": "Ribbon" },
        { "name": "Volume", "label": "Volume" },
        { "name": "WarpByScalar", "label": "Warp By Scalar" },
        { "name": "WarpByVector", "label": "Warp By Vector" },
        { "name": "ExtractBlock", "label": "Extract Blocks" }
    ],

    "readers": [
        { "name": "LegacyVTKReader", "extensions": [ "vtk" ], "method": "FileNames" },
        { "name": "Xdmf3ReaderS", "extensions": [ "xmf", "xdmf" ] }
    ]
}

I am starting the Visualizer like this:
./node_modules/.bin/Visualizer --paraview ../ParaView-5.4.1-RC2-Qt5-OpenGL2-MPI-Linux-64bit/ --data ../vtk/ --proxies ../filter.json

But when I open Visualizer in my browser I don't see any changes. Can you advise me what should I do differently?

I was also wondering if I can add functionalities like "go to first frame", "go to last frame", or "manually type frame number" by adding them to this filter.json file. If yes, could you please advise me what I should type there?
I saw that you had these functions implemented in Visualizer 4 years ago, based on your video here, so I assume that it has to be somehow possible to implement these functionalities.

Thank you

Mariana

@jourdain
Copy link
Collaborator

jourdain commented Aug 4, 2017

Hi Mariana,

Did you add a source and try to add a new filter to it? If so, the filter that you've added should be available in the filter list. Was it or not? As changing that file should not change the UI in any other way than changing the content of the "+" menu.

The time handling is already supported if your data is time dependent. But it is true, that those controls are not available if you don't have time information in your dataset.
Although, typing the step/time value by hand is not available (which can easily be added).

@MariDani
Copy link
Author

MariDani commented Aug 7, 2017

Yes, I added a source and I wanted to try to add the new filter to it but the content of the "+" hasn't changed. Any ideas?

My data is time dependent so I can see the time controls. Could you advise me how to add "go to first frame", "go to last frame", or "typing the step/time value by hand"?

@jourdain
Copy link
Collaborator

jourdain commented Aug 7, 2017

Hum that should work. Did you try to provide the full path to that filter.json file?
Moreover, is that json of a valid format? (You can check here https://jsonlint.com/)
Do you have any error in the logs?

@MariDani
Copy link
Author

MariDani commented Aug 9, 2017

I validated the json file and it is valid. (In my first post here in this issue I just missed the opening "{" but it is not missing in the file).
I am running Visualizer like this, with the full path to filter.json file:
./node_modules/.bin/Visualizer --paraview ../ParaView-5.4.1-RC2-Qt5-OpenGL2-MPI-Linux-64bit/ --data ../vtk/ --proxies /home/test/workspace/visualizer/filter.json

And there are still no changes in the Visualizer, there are even no errors in the log, see below:
capture

I am trying to add source Box, fitlers MaskPoints, Volume, and readers Xdmf3ReaderS, LegacyVTKReader.

@jourdain
Copy link
Collaborator

jourdain commented Aug 9, 2017

As you can see the Execute: command is missing the --proxies for whatever reason.
Try writing the same command by hand while providing that --proxies argument.

That is most likely the issue.

@MariDani
Copy link
Author

Hello,
thank you for your advice, this finally worked! Do you have any idea why the original command didn't work (./node_modules/.bin/Visualizer --paraview ../ParaView-5.4.1-RC2-Qt5-OpenGL2-MPI-Linux-64bit/ --data ../vtk/ --proxies /home/test/workspace/visualizer/filter.json)? I am just wondering, if there is something that I could easily repair on my side.
Thank you, Mariana

@jourdain
Copy link
Collaborator

Yes, we are missing a code block like below for the proxies:

https://github.com/Kitware/visualizer/blob/master/bin/pvw-visualizer-cli.js#L90-L93

wgui1 pushed a commit to wgui1/visualizer that referenced this issue Aug 17, 2017
to be able to customize reader and filter, it needs to use --proxies
Kitware#35
@cbresloff
Copy link

May I ask, where is the documentation found, to construct the filter.json file used above?

@jourdain
Copy link
Collaborator

The keys used are the one defined in the XML that shape the proxies.

https://github.com/Kitware/ParaView/tree/master/ParaViewCore/ServerManager/SMApplication/Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants