Hi,<br><br>I&#39;m trying to add a filter to ParaView, but I&#39;m having problems compiling the code. I have this files:<br><br><u>vtkFlipCoordsFilter.h</u><br><br>#ifndef __vtkFlipCoordsFilter_h<br>#define __vtkFlipCoordsFilter_h
<br><br>#include &quot;vtkPointSetAlgorithm.h&quot;<br><br>class VTK_EXPORT vtkFlipCoordsFilter : public vtkPointSetAlgorithm<br>{<br>public:<br>        vtkTypeRevisionMacro(vtkFlipCoordsFilter,vtkPointSetAlgorithm);<br>        void PrintSelf(ostream&amp; os, vtkIndent indent);
<br>        static vtkFlipCoordsFilter* New();<br><br><br>        //Description:<br>        //Set/get wich axis coordinates should be negated.<br>        //x=0, y=1, z=2<br>        vtkSetClampMacro(Axis, int, 0, 2);<br>        vtkGetMacro(Axis, int);<br><br>protected:
<br>        vtkFlipCoordsFilter();<br>        ~vtkFlipCoordsFilter();<br><br>        int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);<br>        int Axis;<br>private:<br>        vtkFlipCoordsFilter(const vtkFlipCoordsFilter&amp;); //not implemented
<br>        void operator= (const vtkFlipCoordsFilter&amp;);//not implemented<br>};<br><br>#endif<br><br><u>vtkFlipCoordsFilter.cxx<br><br></u>#include &quot;vtkFlipCoordsFilter.h&quot;<br><br>#include &quot;vtkCellData.h&quot;<br>
#include &quot;vtkPointData.h&quot;<br>#include &quot;vtkPoints.h&quot;<br>#include &quot;vtkPointSet.h&quot;<br>#include &quot;vtkInformation.h&quot;<br>#include &quot;vtkInformationVector.h&quot;<br>#include &quot;vtkObjectFactory.h
&quot;<br><br>vtkStandardNewMacro(vtkFlipCoordsFilter);<br>vtkCxxRevisionMacro(vtkFlipCoordsFilter, &quot;$Revision: 1.1 $&quot;);<br><br>//----------------------------------------------------------------------------<br>vtkFlipCoordsFilter::vtkFlipCoordsFilter(){
<br>  this-&gt;Axis = 1;<br>}<br><br>//----------------------------------------------------------------------------<br>int vtkFlipCoordsFilter::RequestData(vtkInformation* vtkNotUsed(request), vtkInformationVector** inputVector,  vtkInformationVector* outputVector){
<br><br>  // get the information objects<br>  vtkInformation *inInfo = inputVector[0]-&gt;GetInformationObject(0);<br>  vtkInformation *outInfo = outputVector-&gt;GetInformationObject(0);<br><br>  // get the input and output
<br>  vtkPointSet *input = vtkPointSet::SafeDownCast(inInfo-&gt;Get(vtkDataObject::DATA_OBJECT()));<br>  vtkPointSet *output = vtkPointSet::SafeDownCast(outInfo-&gt;Get(vtkDataObject::DATA_OBJECT()));<br><br>  // Copy the structure of the input dataset to the output.
<br>  output-&gt;CopyStructure(input);<br><br>  int numPts = input-&gt;GetNumberOfPoints();<br>  vtkPoints *points = input-&gt;GetPoints();<br>  vtkPoints *newPts = vtkPoints::New();<br>  newPts-&gt;SetNumberOfPoints(numPts);
<br><br>  double pt[3];<br>  int i;<br><br>  for (i = 0; i &lt; numPts; i++)<br>    {<br>    // Negate the specified coordinate.<br>    points-&gt;GetPoint(i, pt);<br>    pt[this-&gt;Axis] *= -1;<br>    newPts-&gt;SetPoint(i, pt);
<br>    }<br><br>  output-&gt;GetPointData()-&gt;CopyNormalsOff(); // distorted geometry <br>  output-&gt;GetPointData()-&gt;PassData(input-&gt;GetPointData());<br>  output-&gt;GetCellData()-&gt;CopyNormalsOff(); // distorted geometry 
<br>  output-&gt;GetCellData()-&gt;PassData(input-&gt;GetCellData());<br><br>  output-&gt;SetPoints(newPts);<br>  newPts-&gt;Delete();<br><br>  return 1;<br>}<br><br>//----------------------------------------------------------------------------
<br>void vtkFlipCoordsFilter::PrintSelf(ostream&amp; os, vtkIndent indent){<br>  this-&gt;Superclass::PrintSelf(os, indent);<br><br>  os &lt;&lt; indent &lt;&lt; &quot;Axis: &quot; &lt;&lt; this-&gt;Axis &lt;&lt; endl;<br>
}<br><br>ccmake runs fine, but when I run make I get this message (verbose is on):<br><br>abnocte@abnocte-laptop:~/software/modulos/flipCoords$ make<br>/home/abnocte/software/cmake-2.4.3-Linux-i386/bin/cmake -H/home/abnocte/software/modulos/flipCoords -B/home/abnocte/software/modulos/flipCoords --check-build-system CMakeFiles/Makefile.cmake 0
<br>/home/abnocte/software/cmake-2.4.3-Linux-i386/bin/cmake -E cmake_progress_start /home/abnocte/software/modulos/flipCoords/CMakeFiles 4<br>make -f CMakeFiles/Makefile2 all<br>make[1]: se ingresa al directorio `/home/abnocte/software/modulos/flipCoords&#39;
<br>make -f CMakeFiles/myCustom.dir/build.make CMakeFiles/myCustom.dir/depend<br>make[2]: se ingresa al directorio `/home/abnocte/software/modulos/flipCoords&#39;<br>/home/abnocte/software/cmake-2.4.3-Linux-i386/bin/cmake -E cmake_progress_report /home/abnocte/software/modulos/flipCoords/CMakeFiles 4
<br>[ 25%] Generating vtkFlipCoordsFilterClientServer.cxx <strong>&lt;-&nbsp;this&nbsp;is&nbsp;never&nbsp;generated</strong> <br>./vtkFlipCoordsFilter.h 1 /home/abnocte/software/modulos/flipCoords/vtkFlipCoordsFilterClientServer.cxx<br>./vtkFlipCoordsFilter.h: 6: class: not found
<br>./vtkFlipCoordsFilter.h: 9: Syntax error: word unexpected (expecting &quot;)&quot;)<br>make[2]: *** [vtkFlipCoordsFilterClientServer.cxx] Error 2<br>make[2]: se sale del directorio `/home/abnocte/software/modulos/flipCoords&#39;
<br>make[1]: *** [CMakeFiles/myCustom.dir/all] Error 2<br>make[1]: se sale del directorio `/home/abnocte/software/modulos/flipCoords&#39;<br>make: *** [all] Error 2<u><br></u><br><br>Any ideas??<br><u><br></u>Thanks<u><br>
</u><u><br></u><br>