]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Sample ParaView plugins: Sample filter
authorsan <san@opencascade.com>
Mon, 15 Dec 2008 16:14:22 +0000 (16:14 +0000)
committersan <san@opencascade.com>
Mon, 15 Dec 2008 16:14:22 +0000 (16:14 +0000)
src/Plugins/CMakeLists.txt [new file with mode: 0755]
src/Plugins/Filter/CMakeLists.txt [new file with mode: 0755]
src/Plugins/Filter/SampleFilter.xml [new file with mode: 0755]
src/Plugins/Filter/vtkMySampleFilter.cxx [new file with mode: 0644]
src/Plugins/Filter/vtkMySampleFilter.h [new file with mode: 0644]

diff --git a/src/Plugins/CMakeLists.txt b/src/Plugins/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..a9aad20
--- /dev/null
@@ -0,0 +1,11 @@
+PROJECT(SamplePlugins)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.4.5)
+IF(COMMAND CMAKE_POLICY)
+  CMAKE_POLICY(SET CMP0003 NEW)
+ENDIF(COMMAND CMAKE_POLICY)
+
+FIND_PACKAGE(ParaView REQUIRED)
+INCLUDE(${PARAVIEW_USE_FILE})
+
+SUBDIRS(Filter)
+
diff --git a/src/Plugins/Filter/CMakeLists.txt b/src/Plugins/Filter/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..1629810
--- /dev/null
@@ -0,0 +1,13 @@
+
+# create a paraview plugin containing server manager xml and the server
+# manager classes to build
+# this plugin can be loaded on the server side
+
+ADD_PARAVIEW_PLUGIN(SMSampleFilter "1.0"
+  SERVER_MANAGER_XML SampleFilter.xml 
+  SERVER_MANAGER_SOURCES vtkMySampleFilter.cxx)
+
+INSTALL(
+       TARGETS SMSampleFilter 
+       DESTINATION lib/salome
+)
diff --git a/src/Plugins/Filter/SampleFilter.xml b/src/Plugins/Filter/SampleFilter.xml
new file mode 100755 (executable)
index 0000000..9d7d4ca
--- /dev/null
@@ -0,0 +1,23 @@
+<ServerManagerConfiguration>
+  <ProxyGroup name="filters">
+   <SourceProxy name="SampleFilter" class="vtkMySampleFilter" label="SampleFilter">
+     <Documentation
+        long_help="Long help"
+        short_help="Short help">
+Documentation text
+     </Documentation>
+     <InputProperty
+        name="Input"
+        command="SetInputConnection">
+           <ProxyGroupDomain name="groups">
+             <Group name="sources"/>
+             <Group name="filters"/>
+           </ProxyGroupDomain>
+           <DataTypeDomain name="input_type">
+             <DataType value="vtkDataSet"/>
+           </DataTypeDomain>
+      </InputProperty>
+   </SourceProxy>
+ </ProxyGroup>
+</ServerManagerConfiguration>
+
diff --git a/src/Plugins/Filter/vtkMySampleFilter.cxx b/src/Plugins/Filter/vtkMySampleFilter.cxx
new file mode 100644 (file)
index 0000000..f16d1c2
--- /dev/null
@@ -0,0 +1,23 @@
+#include "vtkMySampleFilter.h"
+
+#include <vtkObjectFactory.h>
+
+vtkCxxRevisionMacro(vtkMySampleFilter, "$Revision$");
+vtkStandardNewMacro(vtkMySampleFilter);
+
+//----------------------------------------------------------------------------
+vtkMySampleFilter::vtkMySampleFilter()
+{
+}
+
+//----------------------------------------------------------------------------
+vtkMySampleFilter::~vtkMySampleFilter()
+{
+}
+
+//----------------------------------------------------------------------------
+void vtkMySampleFilter::PrintSelf(ostream& os, vtkIndent indent)
+{
+  this->Superclass::PrintSelf(os,indent);
+}
+
diff --git a/src/Plugins/Filter/vtkMySampleFilter.h b/src/Plugins/Filter/vtkMySampleFilter.h
new file mode 100644 (file)
index 0000000..94af1e2
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __vtkMySampleFilter_h
+#define __vtkMySampleFilter_h
+
+#include <vtkExtractEdges.h>
+
+class vtkMySampleFilter : public vtkExtractEdges
+{
+public:
+  static vtkMySampleFilter* New();
+  vtkTypeRevisionMacro(vtkMySampleFilter, vtkExtractEdges);
+  void PrintSelf(ostream& os, vtkIndent indent);
+
+protected:
+  vtkMySampleFilter();
+  ~vtkMySampleFilter();
+
+private:
+  vtkMySampleFilter(const vtkMySampleFilter&);  // Not implemented.
+  void operator=(const vtkMySampleFilter&);  // Not implemented.
+};
+
+#endif