From 1682daef4fe7989235bfc4b13175bd95ea328a26 Mon Sep 17 00:00:00 2001
From: Mathieu Westphal <mathieu.westphal@kitware.com>
Date: Thu, 24 Jan 2019 15:03:59 +0100
Subject: [PATCH] jpouderoux test

---
 Plugins/ArrowGlyph/Filter/CMakeLists.txt      |  1 +
 .../ArrowGlyph/Filter/vtkArrowGlyphFilter.xml | 69 +++++++++++++++++++
 .../Filter/vtkMyElevationFilter.cxx           | 35 ++++++++++
 .../ArrowGlyph/Filter/vtkMyElevationFilter.h  | 45 ++++++++++++
 4 files changed, 150 insertions(+)
 create mode 100644 Plugins/ArrowGlyph/Filter/vtkMyElevationFilter.cxx
 create mode 100644 Plugins/ArrowGlyph/Filter/vtkMyElevationFilter.h

diff --git a/Plugins/ArrowGlyph/Filter/CMakeLists.txt b/Plugins/ArrowGlyph/Filter/CMakeLists.txt
index 5bc5c7c82e..aca92d1720 100644
--- a/Plugins/ArrowGlyph/Filter/CMakeLists.txt
+++ b/Plugins/ArrowGlyph/Filter/CMakeLists.txt
@@ -1,4 +1,5 @@
 set(classes
+  vtkMyElevationFilter
   vtkArrowGlyphFilter)
 
 vtk_module_add_module(ArrowGlyph::ArrowGlyphFilter
diff --git a/Plugins/ArrowGlyph/Filter/vtkArrowGlyphFilter.xml b/Plugins/ArrowGlyph/Filter/vtkArrowGlyphFilter.xml
index 838d5e47a6..a769d842d1 100644
--- a/Plugins/ArrowGlyph/Filter/vtkArrowGlyphFilter.xml
+++ b/Plugins/ArrowGlyph/Filter/vtkArrowGlyphFilter.xml
@@ -211,6 +211,75 @@
       </Hints>
 
     </SourceProxy>
+   <SourceProxy name="MyElevationFilter" class="vtkMyElevationFilter" label="MyElevation">
+     <Documentation
+        long_help="Create point attribute array by projecting points onto an elevation vector."
+        short_help="Create a point array representing elevation.">
+          The Elevation filter generates point scalar values for an input data
+          set along a specified direction vector. The Input menu allows the user
+          to select the data set to which this filter will be applied. The Low
+          Point and High Point define a line onto which each point of the data
+          set is projected. The minimum scalar value is associated with the Low
+          Point, and the maximum scalar value is associated with the High Point.
+          The scalar value for each point in the data set is determined by the
+          location along the line to which that point projects.
+
+          The line can be specified interactively using the 3D line widget. See
+          section 7.4 for more information about this widget.
+     </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>
+
+      <DoubleVectorProperty
+         name="LowPoint"
+         label="Low Point"
+         command="SetLowPoint"
+         number_of_elements="3"
+         animateable="1"
+         default_values="0 0 0" >
+         <BoundsDomain name="range" mode="normal" default_mode="min" >
+           <RequiredProperties>
+             <Property name="Input" function="Input" />
+           </RequiredProperties>
+         </BoundsDomain>
+         <Documentation>
+           Define one end of the line (small scalar values). Default is (0,0,0).
+         </Documentation>
+      </DoubleVectorProperty>
+
+      <DoubleVectorProperty
+         name="HighPoint"
+         label="High Point"
+         command="SetHighPoint"
+         number_of_elements="3"
+         animateable="1"
+         default_values="0 0 1" >
+         <BoundsDomain name="range" mode="normal" default_mode="max" >
+           <RequiredProperties>
+             <Property name="Input" function="Input" />
+           </RequiredProperties>
+         </BoundsDomain>
+         <Documentation>
+           Define other end of the line (large scalar values). Default is (0,0,1).
+         </Documentation>
+      </DoubleVectorProperty>
+
+      <PropertyGroup panel_widget="InteractiveLine">
+        <Property function="Point1WorldPosition" name="LowPoint" />
+        <Property function="Point2WorldPosition" name="HighPoint" />
+        <Property function="Input" name="Input" />
+      </PropertyGroup>
+   <!-- End MyElevationFilter -->
+   </SourceProxy>
 
   </ProxyGroup>
 
diff --git a/Plugins/ArrowGlyph/Filter/vtkMyElevationFilter.cxx b/Plugins/ArrowGlyph/Filter/vtkMyElevationFilter.cxx
new file mode 100644
index 0000000000..c2c8ca469e
--- /dev/null
+++ b/Plugins/ArrowGlyph/Filter/vtkMyElevationFilter.cxx
@@ -0,0 +1,35 @@
+/*=========================================================================
+
+  Program:   Visualization Toolkit
+  Module:    vtkMyElevationFilter.cxx
+
+  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
+  All rights reserved.
+  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
+
+     This software is distributed WITHOUT ANY WARRANTY; without even
+     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+     PURPOSE.  See the above copyright notice for more information.
+
+=========================================================================*/
+#include "vtkMyElevationFilter.h"
+
+#include "vtkObjectFactory.h"
+
+vtkStandardNewMacro(vtkMyElevationFilter);
+
+//----------------------------------------------------------------------------
+vtkMyElevationFilter::vtkMyElevationFilter()
+{
+}
+
+//----------------------------------------------------------------------------
+vtkMyElevationFilter::~vtkMyElevationFilter()
+{
+}
+
+//----------------------------------------------------------------------------
+void vtkMyElevationFilter::PrintSelf(ostream& os, vtkIndent indent)
+{
+  this->Superclass::PrintSelf(os, indent);
+}
diff --git a/Plugins/ArrowGlyph/Filter/vtkMyElevationFilter.h b/Plugins/ArrowGlyph/Filter/vtkMyElevationFilter.h
new file mode 100644
index 0000000000..d2466442c4
--- /dev/null
+++ b/Plugins/ArrowGlyph/Filter/vtkMyElevationFilter.h
@@ -0,0 +1,45 @@
+/*=========================================================================
+
+  Program:   Visualization Toolkit
+  Module:    vtkMyElevationFilter.h
+
+  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
+  All rights reserved.
+  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
+
+     This software is distributed WITHOUT ANY WARRANTY; without even
+     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+     PURPOSE.  See the above copyright notice for more information.
+
+=========================================================================*/
+// .NAME vtkMyElevationFilter - generate scalars along a specified direction
+// .SECTION Description
+// vtkMyElevationFilter is a filter to generate scalar values from a
+// dataset.  The scalar values lie within a user specified range, and
+// are generated by computing a projection of each dataset point onto
+// a line. The line can be oriented arbitrarily. A typical example is
+// to generate scalars based on elevation or height above a plane.
+
+#ifndef vtkMyElevationFilter_h
+#define vtkMyElevationFilter_h
+
+#include "vtkArrowGlyphFilterModule.h"
+#include "vtkElevationFilter.h"
+
+class VTKARROWGLYPHFILTER_EXPORT vtkMyElevationFilter : public vtkElevationFilter
+{
+public:
+  static vtkMyElevationFilter* New();
+  vtkTypeMacro(vtkMyElevationFilter, vtkElevationFilter);
+  void PrintSelf(ostream& os, vtkIndent indent) override;
+
+protected:
+  vtkMyElevationFilter();
+  ~vtkMyElevationFilter();
+
+private:
+  vtkMyElevationFilter(const vtkMyElevationFilter&) = delete;
+  void operator=(const vtkMyElevationFilter&) = delete;
+};
+
+#endif
-- 
2.20.1

