![]() ![]() Note this configuration should match the one used when you compiled your version of Paraview. Or if you set the default configuration to "Release"then the file will be located in:Ĭ:/vtkCPPFilter/build/Release/CPPFilter.dll After this process finishes the following file will be created:Ĭ:/vtkCPPFilter/build/Debug/CPPFilter.dll You can open this file with Visual Studio 2010 (if you are using other compiler this file may vary). The next step is to open CMake and point it to our working folder and specify the build directory.įor this example the build directory will be C:/vtkCPPFilter/build.Īfter you have clicked in "Configure" and then on "Generate" you will have a new file called: C:/vtkCPPFilter/build/Project.sln. Now, you should have 4 files in your working directory: Step 5: Generate the rest of the plugin code Void operator=(const vtkCPPFilter&) // Not implemented. VtkCPPFilter(const vtkCPPFilter&) // Not implemented. Void PrintSelf(ostream& os, vtkIndent indent) VtkTypeMacro(vtkCPPFilter, vtkPythonProgrammableFilter) include "vtkPythonProgrammableFilter.h"Ĭlass VTK_EXPORT vtkCPPFilter : public vtkPythonProgrammableFilter.Here we will create the H file referenced in the Step 3: "vtkCPPFilter.h" Step 4: Create the H file with the header of the plugin Create a new variable for Python called 'sizz' QMessageBox::information(NULL, "MyAction", s) Sprintf(s, "SetSizz was invoked %f\n", value) Method that creates a variable for Python using SetParameter Void vtkCPPFilter::PrintSelf(ostream& os, vtkIndent indent) Here we will create the C++ file referenced in the Step 1: "vtkCPPFilter.cxx" Step 3: Create the C++ file with the code for the plugin In the Step 1 we are referencing the file "vtkCPPFilter.xml", so you need to create it with the following contents: Step 2: Create the XML file describing the plugin and its GUI this plugin can be loaded on the server side.create a paraview plugin containing server manager xml and the server.7 Step 7: Load the plugin from inside ParaviewĬreate a file CMakeLists.txt with the following contents:Ĭmake_minimum_required(VERSION 2.8.8 FATAL_ERROR).5 Step 5: Generate the rest of the plugin code.4 Step 4: Create the H file with the header of the plugin.3 Step 3: Create the C++ file with the code for the plugin.2 Step 2: Create the XML file describing the plugin and its GUI.My ideal solution would be a snipped of code where I just have to copy in a list of values with the rendered isosurfaces for these values, preferable as different objects, so I can color them and add/remove them from the current RenderView. Which does not work as InputConnection for the ContourFilter. When I use pdo = self.GetOutput() then I get a vtkImageData object. ![]() The problem is, that pdo is "None", ie the I don't have PolyData. Self.GetOutput().ShallowCopy(c.GetOutput()) Here is what I've got so far: pdi = self.GetPolyDataInput() I've tried using the programmable filter, but I'm kinda stuck on the data format I'm getting. In my use case, I have a bunch of isovalues that I want to use and thus it's kinda tedious to type them in manually. The problem with that is, that I have to manually type them in. I know that I can manually type in multiple Isosurfaces and get all of them extracted by a single filter. I'm trying to create a programmable filter to extract isosurfaces. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |