Read in data, use a filter and save a screenshot Lets read in can.exo, clip can.exo, paint can.exo and save a screenshot. Within the ParaView GUI, Edit → Reset Session.Wireframe=ExtractEdges(Input=sphere) Show() Render() A simple Python example reading a datafile and writing a screenshot SetActiveSource(sphere) Lets delete the clipĭelete(clip) Lets add a filter to the sphere, without selecting it first Lets change the selected filter in the Pipeline Browser: Sphere.ThetaResolution=64 Show() Render() Print(sphere.ThetaResolution) Change it to 64 And, to see the different properties of the ClipType variable, useĬ() To see lots of detail on an instance of a command, create the instance and ask for help on that instance.Ĭhange! (Lets look at, and change, something) To see all commands available in ParaView:ĭir() To see all of the options for the Clip creator:ĭir(Clip) To see all of the options for the instance of the clip we created above:ĭir(clip) A better tool to see the available commands for an item in the pipeline is ListProperties, such as:Ĭlip.ListProperties() Note that this doesn't work on instantiated controls, such as the camera. Help! (How do we find out what commands are available?) In the Python Shell, type the following:Ĭlip=Clip() Show() Render() Or, we could continue in the Python as follows:Ĭlip=Clip() Hide(shrink) Show(clip) Render() Hide the Plane widget: Select the Sphere in the pipeline browser. ParaView will allow us to use either the GUI controls or Python. Hide() Render() shrink=Shrink() Show() Render() We hide the sphere, add the shrink filter, and re-render. Sphere=Sphere() Show() Render() We have now created a sphere in the pipeline, turned on it's visibility, and re-rendered. (Type the following into the Python Shell) Be sure to use correct capitalization as shown below. You can copy commands from elsewhere and paste them into the Python Shell. Start the Python Interpreter Tools → Python Shell.We can use Python to control ParaView either in the GUI, at the client level, or directly on the server.Ī simple Python toy example within ParaView The server reads the user's data, processes the data, and passes these images to the client. The client includes the ParaView GUI and display. ParaView is a client/ server architecture. It shows a user how to drive ParaView using Python commands, and how to automate the creation and use of these commands. This tutorial will describe ParaView and Python. This allows users to automate processing of their data, and gives access to powerful tools in the Visualization Tool Kit (VTK). ParaView offers a rich and powerful Python interface. 5 Scale Around Dataset Center - A userful example.4.1 Read in data, use a filter and save a screenshot.4 A simple Python example reading a datafile and writing a screenshot. 3 A simple Python toy example within ParaView.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |